Pin hacking to < 4.0.1 to fix zuul gate issues.
Test:
Ran tox -e flake8 command to validate the flake8 job and result.
Related-Bug: 1926172
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Ia2e746ba513c0d073b60e76b2d2afdfe8b6c9745
Running tox for linters fails since the bandit being pulled
in is python3 only. This is similar to other bugs where a new
version is released which drops py2 support.
In this env, we only include bandit if we are testing and running
in py3.
Partial-Bug: 1922590
Change-Id: I11b7d974ae3b64e7846e1420521dee0d48128fc5
Signed-off-by: albailey <Al.Bailey@windriver.com>
flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'
Suppresses the following:
W503 line break before binary operator
W504 line break after binary operator
W605 invalid escape sequence '\d'
E117 over-indented
E266 too many leading '#' for block comment
E305 expected 2 blank lines after class or function definition, found 1
E402 module level import not at top of file
E722 do not use bare 'except'
E741 ambiguous variable name 'I'
F632 use ==/!= to compare constant literals
F821 undefined name 'dpdk' (this is a flake8 bug)
Change-Id: I6c2ef05d765b57b7be0b038d6e384cb2af589054
Partial-Bug: 1895054
Signed-off-by: albailey <Al.Bailey@windriver.com>
Setting up the bandit tool for the scanning of HIGH severity issues
in the python codes under Starlingx/monitoring folder.
Expecting this merge will enable zuul job for CI/CD of bandit scan.
Configuration files:
1. tox.ini for adding bandit environment and command.
2. test-requirements.txt for adding bandit version.
3. .zuul.yaml file for adding bandit job and configuring under
check job to run code scan every time before code commit.
Test:
Run tox -e bandit command inside the fault folder to validate the
bandit scan and result.
Story: 2007541
Task: 39684
Depends-On: https://review.opendev.org/#/c/721294/
Change-Id: Ibcbe1dd2e380f80c4cbf6f2a7cf49065dc890803
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
This job adds a single linters tox target.
The linters target is an aggregation of linters for
this repo including:
- bashate
- flake8
Other linters such as yamllint can be added to this
repo by later commits.
Certain flake8 codes are suppressed.
They can be enabled by later commits.
This commit also adds basic contributing and hacking docs.
Change-Id: Ib10d84141954f1d39a258913a98d314763c74824
Story: 2006166
Task: 36544
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>