Skip to content

feat: refactor config discovery and severity handling#142

Merged
ekropotin merged 1 commit intomainfrom
dev
Sep 5, 2025
Merged

feat: refactor config discovery and severity handling#142
ekropotin merged 1 commit intomainfrom
dev

Conversation

@ekropotin
Copy link
Copy Markdown
Owner

Simplified config discovery which uses git and cwd boundaries only:

  • Remove project markers (Cargo.toml, package.json, go.mod, etc.) as boundaries
  • Keep only git repositories (.git) as meaningful boundaries for config search
  • Add current working directory as boundary for CLI mode
  • Update ConfigDiscovery struct to track current working directory
  • Maintain workspace root boundaries for LSP integration
  • Update README.md to reflect new simpler boundary detection strategy
  • Remove obsolete test for Cargo.toml boundary detection
  • Fix CLI integration test naming for consistency

Fix the bug, when the violations printed with WARN severity instead of ERR:

  • The print_cli_errors function in quickmark-cli now directly uses the severity from the RuleViolation struct, instead of looking it up from the configuration. This simplifies the code and makes it more robust.
  • The MultiRuleLinter in quickmark-core now injects the correct severity into each RuleViolation as it is created.
  • The test for print_cli_errors has been updated to reflect these changes and now uses the MultiRuleLinter to generate violations with the correct severities. 🤖 Generated with Claude Code

Simplified config discovery which uses git and cwd boundaries only:

- Remove project markers (Cargo.toml, package.json, go.mod, etc.) as boundaries
- Keep only git repositories (.git) as meaningful boundaries for config search
- Add current working directory as boundary for CLI mode
- Update ConfigDiscovery struct to track current working directory
- Maintain workspace root boundaries for LSP integration
- Update README.md to reflect new simpler boundary detection strategy
- Remove obsolete test for Cargo.toml boundary detection
- Fix CLI integration test naming for consistency

Fix the bug, when the violations printed with WARN severity instead of
ERR:

- The `print_cli_errors` function in `quickmark-cli` now directly uses the severity from the `RuleViolation` struct, instead of looking it up from the configuration. This simplifies the code and makes it more robust.
- The `MultiRuleLinter` in `quickmark-core` now injects the correct severity into each `RuleViolation` as it is created.
- The test for `print_cli_errors` has been updated to reflect these changes and now uses the `MultiRuleLinter` to generate violations with the correct severities.
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ekropotin ekropotin enabled auto-merge (squash) September 5, 2025 20:14
@ekropotin ekropotin merged commit 2392b63 into main Sep 5, 2025
4 checks passed
@ekropotin ekropotin deleted the dev branch September 5, 2025 20:16
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