-
I've read through the documentation under the pre-commit hook section and I've attempted to get a check/format pre-commit script to work, but have not been successful. Can somebody provide more specific steps that explain how to configure the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
To my knowledge, includeonly is just a list of files that should be formatted. There is no option to to apply the formatting only to changed/staged files. Is that what you are trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
You will have to ask |
Beta Was this translation helpful? Give feedback.
-
This is the pre-commit script that I have pulled together. It doesn't work because "--include-only" doesn't work like I have it. I have the list of files delimited by ':', but I get an error that the "--include-only" option doesn't exist. If I remove "--include-only=$CHANGED_FILES" from the two lines that invoke ktfmt, then it works. However, it will check the whole project which can be slow.
|
Beta Was this translation helpful? Give feedback.
This is the pre-commit script that I have pulled together. It doesn't work because "--include-only" doesn't work like I have it. I have the list of files delimited by ':', but I get an error that the "--include-only" option doesn't exist.
If I remove "--include-only=$CHANGED_FILES" from the two lines that invoke ktfmt, then it works. However, it will check the whole project which can be slow.