File tree 2 files changed +7
-8
lines changed
lib/overcommit/hook/pre_commit
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 11
11
[ Scalariform] ( https://mdr.github.io/scalariform/ )
12
12
* Add ` SlimLint ` pre-commit hook that analyzes Slim templates with
13
13
[ Slim-Lint] ( https://github.com/sds/slim-lint )
14
- * Enhance ` TrailingWhitespace ` pre-commit hook to including line information in
15
- errors, making it work as expected when ` problem_on_unmodified_line ` is set
16
- to something other than ` report `
14
+ * Enhance ` HardTabs ` and ` TrailingWhitespace ` pre-commit hooks to including
15
+ line information in errors, making it work as expected when
16
+ ` problem_on_unmodified_line ` is set to something other than ` report `
17
17
18
18
## 0.24.0
19
19
Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ module Overcommit::Hook::PreCommit
2
2
# Checks for hard tabs in files.
3
3
class HardTabs < Base
4
4
def run
5
- # Catches hard tabs
6
5
result = execute ( command + applicable_files )
7
- unless result . stdout . empty?
8
- return :fail , "Hard tabs detected:\n #{ result . stdout } "
9
- end
10
6
11
- :pass
7
+ extract_messages (
8
+ result . stdout . split ( "\n " ) ,
9
+ /^(?<file>[^:]+):(?<line>\d +)/ ,
10
+ )
12
11
end
13
12
end
14
13
end
You can’t perform that action at this time.
0 commit comments