check-case-conflict
Check for files with names that would conflict on a case-insensitive
filesystem like MacOS HFS+ or Windows FAT.
check-merge-conflict
Check for files that contain merge conflict strings.
check-symlinks
Checks for symlinks which do not point to anything.
To allow a gradual improvement of the code base while carefully reviewing
each changes, exceptions for all issues reported by locally running the
following command are listed in .flake8 configuration files:
This pull-request adds workflow leveraging pre-commit, a framework for managing and maintaining pre-commit hooks.
See https://pre-commit.com/ and https://github.com/pre-commit/action
Running the pre-commit locally can be done using the following command:
The hooks enabled in the "pre-commit-config.yaml" configuration file are:
check-added-large-files
Prevent giant files from being committed.Set the size to 1024 to match the value hard-coded in https://github.com/Slicer/Slicer/blob/hooks/pre-commit#L125
check-case-conflict
Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.check-merge-conflict
Check for files that contain merge conflict strings.check-symlinks
Checks for symlinks which do not point to anything.To allow a gradual improvement of the code base while carefully reviewing each changes, exceptions for all issues reported by locally running the following command are listed in
.flake8
configuration files:It is based from similar updates integrated in Slicer through https://github.com/Slicer/Slicer/pull/6262 themselves adapted from prior work done by @henryiii in https://github.com/scikit-build/scikit-build and https://scikit-hep.org/developer/style