Skip to content

Commit a446cb8

Browse files
authored
refactor: move -i into entry
When looking at prettier-mirror, I noticed that the entry field had the non-changeable options in it as well, like `--write`. Clang-format's equivalent of write is `-i`, and the hook would not do anything interesting without it, so maybe it should be set that way in this one too? One downside is that clang-format explicitly checks, so this will provide an error if anyone is already overriding args and including `-i`: ``` clang-format: for the -i option: may only occur zero or one times! ```
1 parent 9421ac5 commit a446cb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- run: pip install pre-commit-mirror-maker
1616
- run: git config --global user.name 'Github Actions'
1717
- run: git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
18-
- run: pre-commit-mirror . --language=python --package-name=clang-format --types-or c++ --types-or c --types-or 'c#' --types-or 'cuda' --types-or 'java' --types-or 'javascript' --types-or 'json' --types-or 'objective-c' --types-or 'proto' --args=-style=file,-i
18+
- run: pre-commit-mirror . --language=python --package-name=clang-format --entry='clang-format -i' --types-or c++ --types-or c --types-or 'c#' --types-or 'cuda' --types-or 'java' --types-or 'javascript' --types-or 'json' --types-or 'objective-c' --types-or 'proto' --args=-style=file
1919
- run: |
2020
git remote set-url origin https://x-access-token:$GH_TOKEN@github.com/$GITHUB_REPOSITORY
2121
git push origin HEAD:refs/heads/main --tags

0 commit comments

Comments
 (0)