Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document pre-commit hook and its bypass (issue #236)
- Loading branch information
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Developing | ||
|
||
Running `make dev` does the following: | ||
|
||
1. Installs some additional opam packages useful for developing. | ||
2. Installs a Git pre-commit hook for ocp-indent (see below). | ||
|
||
## Git | ||
### Pre-commit hook | ||
The pre-commit hook installed by `make dev` runs ocp-indent on the staged changes to check that they're correctly indented. | ||
If it deems something incorrectly indented, it will output a diff showing where and how, and it will prevent the commit. | ||
In VSCode you have to click "Show Command Output" in the error popup to see the diff. | ||
|
||
If necessary (e.g. you think ocp-indent is wrong or wants you to fix unrelated code), the hook can be bypassed using `git commit -n`. | ||
In such case also let us know about the inconvenience on the following GitHub issue, so we can work towards improving the process: <https://github.com/goblint/analyzer/issues/236>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters