@@ -9,11 +9,11 @@ var fixmeStrings = "'FIXME|TODO|HACK|BUG'";
99
1010// Prints properly structured Issue data to STDOUT according to
1111// Code Climate Engine specification.
12- var printIssue = function ( fileName , lineNum ) {
12+ var printIssue = function ( fileName , lineNum , issue ) {
1313 var issue = {
1414 "type" : "issue" ,
1515 "check_name" : "FIXME found" ,
16- "description" : "Code comment found that needs your attention. ",
16+ "description" : issue + " found ",
1717 "categories" : [ "Bug Risk" ] ,
1818 "location" :{
1919 "path" : fileName ,
@@ -31,7 +31,7 @@ var printIssue = function(fileName, lineNum){
3131
3232var findFixmes = function ( file ) {
3333 // 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 ;
3535
3636 // Execute grep with the FIXME patterns
3737 exec ( grepString , function ( error , stdout , stderr ) {
@@ -48,8 +48,9 @@ var findFixmes = function(file){
4848 // Remove remnants of container paths for external display
4949 var fileName = cols [ 0 ] . split ( "/code/" ) [ 1 ] ;
5050 var lineNum = cols [ 1 ] ;
51-
52- printIssue ( fileName , lineNum ) ;
51+ var issue = cols [ 2 ] ;
52+
53+ printIssue ( fileName , lineNum , issue ) ;
5354 }
5455 } )
5556 } )
0 commit comments