diff --git a/.travis.yml b/.travis.yml
index 3bf526f..b29d5f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,18 @@
language: node_js
sudo: false
node_js:
- - "0.12.4"
+ - "5.8"
+ - "0.12"
+env:
+ - CXX=g++-4.8
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-4.8
before_install:
- - "npm install -g npm"
- - "npm install -g grunt-cli"
+ - "npm install -g npm"
+ - "npm install -g grunt-cli"
install:
- - "npm install"
\ No newline at end of file
+ - "npm install"
\ No newline at end of file
diff --git a/front/src/views/rule.html b/front/src/views/rule.html
index 7301e85..d6a83e8 100644
--- a/front/src/views/rule.html
+++ b/front/src/views/rule.html
@@ -96,6 +96,12 @@
+
+ inline CSS
+
+ :
+
+
{{offender.color1}}
{{offender.color2}}
diff --git a/lib/metadata/policies.js b/lib/metadata/policies.js
index c2f2bc0..9c7b9e2 100644
--- a/lib/metadata/policies.js
+++ b/lib/metadata/policies.js
@@ -424,7 +424,40 @@ var policies = {
"isOkThreshold": 750,
"isBadThreshold": 3000,
"isAbnormalThreshold": 4500,
- "hasOffenders": false
+ "hasOffenders": true,
+ "offendersTransformFn": function(offenders) {
+ var hasInline = false;
+ var inlineCount = 0;
+ var files = [];
+
+ offenders.forEach(function(line) {
+ if (line.indexOf('[inline CSS]: ') === 0) {
+ hasInline = true;
+ inlineCount += parseInt(line.substr(14));
+ } else {
+ var parts = /^<(.*)>: (\d+)$/.exec(line);
+
+ if (parts) {
+ files.push({
+ file: parts[1],
+ rules: parseInt(parts[2], 10)
+ });
+ }
+ }
+ });
+
+ if (hasInline) {
+ files.push({
+ file: 'inline CSS',
+ rules: inlineCount
+ });
+ }
+
+ return {
+ count: files.length,
+ list: files
+ };
+ }
},
"cssComplexSelectors": {
"tool": "phantomas",
diff --git a/package.json b/package.json
index 77152ed..b246e22 100644
--- a/package.json
+++ b/package.json
@@ -20,52 +20,52 @@
},
"main": "./lib/index.js",
"dependencies": {
- "angular": "1.4.8",
- "angular-animate": "1.4.8",
- "angular-chart.js": "0.8.8",
- "angular-local-storage": "0.2.2",
- "angular-resource": "1.4.8",
- "angular-route": "1.4.8",
- "angular-sanitize": "1.4.8",
- "async": "1.5.0",
- "body-parser": "1.14.2",
+ "angular": "1.5.2",
+ "angular-animate": "1.5.2",
+ "angular-chart.js": "0.9.0",
+ "angular-local-storage": "0.2.7",
+ "angular-resource": "1.5.2",
+ "angular-route": "1.5.2",
+ "angular-sanitize": "1.5.2",
+ "async": "1.5.2",
+ "body-parser": "1.15.0",
"chart.js": "1.0.2",
- "clean-css": "3.4.8",
- "color-diff": "0.1.7",
- "compression": "1.6.0",
+ "clean-css": "3.4.10",
+ "color-diff": "1.0.0",
+ "compression": "1.6.1",
"cors": "2.7.1",
"css-mq-parser": "0.0.3",
"debug": "2.2.0",
"easyxml": "2.0.1",
- "express": "4.13.3",
+ "express": "4.13.4",
"imagemin": "4.0.0",
"imagemin-jpegoptim": "4.1.0",
"is-http2": "1.0.4",
"lwip": "0.0.8",
- "meow": "3.6.0",
- "minimize": "1.7.4",
+ "meow": "3.7.0",
+ "minimize": "1.8.1",
"parse-color": "1.0.0",
- "phantomas": "git://github.com/gmetais/phantomas.git#fix-about-blank",
+ "phantomas": "1.15.0",
"ps-node": "0.0.5",
"q": "1.4.1",
- "request": "2.67.0",
- "rimraf": "2.4.4",
+ "request": "2.69.0",
+ "rimraf": "2.5.2",
"temporary": "0.0.8",
"try-thread-sleep": "1.0.0",
- "uglify-js": "2.6.1"
+ "uglify-js": "2.6.2"
},
"devDependencies": {
- "chai": "~3.4.0",
+ "chai": "~3.5.0",
"grunt": "~0.4.5",
"grunt-blanket": "~0.0.10",
- "grunt-contrib-clean": "~0.7.0",
- "grunt-contrib-concat": "~0.5.1",
- "grunt-contrib-copy": "~0.8.2",
- "grunt-contrib-cssmin": "~0.14.0",
- "grunt-contrib-htmlmin": "~0.6.0",
- "grunt-contrib-jshint": "~0.11.3",
- "grunt-contrib-less": "~1.1.0",
- "grunt-contrib-uglify": "~0.11.0",
+ "grunt-contrib-clean": "~1.0.0",
+ "grunt-contrib-concat": "~1.0.0",
+ "grunt-contrib-copy": "~1.0.0",
+ "grunt-contrib-cssmin": "~1.0.1",
+ "grunt-contrib-htmlmin": "~1.1.0",
+ "grunt-contrib-jshint": "~1.0.0",
+ "grunt-contrib-less": "~1.2.0",
+ "grunt-contrib-uglify": "~1.0.1",
"grunt-env": "~0.4.4",
"grunt-express": "~1.4.1",
"grunt-filerev": "~2.3.1",
@@ -74,10 +74,10 @@
"grunt-mocha-test": "~0.12.7",
"grunt-replace": "~0.11.0",
"grunt-usemin": "~3.1.1",
- "grunt-webfont": "~1.1.0",
- "matchdep": "~1.0.0",
- "mocha": "~2.3.2",
- "sinon": "~1.17.2",
+ "grunt-webfont": "~1.2.0",
+ "matchdep": "~1.0.1",
+ "mocha": "~2.4.5",
+ "sinon": "~1.17.3",
"sinon-chai": "~2.8.0"
},
"scripts": {