Skip to content

Commit b2af30c

Browse files
authored
Merge pull request #369 from tisnik/fix-issue-368
QA script use directories.txt
2 parents de1e368 + 6e629dd commit b2af30c

File tree

7 files changed

+48
-16
lines changed

7 files changed

+48
-16
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ The first script checks the indentation, line lengths, variable names, white spa
504504
script checks all documentation strings - its presence and format. Please fix any warnings and errors reported by these
505505
scripts.
506506

507+
List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`
508+
507509
#### Code complexity measurement
508510

509511
The scripts `measure-cyclomatic-complexity.sh` and `measure-maintainability-index.sh` are used to measure code complexity. These scripts can be run w/o any arguments:
@@ -531,6 +533,8 @@ Please note that due to Python's dynamic nature, static code analyzers are likel
531533

532534
Because of this potential problems, only code detected with more than 90% of confidence is reported.
533535

536+
List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`
537+
534538
#### Common issues detection
535539

536540
The script `detect-common-errors.sh` can be used to detect common errors in the repository. This script can be run w/o any arguments:
@@ -541,6 +545,8 @@ The script `detect-common-errors.sh` can be used to detect common errors in the
541545

542546
Please note that only semantical problems are reported.
543547

548+
List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`
549+
544550
#### Check for scripts written in BASH
545551

546552
The script named `check-bashscripts.sh` can be used to check all BASH scripts (in fact: all files with the `.sh` extension) for various possible issues, incompatibilities, and caveats. This script can be run w/o any arguments:

check-docstyle.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
#!/bin/bash
22

3-
directories="f8a_jobs tests tools"
4-
separate_files="f8a-jobs.py setup.py"
3+
IFS=$'\n'
4+
5+
# list of directories with sources to check
6+
directories=$(cat directories.txt)
7+
8+
# list of separate files to check
9+
separate_files=$(cat files.txt)
10+
511
pass=0
612
fail=0
713

814
function prepare_venv() {
9-
VIRTUALENV=$(which virtualenv)
15+
VIRTUALENV="$(which virtualenv)"
1016
if [ $? -eq 1 ]; then
1117
# python36 which is in CentOS does not have virtualenv binary
12-
VIRTUALENV=$(which virtualenv-3)
18+
VIRTUALENV="$(which virtualenv-3)"
1319
fi
1420

1521
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pydocstyle

detect-common-errors.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#!/bin/bash
22

3-
directories="f8a_jobs tests tools"
4-
separate_files="f8a-jobs.py setup.py"
3+
IFS=$'\n'
4+
5+
# list of directories with sources to check
6+
directories=$(cat directories.txt)
7+
8+
# list of separate files to check
9+
separate_files=$(cat files.txt)
510

611
pass=0
712
fail=0
813

914
function prepare_venv() {
10-
VIRTUALENV=$(which virtualenv)
15+
VIRTUALENV="$(which virtualenv)"
1116
if [ $? -eq 1 ]; then
1217
# python36 which is in CentOS does not have virtualenv binary
13-
VIRTUALENV=$(which virtualenv-3)
18+
VIRTUALENV="$(which virtualenv-3)"
1419
fi
1520

1621
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pyflakes

detect-dead-code.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#!/bin/bash
22

3-
directories="f8a_jobs tests tools"
4-
separate_files="f8a-jobs.py setup.py"
3+
IFS=$'\n'
4+
5+
# list of directories with sources to check
6+
directories=$(cat directories.txt)
7+
8+
# list of separate files to check
9+
separate_files=$(cat files.txt)
510

611
pass=0
712
fail=0
813

914
function prepare_venv() {
10-
VIRTUALENV=$(which virtualenv)
15+
VIRTUALENV="$(which virtualenv)"
1116
if [ $? -eq 1 ]; then
1217
# python36 which is in CentOS does not have virtualenv binary
13-
VIRTUALENV=$(which virtualenv-3)
18+
VIRTUALENV="$(which virtualenv-3)"
1419
fi
1520

1621
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install vulture

directories.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
f8a_jobs
2+
tests
3+
tools

files.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
f8a-jobs.py
2+
setup.py

run-linter.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#!/bin/bash
22

3-
directories="f8a_jobs tests tools"
4-
separate_files="f8a-jobs.py setup.py"
3+
IFS=$'\n'
4+
5+
# list of directories with sources to check
6+
directories=$(cat directories.txt)
7+
8+
# list of separate files to check
9+
separate_files=$(cat files.txt)
510

611
pass=0
712
fail=0
813

914
function prepare_venv() {
10-
VIRTUALENV=$(which virtualenv)
15+
VIRTUALENV="$(which virtualenv)"
1116
if [ $? -eq 1 ]; then
1217
# python36 which is in CentOS does not have virtualenv binary
13-
VIRTUALENV=$(which virtualenv-3)
18+
VIRTUALENV="$(which virtualenv-3)"
1419
fi
1520

1621
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pycodestyle

0 commit comments

Comments
 (0)