@@ -9,11 +9,11 @@ var fixmeStrings = "'FIXME|TODO|HACK|BUG'";
9
9
10
10
// Prints properly structured Issue data to STDOUT according to
11
11
// Code Climate Engine specification.
12
- var printIssue = function ( fileName , lineNum ) {
12
+ var printIssue = function ( fileName , lineNum , issue ) {
13
13
var issue = {
14
14
"type" : "issue" ,
15
15
"check_name" : "FIXME found" ,
16
- "description" : "Code comment found that needs your attention. ",
16
+ "description" : issue + " found ",
17
17
"categories" : [ "Bug Risk" ] ,
18
18
"location" :{
19
19
"path" : fileName ,
@@ -31,7 +31,7 @@ var printIssue = function(fileName, lineNum){
31
31
32
32
var findFixmes = function ( file ) {
33
33
// Prepare the grep string for execution (uses BusyBox grep)
34
- var grepString = "grep -inH -E " + fixmeStrings + " " + file ;
34
+ var grepString = "grep -inHo -E " + fixmeStrings + " " + file ;
35
35
36
36
// Execute grep with the FIXME patterns
37
37
exec ( grepString , function ( error , stdout , stderr ) {
@@ -48,8 +48,9 @@ var findFixmes = function(file){
48
48
// Remove remnants of container paths for external display
49
49
var fileName = cols [ 0 ] . split ( "/code/" ) [ 1 ] ;
50
50
var lineNum = cols [ 1 ] ;
51
-
52
- printIssue ( fileName , lineNum ) ;
51
+ var issue = cols [ 2 ] ;
52
+
53
+ printIssue ( fileName , lineNum , issue ) ;
53
54
}
54
55
} )
55
56
} )
0 commit comments