Skip to content

Commit

Permalink
test: fix pre-commit reported issues (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Aug 2, 2024
1 parent 76c044d commit 14306fa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
description = "Global Allowlist"

# Ignore based on any subset of the file path
paths = ['''tests\/unit\/event_source\/certs''']
paths = ['''tests\/unit\/event_source\/certs''']
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ci:
skip:
# These will not run on pre-commit.ci due to required network access:
- ansible-test-sanity
- tox
exclude: "^.*\\.md$"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -13,6 +18,7 @@ repos:
name: Run ansible-test sanity
entry: ansible-test sanity
require_serial: true
stages: [manual]
language: python
additional_dependencies:
- ansible
Expand All @@ -23,4 +29,5 @@ repos:
entry: tox
language: python
require_serial: true
stages: [manual]
pass_filenames: false
2 changes: 1 addition & 1 deletion extensions/eda/rulebooks/demo_rulebook.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# This rulebook is for demo purposes only
# Typically the events come from an external source
# Typically the events come from an external source
# and you might have to configure the external source
# and have it generate events on demand.
# In this simple rulebook the events to be generated
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@

[tox]
# envlist = ruff, darglint, pylint-event-source, pylint-event-filter
envlist = ruff, pylint-event-source, pylint-event-filter, isort, black
envlist = lint, ruff, pylint-event-source, pylint-event-filter, isort, black
requires =
lint
ruff
darglint
pylint

[testenv]
basepython = python3.9, python3.10
[testenv:lint]
deps = pre-commit
desc = Run linters
commands = pre-commit run -a

[testenv:ruff]
deps = -r{toxinidir}/lint_requirements.txt
Expand Down

0 comments on commit 14306fa

Please sign in to comment.