Skip to content

Commit

Permalink
Merge pull request #2169 from quicksilver/commentblocks
Browse files Browse the repository at this point in the history
Fix check_indent false positives on comment blocks
  • Loading branch information
skurfer committed Jan 23, 2016
2 parents 088e17f + dc228c1 commit 2691bbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Quicksilver/Tools/travis/check_indent.rb
Expand Up @@ -5,10 +5,16 @@

changed_lines = `git diff $TRAVIS_COMMIT_RANGE -- *.[mh]`.split("\n").select { |l| l.start_with? "+" }

comment_block = false

changed_lines.each do |line|
if /^\+ /.match(line) then
if /^\+ /.match(line) and not comment_block then
puts "Invalid line #{line}"
exit 1
elsif /^\+\s*?\/\*\*/.match(line) then
comment_block = true
elsif /^\+\s*?\*\*\//.match(line) then
comment_block = false
end
end

0 comments on commit 2691bbd

Please sign in to comment.