Skip to content

Commit

Permalink
Mention using 'arc lint' to try to autofix, when git commit gets you …
Browse files Browse the repository at this point in the history
…down.

Suggested by jlfwong.

Auditors: jlfwong

Test plan:
I wrote a js file with some lint errors (missing semicolon, etc) and
'git add'ed it, then ran 'git commit -am test', and it said:
```
...
--- 18 lint errors ---
Commit message saved to .git/commit.save
Running `arc lint` may help to autofix the errors.
Use "git recommit -a" when the errors are fixed, to re-use this commit message.
```
  • Loading branch information
csilvers committed Oct 16, 2015
1 parent de33f76 commit b60a05f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions githook.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def main(commit_message_file):
num_errors = lint_errors + msg_errors

if lint_errors:
recommendation = ('Use "git recommit -a" when the errors'
' are fixed, to re-use this commit message')
recommendation = ('Running `arc lint` may help to autofix the errors.'
'\nUse "git recommit -a" when the errors'
' are fixed, to re-use this commit message.')
elif msg_errors:
recommendation = ('Use "git commit -a --template .git/commit.save"'
' to commit with a fixed message.')
Expand Down

0 comments on commit b60a05f

Please sign in to comment.