diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58320d31a2..acefc35881 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,9 +6,13 @@ through their usage and help ensure your contributions meet our standards. ## The `make pre-commit` tool The `make pre-commit` tool checks library conventions and performs basic tasks. -Before you run it, ensure your new files have been added to the `git` -repository. Installation instructions for the `make pre-commit` tool can be -found [here](HOWTO-INSTALL.md#after-the-setup). +Our installation instructions for the `make pre-commit` tool can be found +[here](HOWTO-INSTALL.md#contributor-setup). + +Before you run the tool, ensure that your files are properly tracked by git by +staging any relevant file additions or deletions. This is what the commands +`git add ` and `git add ` do +respectively. The `make pre-commit` tool can generate errors during the first run while correcting some of them automatically. If all goes well, the second run should @@ -59,9 +63,9 @@ Below is a summary of the tasks this tool performs: multiple of two. If inconsistencies are found, it provides an error report indicating the location of the issues. -- **Fix simply wrappable long lines**: Scans for any lines exceeding the - 80-character limit that can be resolved by inserting line breaks. It inserts - line breaks at the beginning of any definition, but not in the middle of a +- **Wrap long lines**: Scans for any lines exceeding the 80-character limit that + can be resolved by simple rules for inserting line breaks. It inserts line + breaks at the beginning of any definition, but not in the middle of a definition. - **Maximum line length**: Detects any violations of the 80-character line limit @@ -78,6 +82,12 @@ Below is a summary of the tasks this tool performs: library. This file is also regenerated by `make check` each time it's run. No manual maintenance is required for this file. +**Note**: The previous two hooks only detect tracked files. This means that if +you add or delete files, they must be staged for these hooks to take these +changes into consideration. This gives you finer control over your commits. For +instance, if a file is not ready to be committed, you can still use the +pre-commit tool and just not stage that file. +