Skip to content

Commit

Permalink
Merge branch 'master' into change-retraining-day
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunil Kumar authored Jul 25, 2019
2 parents daddf2c + 707ffa0 commit f946c94
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 9 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ The first script checks the indentation, line lengths, variable names, whitespac
script checks all documentation strings - its presence and format. Please fix any warnings and errors reported by these
scripts.

List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`

#### Code complexity measurement

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:
Expand Down Expand Up @@ -109,6 +111,8 @@ Please note that due to Python's dynamic nature, static code analyzers are likel

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

List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`

#### Common issues detection

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:
Expand All @@ -119,6 +123,8 @@ The script `detect-common-errors.sh` can be used to detect common errors in the

Please note that only semantical problems are reported.

List of directories containing source code, that needs to be checked, are stored in a file `directories.txt`

#### Check for scripts written in BASH

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:
Expand Down
10 changes: 8 additions & 2 deletions check-docstyle.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

directories="f8a_report tests tools"
separate_files="setup.py"
IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)

pass=0
fail=0

Expand Down
9 changes: 7 additions & 2 deletions detect-common-errors.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

directories="f8a_report tools tests"
separate_files="setup.py"
IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)

pass=0
fail=0
Expand Down
9 changes: 7 additions & 2 deletions detect-dead-code.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

directories="f8a_report tools"
separate_files="setup.py"
IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)

pass=0
fail=0
Expand Down
3 changes: 3 additions & 0 deletions directories.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
f8a_report
tests
tools
1 change: 1 addition & 0 deletions files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setup.py
12 changes: 9 additions & 3 deletions run-linter.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

directories="f8a_report tests tools"
separate_files="setup.py"
IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)

pass=0
fail=0

Expand Down Expand Up @@ -51,7 +57,7 @@ done
echo
echo "----------------------------------------------------"
echo "Running Python linter against selected files:"
echo $separate_files
echo "$separate_files"
echo "----------------------------------------------------"

# check for individual files
Expand Down

0 comments on commit f946c94

Please sign in to comment.