Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
python-nbxmpp
Commits
f2189e13
Commit
f2189e13
authored
Apr 02, 2022
by
Philipp Hörist
Browse files
ci: Move pylint check into own script
parent
5f0e1da0
Changes
2
Hide whitespace changes
Inline
Side-by-side
.ci/pylint-test.py
0 → 100755
View file @
f2189e13
#!/usr/bin/env python3
import
sys
import
subprocess
DISABLED_CHECKS
=
[
'C0103'
,
# invalid-name
'C0201'
,
# consider-iterating-dictionary
'C0206'
,
# consider-using-f-string
'C0209'
,
# consider-using-dict-items
'C0301'
,
# line-too-long
'C0326'
,
# bad-whitespace
'C0330'
,
# bad-continuation
'W0201'
,
# attribute-defined-outside-init
'W0212'
,
# protected-access
'W0221'
,
# arguments-differ
'W0231'
,
# super-init-not-called
'W0233'
,
# non-parent-init-called
'W0621'
,
# redefined-outer-name
'W0622'
,
# redefined-builtin
'W0707'
,
# raise-missing-from
'R0201'
,
# no-self-use
'R0801'
,
# duplicate-code
'E1101'
,
# no-member
'E1135'
,
# unsupported-membership-test
]
def
run_pylint_test
():
cmd
=
[
'pylint'
,
'nbxmpp'
,
f
'--disable=
{
","
.
join
(
DISABLED_CHECKS
)
}
'
]
try
:
subprocess
.
run
(
cmd
,
check
=
True
)
except
subprocess
.
CalledProcessError
:
sys
.
exit
(
'pylint test failed'
)
if
__name__
==
'__main__'
:
run_pylint_test
()
.gitlab-ci.yml
View file @
f2189e13
...
...
@@ -7,7 +7,7 @@ stages:
run-test
:
stage
:
test
script
:
-
python3
-m
pylint
nbxmpp --disable=C0103,C0201,C0209,C0301,C0326,C0330,W0201,W0212,W0221,W0231,W0233,W0621,W0622,W0707,R0201,R0801,E1101,E1135
-
python3
.ci/
pylint
-test.py
-
coverage run --source=nbxmpp -m unittest discover -v
-
coverage report -mi
-
coverage xml -i
...
...
@@ -16,25 +16,6 @@ run-test:
reports
:
cobertura
:
coverage.xml
# C0103 invalid-name
# C0201 consider-iterating-dictionary
# C0209 consider-using-f-string
# C0301 line-too-long
# C0326 bad-whitespace
# C0330 bad-continuation
# W0201 attribute-defined-outside-init
# W0212 protected-access
# W0221 arguments-differ
# W0231 super-init-not-called
# W0233 non-parent-init-called
# W0621 redefined-outer-name
# W0622 redefined-builtin
# W0707 raise-missing-from
# R0201 no-self-use
# R0801 duplicate-code
# E1101 no-member
# E1135 unsupported-membership-test
run-build
:
stage
:
build
script
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment