Static Code Analysis
Static code analyzers are used in CSLE to enforce style guidelines and discover bugs.
The flake8
linter and the mypy
type checker
are used to analyze the Python code and the eslint
linter is used to analyze the JavaScript code.
To run the Python linter on the CSLE code base, execute the command:
./python_linter.sh
Alternatively, the following commands can be executed for the same effect as the command above:
flake8 simulation-system/
flake8 csle-cli
flake8 emulation-system/envs
flake8 examples/
To run the Python static type checker, execute the command:
simulation-system/libs/type_checker.sh
To run the JavaScript linter, run the commands:
cd management-system/csle-mgmt-webapp/; npm run lint
cd management-system/csle-mgmt-webapp/; npm run lint:fix
- Previous
- Next