| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| --- |
| repos: |
| - repo: meta |
| hooks: |
| - id: identity |
| name: run identity check |
| description: check you have set your git identity |
| - id: check-hooks-apply |
| name: run check hooks apply |
| description: check that all the hooks apply to the repository |
| - repo: https://github.com/pre-commit/pre-commit-hooks |
| rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0 |
| hooks: |
| - id: check-ast |
| name: run check-ast |
| description: check Python files for syntax errors |
| - id: check-builtin-literals |
| name: run check-builtin-literals |
| description: check Python files for proper use of built-in literals |
| - id: check-case-conflict |
| name: run check-case-conflict |
| description: check for case conflicts in file names |
| - id: check-executables-have-shebangs |
| name: run check-executables-have-shebangs |
| description: check that executable scripts have shebang lines |
| - id: check-illegal-windows-names |
| name: run check-illegal-windows-names |
| description: check for Windows-illegal file names |
| - id: check-json |
| name: run check-json |
| description: check JSON files for syntax errors |
| - id: check-merge-conflict |
| name: run check-merge-conflict |
| description: check for merge conflict markers |
| - id: check-shebang-scripts-are-executable |
| name: run check-shebang-scripts-are-executable |
| description: check that scripts with shebangs are executable |
| - id: check-toml |
| name: run check-toml |
| description: check TOML files for syntax errors |
| - id: check-vcs-permalinks |
| name: run check-vcs-permalinks |
| description: ensures that links to vcs websites are permalinks |
| - id: check-xml |
| name: run check-xml |
| description: attempts to load all xml files to verify syntax |
| - id: check-yaml |
| name: run check-yaml |
| description: attempts to load all yaml files to verify syntax |
| - id: debug-statements |
| name: run debug-statements |
| description: check for debugger imports and py37+ `breakpoint()` calls in python source. |
| - id: destroyed-symlinks |
| name: run destroyed-symlinks |
| description: detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to |
| - id: detect-aws-credentials |
| name: run detect-aws-credentials |
| description: checks for the existence of AWS secrets that you have set up with the AWS CLI |
| args: [--allow-missing-credentials] |
| - id: detect-private-key |
| name: run detect-private-key |
| description: checks for the existence of private keys |
| - id: end-of-file-fixer |
| name: run end-of-file-fixer |
| description: makes sure files end in a newline and only a newline |
| - id: fix-byte-order-marker |
| name: run fix-byte-order-marker |
| description: removes UTF-8 byte order marker |
| - id: forbid-submodules |
| name: run forbid-submodules |
| description: forbids any submodules in the repository |
| - id: requirements-txt-fixer |
| name: run requirements-txt-fixer |
| description: sorts entries in the Python requirements files and removes incorrect entry for pkg-resources==0.0.0 |
| files: ^docs/requirements\.txt$ |
| - id: mixed-line-ending |
| name: run mixed-line-ending |
| description: replaces or checks mixed line ending |
| - id: trailing-whitespace |
| name: run trailing-whitespace |
| description: trims trailing whitespace |
| args: [--markdown-linebreak-ext=md] |
| - repo: https://github.com/codespell-project/codespell |
| rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2 |
| hooks: |
| - id: codespell |
| name: run codespell |
| description: Check spelling with codespell |
| args: [--ignore-words=.github/linters/codespell.txt] |
| exclude: \.svg$|^spatialbench/src/dists\.dss$|^spatialbench/src/q_and_a/answers_sf1\.rs$ |
| - repo: https://github.com/gitleaks/gitleaks |
| rev: 83d9cd684c87d95d656c1458ef04895a7f1cbd8e # frozen: v8.30.1 |
| hooks: |
| - id: gitleaks |
| name: run gitleaks |
| description: check for secrets with gitleaks |
| - repo: https://github.com/oxipng/oxipng |
| rev: 628e241e23f368097883807fa6e985ccf7c00357 # frozen: v10.1.1 |
| hooks: |
| - id: oxipng |
| name: run oxipng |
| description: check PNG files with oxipng |
| args: ['--fix', '-o', '4', '--strip', 'safe', '--alpha'] |