Move ignores to ruff.toml

This commit is contained in:
Jeremy Stretch 2024-10-10 17:07:18 -04:00
parent 3758391ecd
commit 296e8f4fa7
4 changed files with 5 additions and 3 deletions

View File

@ -85,7 +85,7 @@ jobs:
run: python netbox/manage.py makemigrations --check run: python netbox/manage.py makemigrations --check
- name: Check PEP8 compliance - name: Check PEP8 compliance
run: ruff check netbox/ --ignore E501,F403,F405 run: ruff check netbox/
- name: Check UI ESLint, TypeScript, and Prettier Compliance - name: Check UI ESLint, TypeScript, and Prettier Compliance
run: yarn --cwd netbox/project-static validate run: yarn --cwd netbox/project-static validate

View File

@ -25,7 +25,7 @@ NetBox generally follows the [Django style guide](https://docs.djangoproject.com
The [ruff](https://docs.astral.sh/ruff/) linter is used to enforce code style. A [pre-commit hook](./getting-started.md#3-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `ruff` manually, run: The [ruff](https://docs.astral.sh/ruff/) linter is used to enforce code style. A [pre-commit hook](./getting-started.md#3-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `ruff` manually, run:
``` ```
ruff check netbox/ --ignore E501,F403,F405 ruff check netbox/
``` ```
#### Linter Exceptions #### Linter Exceptions

2
ruff.toml Normal file
View File

@ -0,0 +1,2 @@
[lint]
ignore = ["E501", "F403", "F405"]

View File

@ -29,7 +29,7 @@ if [ ${NOVALIDATE} ]; then
fi fi
echo "Linting with ruff..." echo "Linting with ruff..."
ruff check netbox/ --ignore E501,F403,F405 ruff check netbox/
if [ $? != 0 ]; then if [ $? != 0 ]; then
EXIT=1 EXIT=1
fi fi