Skip to content
Snippets Groups Projects
Commit 704de5ad authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-310: Extend linting with breakpoint, mock and shell checks

Adds missing newline eof detection in common file formats as well
as finding breakpoint and debugger statements, non-existing mock
statements and adding shellcheck for our shell scripts.
parent d2d3a40f
No related branches found
No related tags found
1 merge request!128L2SS-310: Extend linting with breakpoint, mock and shell checks
......@@ -16,17 +16,30 @@ stages:
- static-analysis
- unit-tests
- integration-tests
linting:
newline_at_eof:
stage: linting
before_script:
- pip3 install -r devices/test-requirements.txt
script:
- flake8 --filename *.sh,*.conf,*.md,*.yml --select=W292 --exclude .tox,.egg-info,docker
python_linting:
stage: linting
script:
- cd devices
- tox -e pep8
static-analysis:
bandit:
stage: static-analysis
allow_failure: true
script:
- cd devices
- tox -e bandit
shellcheck:
stage: static-analysis
allow_failure: true
before_script:
- sudo apt-get update
- sudo apt-get install -y shellcheck
script:
- shellheck **/*.sh
unit_test:
stage: unit-tests
before_script:
......
# Tango Station Control
Station Control software related to Tango devices.
\ No newline at end of file
Station Control software related to Tango devices.
this folder contains all the comms_client implementations for organisation
### How to add a new client
soon™
\ No newline at end of file
soon™
......@@ -23,4 +23,4 @@ $LOFAR20_DIR/sbin/run_integration_test.sh
## Limitations
Our makefile will always launch the new container upon creation, resulting in
the integration tests actually being run twice.
\ No newline at end of file
the integration tests actually being run twice.
......@@ -4,6 +4,9 @@
doc8>=0.8.0 # Apache-2.0
flake8>=3.8.0 # MIT
flake8-breakpoint>=1.1.0 # MIT
flake8-debugger>=4.0.0 #MIT
flake8-mock>=0.3 #GPL
bandit>=1.6.0 # Apache-2.0
hacking>=3.2.0,<3.3.0 # Apache-2.0
coverage>=5.2.0 # Apache-2.0
......
......@@ -42,5 +42,5 @@ commands =
[flake8]
filename = *.py,.stestr.conf,.txt
select = W292
select = W292,B601,B602,T100,M001
exclude=.tox,.egg-info
curl $(kubectl get svc -n tango-grafana -o jsonpath='{.items[?(@.metadata.name=="tango-exporter-service-0")].spec.clusterIP}')/metrics
\ No newline at end of file
curl $(kubectl get svc -n tango-grafana -o jsonpath='{.items[?(@.metadata.name=="tango-exporter-service-0")].spec.clusterIP}')/metrics
......@@ -19,4 +19,4 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1
make start integration-test
# Run the integration test with the output displayed on stdout
docker start -a integration-test
\ No newline at end of file
docker start -a integration-test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment