daipom commented on code in PR #2864:
URL: https://github.com/apache/arrow-adbc/pull/2864#discussion_r2107997974
##########
.pre-commit-config.yaml:
##########
@@ -131,5 +131,10 @@ repos:
- id: fmt
name: rustfmt
args: ["--all", "--manifest-path", "rust/Cargo.toml", "--"]
+ - repo: https://github.com/codespell-project/codespell
+ rev: 63c8f8312b7559622c0d82815639671ae42132ac # v2.4.1
+ hooks:
+ - id: codespell
+ args: ["--ignore-words", ".codespell-ignore"]
Review Comment:
Thanks for your review!
The following error occurs with that config.
(Of course, I have removed `--ignore-words` arg from
`.pre-commit-config.yaml`)
```
ERROR: ill-formed config file: While reading from '.codespellrc' [line 3]:
option 'ignore-words-list' in section 'codespell' already exists
```
If using a config file, then it would be as follows.
(https://github.com/codespell-project/codespell?tab=readme-ov-file#using-a-config-file)
```
[codespell]
ignore-words-list = errorprone, gir
```
Each method has different advantages.
* The advantage of `.codespellrc`
* We don't need to specify args because codespell will automatically read
the config.
* The config works when using `codespell` command directly.
* However, it would be difficult to match the result with `pre-commit`.
* When running `codespell` via `pre-commit`, it is affected by settings
such as
[`exclude`](https://github.com/apache/arrow-adbc/blob/f6479fe9183d7c6fe97a26894ce82b77d8362fa5/.pre-commit-config.yaml#L135).
* The advantage of `--ignore-words FILE`
* We can add a word per line.
I thought that if we manage many words, `--ignore-words FILE` would be
preferable.
What do you think about this point?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]