|
| 1 | +# Copyright 2010 New Relic, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# To install, run: |
| 16 | +# pip install --upgrade pre-commit |
| 17 | +# pre-commit install --install-hooks |
| 18 | +# |
| 19 | +# To change this file for local use without git picking it up, you can mark it with: |
| 20 | +# git update-index --assume-unchanged .pre-commit-config.yaml |
| 21 | +# |
| 22 | +# To revert that, you can use: |
| 23 | +# git update-index --no-assume-unchanged .pre-commit-config.yaml |
| 24 | + |
| 25 | +default_install_hook_types: |
| 26 | + - pre-commit |
| 27 | + - pre-push |
| 28 | + |
| 29 | +repos: |
| 30 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 31 | + # Ruff version. |
| 32 | + rev: v0.11.5 |
| 33 | + hooks: |
| 34 | + # Run the linter. |
| 35 | + - id: ruff |
| 36 | + args: [--fix] |
| 37 | + stages: [pre-push] |
| 38 | + # Run the formatter. |
| 39 | + - id: ruff-format |
| 40 | + stages: [pre-push] |
| 41 | + |
| 42 | + - repo: https://github.com/google/addlicense |
| 43 | + rev: 55a521bf81c24480094950caa3566548fa63875e |
| 44 | + hooks: |
| 45 | + - id: addlicense |
| 46 | + args: |
| 47 | + [ |
| 48 | + "-f", |
| 49 | + "./.github/LICENSE_HEADER", |
| 50 | + "-ignore", |
| 51 | + "newrelic/packages/**/*", |
| 52 | + ] |
| 53 | + stages: [pre-push] |
0 commit comments