Skip to content

Commit

Permalink
Add bandit to linters
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-steinhoff committed Feb 20, 2023
1 parent 3988cf8 commit e533810
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
os: ["ubuntu-20.04"]
linter-command:
- poetry run pylint dbcl
- poetry run bandit dbcl
- poetry run black --check --diff .

runs-on: ${{ matrix.os }}
Expand All @@ -23,7 +24,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
# - if: ${{ steps.cache-poetry-venv.outputs.cache-hit != 'true' }}
- name: Install dependencies
run: |
poetry install
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
lint: pylint black
lint: pylint black bandit

pylint:
poetry run pylint dbcl

black:
poetry run black --check .

bandit:
poetry run bandit -r dbcl
2 changes: 1 addition & 1 deletion dbcl.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"settings": {
"python.linting.enabled": true,
"python.linting.banditEnabled": false,
"python.linting.banditEnabled": true,
"python.linting.flake8Enabled": false,
"python.linting.pylintEnabled": true,
"editor.formatOnSave": true,
Expand Down
144 changes: 143 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ isort = "^5.12.0"
pylint = "^2.16.2"
black = "^23.1.0"
bump2version = "^1.0.1"
bandit = "^1.7.4"

[tool.pylint.messages_control]
disable = [
Expand Down

0 comments on commit e533810

Please sign in to comment.