Skip to content

Commit 28e4ae4

Browse files
committed
Lint the syntax of changes
1 parent 493fc60 commit 28e4ae4

File tree

7 files changed

+67
-4
lines changed

7 files changed

+67
-4
lines changed

.ecrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"Verbose": false,
3+
"Debug": false,
4+
"IgnoreDefaults": false,
5+
"SpacesAftertabs": false,
6+
"NoColor": false,
7+
"Exclude": [
8+
"LICENSE",
9+
"\\.initializers",
10+
"\\.vscode"
11+
],
12+
"AllowedContentTypes": [],
13+
"PassedFiles": [],
14+
"Disable": {
15+
// set these options to true to disable specific checks
16+
"EndOfLine": false,
17+
"Indentation": false,
18+
"InsertFinalNewline": false,
19+
"TrimTrailingWhitespace": false,
20+
"IndentSize": true,
21+
"MaxLineLength": false
22+
}
23+
}

.flake8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
max-line-length = 100
3+
extend-ignore = E203, W503
4+
per-file-ignores =
5+
configuration/*:E131,E251,E266,E302,E305,E501,E722
6+
startup_scripts/startup_script_utils/__init__.py:F401
7+
docker/*:E266,E722

.github/workflows/push.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,28 @@ on:
99
- release
1010

1111
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
name: Checks syntax of our code
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v2
18+
- name: Lint Code Base
19+
uses: github/super-linter@v3
20+
env:
21+
DEFAULT_BRANCH: develop
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
SUPPRESS_POSSUM: true
24+
LINTER_RULES_PATH: /
25+
VALIDATE_ALL_CODEBASE: false
26+
VALIDATE_DOCKERFILE: false
27+
28+
EDITORCONFIG_FILE_NAME: .ecrc
29+
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
30+
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
31+
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
32+
PYTHON_FLAKE8_CONFIG_FILE: .flake8
33+
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
1234
build:
1335
continue-on-error: ${{ matrix.docker_from == 'alpine:edge' }}
1436
strategy:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ configuration/*
99
configuration/ldap/*
1010
!configuration/ldap/ldap_config.py
1111
prometheus.yml
12+
super-linter.log

.hadolint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignored:
2+
- DL3006
3+
- DL3018

.markdown-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MD013: false
2+
MD041: false

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[tool.black]
2-
line-length = 100
2+
line_length = 100
33
target-version = ['py38']
44
include = '\.pyi?$'
55
exclude = '''
6-
76
(
87
/(
9-
\.eggs # exclude a few common directories in the
10-
| \.git # root of the project
8+
\.git
119
| \.venv
1210
| \.netbox
1311
| \.vscode
@@ -19,3 +17,10 @@ exclude = '''
1917
[tool.isort]
2018
profile = "black"
2119
multi_line_output = 3
20+
line_length = 100
21+
22+
[tool.pylint.messages_control]
23+
disable = "C0330, C0326"
24+
25+
[tool.pylint.format]
26+
max-line-length = "100"

0 commit comments

Comments
 (0)