Expected string got int
kenorb opened this issue · 2 comments
kenorb commented
Config:
- repo: https://github.com/Lucas-C/pre-commit-hooks
sha: v1.1.7
hooks:
- id: forbid-crlf
files: \.groovy$
- id: forbid-tabs
files: \.groovy$
- id: insert-license
files: \.groovy$
- id: remove-crlf
files: \.groovy$
- id: remove-tabs
args: [--whitespaces-count, 2] # Defaults to: 4.
files: \.groovy$
Error on pre-commit run -a
:
An error has occurred: InvalidConfigError:
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='https://github.com/Lucas-C/pre-commit-hooks')
==> At key: hooks
==> At Hook(id='remove-tabs')
==> At key: args
==> At index 1
=====> Expected string got int
Check the log at ~/.cache/pre-commit/pre-commit.log
kenorb commented
Ok, it seems README got it wrong.
Added apostrophes and it works fine:
- id: remove-tabs
args: ['--whitespaces-count', '2'] # Defaults to: 4.
Lucas-C commented
I fixed the README, thanks for reporting this