Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
require 'face_control/checkers/rubocop' | ||
require 'face_control/checkers/coffeelint' | ||
require 'face_control/checkers/comments' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'face_control/comment' | ||
|
||
module FaceControl | ||
module Checkers | ||
class Comments | ||
def relevant_globs | ||
%w(*.rb) | ||
end | ||
|
||
def command(filenames) | ||
"grep -inEH '(todo|fixme)' #{filenames}" | ||
end | ||
|
||
def parse(command_output) | ||
comments = [] | ||
unless command_output.empty? | ||
command_output.each_line do |line| | ||
file, line_num, description = line.split(":", 3) | ||
comments.push( | ||
Comment.new( | ||
file: file, | ||
line: line_num, | ||
text: "File includes the annotation keyword: #{description}" | ||
) | ||
) | ||
end | ||
end | ||
comments | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Foo | ||
# FIXME: incorrect format of annotation keyword | ||
# TODO: something | ||
def something | ||
"something" | ||
end | ||
end |