Closed oleksiireshetnik closed 8 years ago
Hey @getupandgo,
All pre-commit hooks support the flags
option, allowing you to specify the list of flags passed to the command.
Looking at the default configuration for Semistandard:
SemiStandard:
enabled: false
description: 'Analyze with semistandard'
required_executable: 'semistandard'
flags: ['--verbose']
install_command: 'npm install -g semistandard'
include: '**/*.js'
...you can easily add the --fix
flag to the flags
option. Therefore your .overcommit.yml
will look like:
PreCommit:
SemiStandard:
enabled: true
flags: ['--verbose', '--fix']
This is documented in the Hook Options section of the README.
That did a trick. Thanks a lot!
I want to run semistandard's code style fix procedure before each commit (so i can disregard trailing spaces errors and similar stuff). Can i achieve this behaviour now?