diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fd8b3c4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +# .pre-commit-config.yaml +# This file contains the configuration for pre-commit hooks. +# Each hook helps maintain code quality by running automated checks before commits. +# +exclude: '(\..*\.y[a]?ml|\.github/workflows)' +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: no-commit-to-branch + args: ['--branch', 'main'] # prevent local commits to main branch + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-yaml + - id: check-json + - id: check-toml + - id: check-ast + - id: debug-statements + - repo: https://github.com/gitleaks/gitleaks + rev: v8.18.2 + hooks: + - id: gitleaks + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + types_or: [json, toml, yaml, markdown] diff --git a/README.md b/README.md index 4f7cc99..63cc3cd 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ the website and what format your ask for the IP address to be returned in. ### Issues and feature requests -You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by [submitting an issue on GitHub](https://github.com/mauvehed/yourip/issues). Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed! +You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by [submitting an issue on GitHub](https://github.com/mauvehed/yourip/issues). Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed! Please try to create bug reports that are: diff --git a/app/templates/index.html b/app/templates/index.html index fb01e6f..16be884 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -12,4 +12,4 @@

{{ my_ip_is }}

- \ No newline at end of file + diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 9769ba6..68f1d4c 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,4 +1,3 @@ - # Contributor Covenant Code of Conduct ## Our Pledge @@ -18,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or advances of +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 929dfcd..e37d35f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -73,8 +73,6 @@ docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d This command uses both docker-compose.yml and docker-compose.debug.yml to start the container in detached mode with development settings. - - ## Running Tests We use pytest for testing. To run tests: