Skip to content

feat: config loader, PR formatter, VS Code diagnostics, and SARIF/JSON CLI output#616

Open
Nimatstar wants to merge 4 commits into
MDTechLabs:mainfrom
Nimatstar:feat/config-loader-pr-formatter-vscode-sarif
Open

feat: config loader, PR formatter, VS Code diagnostics, and SARIF/JSON CLI output#616
Nimatstar wants to merge 4 commits into
MDTechLabs:mainfrom
Nimatstar:feat/config-loader-pr-formatter-vscode-sarif

Conversation

@Nimatstar

Copy link
Copy Markdown

Implements four assigned GasGuard features on one branch.

#592.gasguardrc config loader

Adds src/config/config.interface.ts and src/config/config-loader.ts: loads .gasguardrc, .gasguardrc.json, and .gasguardrc.yaml/.yml, supporting ignoreRules, includePaths, excludePaths, and severityThreshold, and falling back to defaults when no file is present. isPathExcluded() lets the scanner skip excluded paths during AST parsing. YAML is parsed by a tiny built-in reader for the flat config shape, so no new dependency is added.

#591 — GitHub PR comment formatter

Adds packages/formatters/src/github-pr-formatter.ts: renders diagnostics into a GitHub-flavored Markdown table (File, Line, Rule, Gas Impact, Suggested Fix), wraps large reports in a collapsible <details> block, and computes aggregate potential gas savings across the changeset.

#590 — VS Code inline diagnostics

Adds packages/vscode-extension/src/diagnostics.ts and extension.ts: binds a vscode.languages.createDiagnosticCollection('gasguard'), maps rule matches to vscode.Diagnostic ranges at Warning severity (so squiggly underlines appear in .sol/.rs files), and surfaces the estimated gas saving in the hover message.

#589 — CLI JSON and SARIF output

Adds apps/cli/src/formatters/sarif-formatter.ts (maps RuleMatch objects to SARIF v2.1.0) and apps/cli/src/commands/scan.ts with --format (text|json|sarif) and --output <file> handling, so results can feed GitHub code scanning and CI dashboards.

Unit tests are included for the config loader, PR formatter, and SARIF formatter.

closes #592
closes #591
closes #590
closes #589

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Nimatstar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant