-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit Git hooks to manage code style & QA during development (…
…#79) * Add pre-commit to dev env for code style & QA mgmt Added the pre-commit library into the development environment YAML file and added the associated dependencies into the requirements.txt file. * Add pre-commit configuration file Add a new .pre-commit-config.yaml file which lists several predefined Git pre-commit hooks and also includes a hook for code formatting with black. This setup aims at enhancing code quality by setting up code style checking before every commit. * Delete trailing whitespace * Add end of file newlines * Update documentation re: pre-commit usage This update replaces the documentation and guidance for using the `black` code formatting tool with new instructions for using Git pre-commit hooks. It provides the process for installing and using `pre-commit` in a newly cloned repo to ensure consistent styling and quality across code, documentation, and repository management. This includes the use of 'black' for code formatting.
- Loading branch information
1 parent
fc4eb8a
commit 73acf7f
Showing
8 changed files
with
27,430 additions
and
27,405 deletions.
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,21 @@ | ||
# Git pre-commit hooks config file | ||
# Only takes effect if you have pre-commit installed in the env, | ||
# and after you run `pre-commit install` | ||
# | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
# Out-of-the-box hooks from the pre-commit org | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
# Code formatting with black | ||
- repo: https://github.com/psf/black | ||
rev: 24.4.1 | ||
hooks: | ||
- id: black |
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
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
2 changes: 1 addition & 1 deletion
2
salishsea_site/static/css/bootswatch-3.3.7/superhero/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.