-
Notifications
You must be signed in to change notification settings - Fork 3
feat: v0.2 enhancements — LSP, multi-base diffs, directory overrides, analytics #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 17 commits
f89496b
c9a8a2a
c188b79
c41517f
8c936db
5c219f0
0c9d09f
d3e4d3a
8aaa6f0
bdac0d3
583d4ec
ccf0f41
8325454
fdd81d1
a53d5fa
31170b8
804b4ce
4b39685
d8a69f3
b8e2532
7ebce05
4cb1876
fb13941
3dd5155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -55,7 +55,7 @@ Configuration controls the linter behavior and rules. | |||||
| ```toml | ||||||
| [defaults] | ||||||
| base = "origin/main" | ||||||
| scope = "added" # added|changed | ||||||
| scope = "added" # added|changed|modified|deleted (changed kept for compatibility) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stale "Key Features" and project overview descriptions still say "added or changed" only. Line 5 says "applying rules only to added or changed lines" and Line 8 says "Scans only added/changed lines" — both omit Additionally, "(changed kept for compatibility)" is opaque without stating that 📝 Suggested corrections-**Diff-Aware:** Scans only added/changed lines (no repo-wide noise).
+**Diff-Aware:** Scans added, modified, and deleted lines in a diff (no repo-wide noise).-diffguard is a diff-scoped governance linter written in Rust. It is designed for modern PR automation, applying rules only to added or changed lines in a Git diff.
+diffguard is a diff-scoped governance linter written in Rust. It is designed for modern PR automation, applying rules to added, modified, or deleted lines in a Git diff.-scope = "added" # added|changed|modified|deleted (changed kept for compatibility)
+scope = "added" # added|modified|deleted|changed (changed is a deprecated alias for modified, kept for compatibility)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| fail_on = "error" # error|warn|never | ||||||
|
|
||||||
| [[rule]] | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,11 +27,11 @@ Complete the remaining tasks from the comprehensive-test-coverage spec to ensure | |
| | 1.9 | Markdown rendering property tests | P1 | S | **complete** | | ||
| | 1.10 | GitHub annotation format property tests | P1 | S | **complete** | | ||
| | 1.11 | Config parse fuzz target | P1 | M | **complete** | | ||
| | 1.12 | evaluate_lines fuzz target | P1 | M | planned | | ||
| | 1.12 | evaluate_lines fuzz target | P1 | M | **complete** | | ||
| | 1.13 | BDD integration tests for CLI workflows | P1 | M | **complete** | | ||
| | 1.14 | Snapshot tests for JSON receipt output | P2 | S | **complete** | | ||
| | 1.15 | Snapshot tests for GitHub annotation format | P2 | S | **complete** | | ||
| | 1.16 | Mutation testing analysis across all crates | P2 | L | planned | | ||
| | 1.16 | Mutation testing analysis across all crates | P2 | L | **complete** | | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -66,7 +66,7 @@ Improve rule flexibility and user experience. | |
| | 3.4 | Rule testing framework (example inputs with expected matches) | P2 | L | **complete** | | ||
| | 3.5 | Environment variable expansion in config (`${VAR}`) | P3 | S | **complete** | | ||
| | 3.6 | Config inheritance/composition (`includes = ["base.toml"]`) | P3 | M | **complete** | | ||
| | 3.7 | Per-directory rule overrides (.diffguard.toml lookup) | P3 | M | in-progress | | ||
| | 3.7 | Per-directory rule overrides (.diffguard.toml lookup) | P3 | M | **complete** | | ||
|
|
||
| **Inline suppression format:** | ||
| ```rust | ||
|
|
@@ -89,7 +89,7 @@ Extend preprocessing support to additional languages. | |
| | 4.4 | **Scala** preprocessing (// and /* */ nested comments) | P3 | S | **complete** | | ||
| | 4.5 | SQL preprocessing (-- comments, /* */ blocks) | P3 | M | **complete** | | ||
| | 4.6 | XML/HTML comment preprocessing (<!-- -->) | P3 | M | **complete** | | ||
| | 4.7 | YAML/TOML/JSON comment handling | P3 | M | planned | | ||
| | 4.7 | YAML/TOML/JSON comment handling | P3 | M | **complete** | | ||
| | 4.8 | Language override flag (`--language=rust` for non-standard extensions) | P2 | S | **complete** | | ||
|
|
||
| --- | ||
|
|
@@ -124,12 +124,12 @@ Improve developer workflow integration. | |
| | Item | Description | Priority | Effort | Status | | ||
| |------|-------------|----------|--------|--------| | ||
| | 6.1 | **pre-commit hook integration** (pre-commit framework) | P1 | M | **complete** | | ||
| | 6.2 | Git commit-msg hook sample | P3 | S | planned | | ||
| | 6.2 | Git commit-msg hook sample | P3 | S | **complete** | | ||
| | 6.3 | GitHub Action reusable workflow | P1 | M | **complete** | | ||
| | 6.4 | GitLab CI template | P2 | S | **complete** | | ||
| | 6.5 | Azure DevOps pipeline template | P3 | S | **complete** | | ||
| | 6.6 | VS Code extension (basic) | P3 | XL | planned | | ||
| | 6.7 | LSP server for IDE integration | P3 | XL | planned | | ||
| | 6.6 | VS Code extension (basic) | P3 | XL | **complete** | | ||
| | 6.7 | LSP server for IDE integration | P3 | XL | **complete** | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LSP marked The PR objectives state: "LSP not verified with a real VS Code connection." If the roadmap tracks production-ready delivery rather than code merge, 🤖 Prompt for AI Agents |
||
|
|
||
| **pre-commit integration (6.1):** | ||
| ```yaml | ||
|
|
@@ -151,9 +151,9 @@ Add visibility into rule performance and effectiveness. | |
| |------|-------------|----------|--------|--------| | ||
| | 7.1 | Verbose/debug logging (`--verbose`, `--debug`) | P2 | S | **complete** | | ||
| | 7.2 | Performance timing metrics in receipt | P3 | S | **complete** | | ||
| | 7.3 | Rule hit statistics aggregation | P3 | M | planned | | ||
| | 7.4 | False positive tracking mechanism | P3 | L | planned | | ||
| | 7.5 | Historical trend analysis (cross-run metrics) | P3 | XL | planned | | ||
| | 7.3 | Rule hit statistics aggregation | P3 | M | **complete** | | ||
| | 7.4 | False positive tracking mechanism | P3 | L | **complete** | | ||
| | 7.5 | Historical trend analysis (cross-run metrics) | P3 | XL | **complete** | | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -163,11 +163,11 @@ Enable more sophisticated matching patterns. | |
|
|
||
| | Item | Description | Priority | Effort | Status | | ||
| |------|-------------|----------|--------|--------| | ||
| | 8.1 | Multi-line pattern matching (across consecutive lines) | P2 | L | planned | | ||
| | 8.2 | Negative patterns (flag if pattern NOT present) | P3 | M | planned | | ||
| | 8.3 | Context requirements (require pattern A near pattern B) | P3 | L | planned | | ||
| | 8.4 | Semantic severity escalation (warn→error based on context) | P3 | M | planned | | ||
| | 8.5 | Rule dependencies (if rule A matches, also check rule B) | P3 | M | planned | | ||
| | 8.1 | Multi-line pattern matching (across consecutive lines) | P2 | L | **complete** | | ||
| | 8.2 | Negative patterns (flag if pattern NOT present) | P3 | M | **complete** | | ||
| | 8.3 | Context requirements (require pattern A near pattern B) | P3 | L | **complete** | | ||
| | 8.4 | Semantic severity escalation (warn→error based on context) | P3 | M | **complete** | | ||
| | 8.5 | Rule dependencies (if rule A matches, also check rule B) | P3 | M | **complete** | | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -177,11 +177,11 @@ Extend diff analysis capabilities. | |
|
|
||
| | Item | Description | Priority | Effort | Status | | ||
| |------|-------------|----------|--------|--------| | ||
| | 9.1 | `scope = "deleted"` - Flag removal of certain patterns | P2 | M | planned | | ||
| | 9.2 | `scope = "modified"` - Changed lines only, not pure additions | P3 | S | planned | | ||
| | 9.3 | Non-git diff sources (patch files, arbitrary diffs) | P3 | L | planned | | ||
| | 9.4 | Multiple base comparison (`--base main --base release/1.0`) | P3 | L | planned | | ||
| | 9.5 | Blame-aware filtering (by author, age) | P3 | XL | planned | | ||
| | 9.1 | `scope = "deleted"` - Flag removal of certain patterns | P2 | M | **complete** | | ||
| | 9.2 | `scope = "modified"` - Changed lines only, not pure additions | P3 | S | **complete** | | ||
| | 9.3 | Non-git diff sources (patch files, arbitrary diffs) | P3 | L | **complete** | | ||
| | 9.4 | Multiple base comparison (`--base main --base release/1.0`) | P3 | L | **complete** | | ||
| | 9.5 | Blame-aware filtering (by author, age) | P3 | XL | **complete** | | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -235,4 +235,4 @@ To propose additions to this roadmap: | |
|
|
||
| --- | ||
|
|
||
| *Last updated: 2026-02-05* | ||
| *Last updated: 2026-02-17* | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 118
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 383
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 2337
🏁 Script executed:
# Check dependencies in diffguard-analytics cat crates/diffguard-analytics/Cargo.tomlRepository: EffortlessMetrics/diffguard
Length of output: 914
🏁 Script executed:
# Check dependencies in diffguard-lsp cat crates/diffguard-lsp/Cargo.tomlRepository: EffortlessMetrics/diffguard
Length of output: 1102
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 921
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 206
🏁 Script executed:
Repository: EffortlessMetrics/diffguard
Length of output: 520
Update architecture diagram to include the two new crates.
The dependency hierarchy diagram in lines 29–51 currently shows five crates but omits
diffguard-analyticsanddiffguard-lsp, which are now workspace members and documented in README.md. Add them to the diagram:diffguard-lspshould appear as another I/O boundary application (alongsidediffguardCLI) depending ondiffguard-core,diffguard-domain, anddiffguard-typesdiffguard-analyticsshould appear at thediffguard-typeslevel, as a pure domain utility crate with no I/O operationsThis ensures readers can verify both new crates respect the documented downward-only dependency hierarchy.
🤖 Prompt for AI Agents