Skip to content

Add import-linter boundaries and CI lint step#80

Merged
Miyamura80 merged 2 commits into
mainfrom
feat/import-linter-boundaries
Jan 26, 2026
Merged

Add import-linter boundaries and CI lint step#80
Miyamura80 merged 2 commits into
mainfrom
feat/import-linter-boundaries

Conversation

@Miyamura80

Copy link
Copy Markdown
Owner

Summary

  • add import-linter contracts to enforce module boundary rules
  • wire import-linter into tooling and the lint workflow
  • update dependencies to include import-linter

Testing

  • make import_lint

@greptile-apps

greptile-apps Bot commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR adds import-linter to enforce architectural boundaries across the codebase, preventing circular dependencies and maintaining clean module separation.

Key Changes:

  • Added .importlinter configuration file with 5 contracts enforcing layered architecture
  • Integrated import-linter into the development workflow via Makefile targets
  • Added CI step to automatically check import boundaries on every PR
  • Updated dependencies to include import-linter>=2.0.0 and its dependency grimp

Import Boundary Rules:
The configuration enforces a clean layered architecture:

  • common is the base layer (no dependencies on other modules)
  • utils can depend on common but not on src, tests, or init
  • src can depend on common and utils but not on tests or init
  • tests can import from all application code but cannot be imported
  • init is a leaf module that can be imported but cannot import from other modules

The implementation is clean, properly integrated into existing tooling patterns, and follows the project's conventions for Makefile targets and CI workflows.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-structured and non-invasive: they add a new linting tool without modifying any application code. The configuration follows established patterns in the project, integrates cleanly with existing tooling, and enforces architectural boundaries that prevent future issues. All changes are additive (new config file, new Makefile target, new CI step, new dependencies) with no modifications to existing logic.
  • No files require special attention

Important Files Changed

Filename Overview
.importlinter Added import-linter configuration with boundary enforcement rules for module layering
pyproject.toml Added import-linter>=2.0.0 dependency to project dependencies
Makefile Added import_lint target and integrated it into CI checks and install_tools
.github/workflows/linter_require_ruff.yaml Added import-linter step to CI workflow after ruff linting
uv.lock Updated lockfile with import-linter, grimp dependencies and upgraded rich from 14.1.0 to 14.3.1

@Miyamura80 Miyamura80 merged commit 3f32ec8 into main Jan 26, 2026
9 checks passed
@github-actions github-actions Bot deleted the feat/import-linter-boundaries branch January 26, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant