aboutsummaryrefslogtreecommitdiff
path: root/.hooks
Commit message (Collapse)AuthorAgeFilesLines
* framework: add new hook to validate MOVED linesTobias C. Berner2022-08-231-0/+21
| | | | | | | | | | | | | A possible error message will look like: [pre-commit] ERROR: MOVED contains errors. Please apply the suggested changes: 17537: date going backwards from 2022-08-20 to 2022-08-13 from this line 17538: date going backwards from 2022-08-20 to 2022-08-13 to this line Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D35042
* framework: add hook to notify about lingering 'Created by' linesTobias C. Berner2022-07-201-0/+18
|
* framework: add hook to check indentation of conditionals of Mk/ filesTobias C. Berner2022-04-251-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | This adds a further pre-commit hook to enforce indentations in Mk/* Usage: > vim Mk/Uses/tcl.mk [add/remove some whitespaces between a `.` and an `if`] > git add Mk/Uses/tcl.mk > git commit -m "Mk/Uses/tcl.mk: test hook" [pre-commit] tcl.mk is not properly indented -- please use /tmp/check_indentations-tcl.mk.LShfR7TD48/tcl.mk which was created using Tools/scripts/indent_make_if.pl Reminder: to make use of the hooks provided by the ports tree use the following from [1] Add the prepare-commit-msg hook to the repository. To make use of it, the easiest way is to run: git config --add core.hooksPath .hooks [1] bbc2474ef7a65eb8561c8ecf7af80c2bfed1f248 Reviewed by: portmgr (rene) Differential Revision: https://reviews.freebsd.org/D35041
* framework: create a sub-directory to support multiple pre-commit hooksTobias C. Berner2022-04-242-10/+25
|
* framework: add hook to detect whether new ports are hooked into the treeTobias C. Berner2022-04-131-0/+17
| | | | | | | | | | | | | | | | | | | This pre-commit hook looks for newly added files matching foo/bar/Makefile For these files, it is checking that a SUBDIR+=bar entry is present in foo/Makefile. Example run output: > mkdir -p graphics/test_port > touch graphics/test_port/Makefile > git add graphics/test_port/Makefile > git commit -m "graphics/test_port: not hooked into the build" [pre-commit] ERROR: Missing 'SUBDIR += test_port' in graphics/Makefile This should hopefully help reduce the number of index breakages. Differential Revision: https://reviews.freebsd.org/D34015
* .hooks/prepare-commit-msg: Enhance commit-msg hook.Mathieu Arnold2021-06-041-0/+19
| | | | | If a single port is updated, the hook now pre-fills in an appropriate subject line.
* .hooks/prepare-commit-msg: Cleanup.Mathieu Arnold2021-06-041-3/+8
| | | | | Instead of writing everything in the new commit template all at once in a large here document, do it cleanly one command at a time.
* git hooks: Rework authorship instructions.Mathieu Arnold2021-04-221-2/+4
| | | | | While there, move them upwards so they are not hidden at the far end of the template.
* git hooks: Adjust hooks for the ports treeMateusz Piotrowski2021-04-221-3/+3
| | | | | | | | | | - Capitalize the topic line: this way the example is consistent with the desired style. - Update the description of MFH. - Point the Pull Request field to the ports repo on GitHub. Reviewed by: mat, bapt Differential Revision: https://reviews.freebsd.org/D29861
* Add the prepare-commit-msg hook to the repository.Mathieu Arnold2021-04-201-0/+69
To make use of it, the easiest way is to run: git config --add core.hooksPath .hooks Discussed with: bapt