Open ghost opened 7 years ago
@jhabdas I wanted to let you know that @stevegrunwell is AFK for the next week, so he may be a bit delayed in his responses.
@bswatson thanks for the heads up. 👌 i'll just keep riffing on my fork and see where I can get
@jhabdas Mind clarifying which package's -c
option you're talking about? Neither WP Enforcer nor PHP_CodeSniffer have a -c
, and the hard-coded check is to see whether or not a phpcs.xml
file (the filename specified in the PHP_CodeSniffer docs for a default ruleset and the file created when WP Enforcer is installed) exists.
The pre-commit hook is not meant to be run interactively or accept varying options, as it's run automatically when a user attempts to commit to the repository.
Am I missing something here?
-c is the shorthand notation for --config as is currently used in the enforcer CLI IIRC. Hope that helps.
https://github.com/stevegrunwell/wp-enforcer/blob/develop/bin/hooks/pre-commit#L9
This line is hard-coded and does not respect the
-c
flag of the CLI.The above needs to be updated to accept an arg when
-c
is set in the CLI.