aboutsummaryrefslogtreecommitdiffhomepage
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-12 19:57:07 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-12 19:57:07 -0700
commit706bfa70c144775126e15a960028d3b3df7980fb (patch)
tree77e4ff95eef76156bde08cc7cc36c6c8bee24588 /CONTRIBUTING.md
parent8e103c231e74a3dda40d0a0e5a844ea8b6aa1e4b (diff)
improve the style.fish script
If there are uncommitted changes use `git-clang-format` to limit the style fixups to the lines being modified. Refuse to do a `make style-all` if there are uncommitted changes. Include a fix for the parsing of `git status` output that was recently incorporated into the lint.fish script.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2c847319..e73bc344 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,7 +40,9 @@ The following sections discuss the specific rules for the style that should be u
make style
```
-before commiting your change. If you've already committed your changes that's okay since it will then check the files in the most recent commit. This can be useful after you've merged someone elses change and want to check that it's style is acceptable.
+before commiting your change. That will run `git-clang-format` to rewrite just the lines you're modifying.
+
+If you've already committed your changes that's okay since it will then check the files in the most recent commit. This can be useful after you've merged someone elses change and want to check that it's style is acceptable. However, in that case it will run `clang-format` to ensure the entire file, not just the lines modified by the commit, conform to the style.
If you want to check the style of the entire code base run
@@ -48,6 +50,8 @@ If you want to check the style of the entire code base run
make style-all
```
+That command will refuse to restyle any files if you have uncommitted changes.
+
### Suppressing Reformatting of the Code
If you have a good reason for doing so you can tell `clang-format` to not reformat a block of code by enclosing it in comments like this: