Skip to content

Commit 9b40f75

Browse files
committed
[improvement] Round maintainability value
1 parent 5edd35d commit 9b40f75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/analyse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = function analyse (fileRef){
3333
escapedPath : fileRef.replace(/\\/g, '\\'), // windows use
3434
complexity : report.aggregate.cyclomatic,
3535
lineNumber : report.aggregate.sloc.logical,
36-
maintainability : report.aggregate.halstead.effort,
36+
maintainability : Math.round(report.aggregate.halstead.effort),
3737
halstead : {
3838
length : report.aggregate.halstead.length,
3939
vocabulary : Math.round(report.aggregate.halstead.vocabulary),

test/expectations/complex-tree-results.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"escapedPath": "test/fixture/complex/jquery/jquery-2.0.3.js",
66
"complexity": 1468,
77
"lineNumber": 4432,
8-
"maintainability": 84188538.2899597,
8+
"maintainability": 84188538,
99
"halstead": { "length": 28743, "vocabulary": 1648, "difficulty": 274, "bugs": 102 }
1010
},
1111
{
1212
"path": "test/fixture/complex/jquery/min/jquery-2.0.3.min.js",
1313
"escapedPath": "test/fixture/complex/jquery/min/jquery-2.0.3.min.js",
1414
"complexity": 1195,
1515
"lineNumber": 2825,
16-
"maintainability": 104949017.78561088,
16+
"maintainability": 104949018,
1717
"halstead": { "length": 28696, "vocabulary": 1262, "difficulty": 355, "bugs": 99 }
1818
},
1919
{

0 commit comments

Comments
 (0)