|
| 1 | +# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# |
| 3 | +# Redistribution and use in source and binary forms, with or without |
| 4 | +# modification, are permitted provided that the following conditions |
| 5 | +# are met: |
| 6 | +# * Redistributions of source code must retain the above copyright |
| 7 | +# notice, this list of conditions and the following disclaimer. |
| 8 | +# * Redistributions in binary form must reproduce the above copyright |
| 9 | +# notice, this list of conditions and the following disclaimer in the |
| 10 | +# documentation and/or other materials provided with the distribution. |
| 11 | +# * Neither the name of NVIDIA CORPORATION nor the names of its |
| 12 | +# contributors may be used to endorse or promote products derived |
| 13 | +# from this software without specific prior written permission. |
| 14 | +# |
| 15 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY |
| 16 | +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 19 | +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 | +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 | +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 | +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 | +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 | +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | + |
| 27 | +repos: |
| 28 | +- repo: https://github.com/timothycrosley/isort |
| 29 | + rev: 5.12.0 |
| 30 | + hooks: |
| 31 | + - id: isort |
| 32 | + additional_dependencies: [toml] |
| 33 | +- repo: https://github.com/psf/black |
| 34 | + rev: 23.1.0 |
| 35 | + hooks: |
| 36 | + - id: black |
| 37 | + types_or: [python, cython] |
| 38 | +- repo: https://github.com/PyCQA/flake8 |
| 39 | + rev: 5.0.4 |
| 40 | + hooks: |
| 41 | + - id: flake8 |
| 42 | + args: [--max-line-length=88, --select=C,E,F,W,B,B950, --extend-ignore = E203,E501] |
| 43 | + types_or: [python, cython] |
| 44 | +- repo: https://github.com/pre-commit/mirrors-clang-format |
| 45 | + rev: v16.0.5 |
| 46 | + hooks: |
| 47 | + - id: clang-format |
| 48 | + types_or: [c, c++, cuda, proto, textproto, java] |
| 49 | + args: ["-fallback-style=none", "-style=file", "-i"] |
| 50 | +- repo: https://github.com/codespell-project/codespell |
| 51 | + rev: v2.2.4 |
| 52 | + hooks: |
| 53 | + - id: codespell |
| 54 | + additional_dependencies: [tomli] |
| 55 | + args: ["--toml", "pyproject.toml"] |
| 56 | + exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) |
| 57 | +# More details about these pre-commit hooks here: |
| 58 | +# https://pre-commit.com/hooks.html |
| 59 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 60 | + rev: v4.4.0 |
| 61 | + hooks: |
| 62 | + - id: check-case-conflict |
| 63 | + - id: check-executables-have-shebangs |
| 64 | + - id: check-merge-conflict |
| 65 | + - id: check-json |
| 66 | + - id: check-toml |
| 67 | + - id: check-yaml |
| 68 | + - id: check-shebang-scripts-are-executable |
| 69 | + - id: end-of-file-fixer |
| 70 | + types_or: [c, c++, cuda, proto, textproto, java, python] |
| 71 | + - id: mixed-line-ending |
| 72 | + - id: requirements-txt-fixer |
| 73 | + - id: trailing-whitespace |
0 commit comments