Skip to content

Commit f89f3ac

Browse files
committed
The problem is a missing docstring in __init__.py
1 parent 858e5b5 commit f89f3ac

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

.pipeline

+11-21
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ pipeline {
5151
else find hubblestack -name "*.py" -print0 | xargs -r0 git diff --name-only "$LHS" "$RHS"
5252
fi > relevant-files.txt
5353
'''
54-
sh '''mkdir -vp tests/unittests/output
55-
cp relevant-files.txt tests/unittests/output
54+
sh ''' mkdir -vp tests/unittests/output
55+
cp relevant-files.txt tests/unittests/output
5656
'''
5757
}
5858
}
@@ -73,14 +73,9 @@ pipeline {
7373
steps {
7474
sh '''#!/bin/bash
7575
source ./venv/bin/activate
76-
if grep -q . relevant-files.txt; then
77-
< relevant-files.txt xargs -r pylint --output-format=json \
78-
> tests/unittests/output/pylint.json
79-
x=$?
80-
else
81-
echo "[]" > tests/unittests/output/pylint.json
82-
x=0
83-
fi
76+
< relevant-files.txt xargs -r pylint --output-format=json \
77+
> tests/unittests/output/pylint.json
78+
x=$?
8479
python ./tests/automation/pylint-json-to-html tests/unittests/output/pylint.json
8580
exit $x
8681
'''
@@ -91,17 +86,12 @@ pipeline {
9186
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
9287
sh '''#!/bin/bash
9388
source ./venv/bin/activate
94-
if grep -q . relevant-files.txt; then
95-
< relevant-files.txt xargs -r bandit -lif html \
96-
> tests/unittests/output/bandit.html
97-
x=$?
98-
cp tests/static/bandit.css tests/unittests/output/bandit.css
99-
sed -i -e '/<style/,/<.style/c<link rel="stylesheet" href="bandit.css">' \
100-
tests/unittests/output/bandit.html
101-
else
102-
echo "<p>did not run</p>" > tests/unittests/output/bandit.html
103-
x=0
104-
fi
89+
< relevant-files.txt xargs -r bandit -lif html \
90+
> tests/unittests/output/bandit.html
91+
x=$?
92+
cp tests/static/bandit.css tests/unittests/output/bandit.css
93+
sed -i -e '/<style/,/<.style/c<link rel="stylesheet" href="bandit.css">' \
94+
tests/unittests/output/bandit.html
10595
exit $x
10696
'''
10797
}

pylintrc

+7
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,13 @@ enable=blacklisted-name,
373373
bad-thread-instantiation,
374374
shallow-copy-environ
375375

376+
# This wants to require a docstring at the top of every file. We don't always
377+
# want that; particularly for __init__.py files. If there was a way to disable
378+
# this for only __init__.py files, that would be better as some of ours are
379+
# auto-generated. Until we find a way to to that without a comment in the file
380+
# (which is roughly the same as a docstring), we'll do this:
381+
disable=missing-module-docstring
382+
376383

377384
[REPORTS]
378385

0 commit comments

Comments
 (0)