Skip to content

Commit

Permalink
Add import-linter to pre-commit hooks (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentincalomme authored Jan 16, 2024
1 parent ca8084a commit 35567db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .importlinter
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[importlinter]
root_packages=
copywriter
src.copywriter
tests

include_external_packages=True
Expand All @@ -9,6 +9,6 @@ include_external_packages=True
name = Application code should not import non-application code (i.e. tests, devtools)
type = forbidden
source_modules =
copywriter
src.copywriter
forbidden_modules =
tests
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ repos:
# Preserve markdown hard line breaks
args: ["--markdown-linebreak-ext", "md"]

# Import-linter to check project structure
- repo: https://github.com/seddonym/import-linter/
rev: "v2.0"
hooks:
- id: import-linter

# Ruff for linting
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.13"
Expand Down

0 comments on commit 35567db

Please sign in to comment.