ci: use GitLab Code Quality for linting tests
This commit is contained in:
parent
c98028136a
commit
90b82ea7e6
2
.bandit
2
.bandit
@ -1,3 +1,3 @@
|
|||||||
[bandit]
|
[bandit]
|
||||||
skips: B110,B404,B408,B603,B607
|
skips: B110,B404,B408,B603,B607,B322
|
||||||
targets: .
|
targets: .
|
||||||
|
@ -222,7 +222,7 @@ lint_format_bandit_checks:
|
|||||||
python3-pip
|
python3-pip
|
||||||
python3-yaml
|
python3-yaml
|
||||||
shellcheck
|
shellcheck
|
||||||
- $pip install --break-system-packages bandit
|
- $pip install --break-system-packages bandit pylint-gitlab
|
||||||
- export EXITVALUE=0
|
- export EXITVALUE=0
|
||||||
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
||||||
- ./hooks/pre-commit || set_error
|
- ./hooks/pre-commit || set_error
|
||||||
@ -231,16 +231,21 @@ lint_format_bandit_checks:
|
|||||||
-ii
|
-ii
|
||||||
--ini .bandit
|
--ini .bandit
|
||||||
|| set_error
|
|| set_error
|
||||||
- pylint --output-format=colorized --reports=n
|
- pylint --output-format=pylint_gitlab.GitlabCodeClimateReporter
|
||||||
fdroid
|
fdroid
|
||||||
makebuildserver
|
makebuildserver
|
||||||
setup.py
|
setup.py
|
||||||
fdroidserver/*.py
|
fdroidserver/*.py
|
||||||
tests/*.py
|
tests/*.py
|
||||||
|
> pylint-report.json
|
||||||
|| set_error
|
|| set_error
|
||||||
- shellcheck --exclude SC2046,SC2090 --severity=warning --color tests/run-tests
|
- shellcheck --exclude SC2046,SC2090 --severity=warning --color tests/run-tests
|
||||||
|| set_error
|
|| set_error
|
||||||
- exit $EXITVALUE
|
- exit $EXITVALUE
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
codequality: pylint-report.json
|
||||||
|
when: always
|
||||||
|
|
||||||
|
|
||||||
# Check all the dependencies in Debian to mirror production. CVEs are
|
# Check all the dependencies in Debian to mirror production. CVEs are
|
||||||
|
Loading…
x
Reference in New Issue
Block a user