mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-24 00:43:38 +01:00
Lint the syntax of changes
This commit is contained in:
parent
493fc60401
commit
28e4ae44fb
23
.ecrc
Normal file
23
.ecrc
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Verbose": false,
|
||||||
|
"Debug": false,
|
||||||
|
"IgnoreDefaults": false,
|
||||||
|
"SpacesAftertabs": false,
|
||||||
|
"NoColor": false,
|
||||||
|
"Exclude": [
|
||||||
|
"LICENSE",
|
||||||
|
"\\.initializers",
|
||||||
|
"\\.vscode"
|
||||||
|
],
|
||||||
|
"AllowedContentTypes": [],
|
||||||
|
"PassedFiles": [],
|
||||||
|
"Disable": {
|
||||||
|
// set these options to true to disable specific checks
|
||||||
|
"EndOfLine": false,
|
||||||
|
"Indentation": false,
|
||||||
|
"InsertFinalNewline": false,
|
||||||
|
"TrimTrailingWhitespace": false,
|
||||||
|
"IndentSize": true,
|
||||||
|
"MaxLineLength": false
|
||||||
|
}
|
||||||
|
}
|
7
.flake8
Normal file
7
.flake8
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[flake8]
|
||||||
|
max-line-length = 100
|
||||||
|
extend-ignore = E203, W503
|
||||||
|
per-file-ignores =
|
||||||
|
configuration/*:E131,E251,E266,E302,E305,E501,E722
|
||||||
|
startup_scripts/startup_script_utils/__init__.py:F401
|
||||||
|
docker/*:E266,E722
|
22
.github/workflows/push.yml
vendored
22
.github/workflows/push.yml
vendored
@ -9,6 +9,28 @@ on:
|
|||||||
- release
|
- release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Checks syntax of our code
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
- name: Lint Code Base
|
||||||
|
uses: github/super-linter@v3
|
||||||
|
env:
|
||||||
|
DEFAULT_BRANCH: develop
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SUPPRESS_POSSUM: true
|
||||||
|
LINTER_RULES_PATH: /
|
||||||
|
VALIDATE_ALL_CODEBASE: false
|
||||||
|
VALIDATE_DOCKERFILE: false
|
||||||
|
|
||||||
|
EDITORCONFIG_FILE_NAME: .ecrc
|
||||||
|
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
|
||||||
|
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
|
||||||
|
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
|
||||||
|
PYTHON_FLAKE8_CONFIG_FILE: .flake8
|
||||||
|
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
|
||||||
build:
|
build:
|
||||||
continue-on-error: ${{ matrix.docker_from == 'alpine:edge' }}
|
continue-on-error: ${{ matrix.docker_from == 'alpine:edge' }}
|
||||||
strategy:
|
strategy:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ configuration/*
|
|||||||
configuration/ldap/*
|
configuration/ldap/*
|
||||||
!configuration/ldap/ldap_config.py
|
!configuration/ldap/ldap_config.py
|
||||||
prometheus.yml
|
prometheus.yml
|
||||||
|
super-linter.log
|
||||||
|
3
.hadolint.yaml
Normal file
3
.hadolint.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ignored:
|
||||||
|
- DL3006
|
||||||
|
- DL3018
|
2
.markdown-lint.yml
Normal file
2
.markdown-lint.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
MD013: false
|
||||||
|
MD041: false
|
@ -1,13 +1,11 @@
|
|||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 100
|
line_length = 100
|
||||||
target-version = ['py38']
|
target-version = ['py38']
|
||||||
include = '\.pyi?$'
|
include = '\.pyi?$'
|
||||||
exclude = '''
|
exclude = '''
|
||||||
|
|
||||||
(
|
(
|
||||||
/(
|
/(
|
||||||
\.eggs # exclude a few common directories in the
|
\.git
|
||||||
| \.git # root of the project
|
|
||||||
| \.venv
|
| \.venv
|
||||||
| \.netbox
|
| \.netbox
|
||||||
| \.vscode
|
| \.vscode
|
||||||
@ -19,3 +17,10 @@ exclude = '''
|
|||||||
[tool.isort]
|
[tool.isort]
|
||||||
profile = "black"
|
profile = "black"
|
||||||
multi_line_output = 3
|
multi_line_output = 3
|
||||||
|
line_length = 100
|
||||||
|
|
||||||
|
[tool.pylint.messages_control]
|
||||||
|
disable = "C0330, C0326"
|
||||||
|
|
||||||
|
[tool.pylint.format]
|
||||||
|
max-line-length = "100"
|
||||||
|
Loading…
Reference in New Issue
Block a user