Skip to content

feat: replace testdata with generated mini-project - #3

Merged
Lefix2 merged 2 commits into
mainfrom
feat/improve-testdata
Apr 30, 2026
Merged

feat: replace testdata with generated mini-project#3
Lefix2 merged 2 commits into
mainfrom
feat/improve-testdata

Conversation

@Lefix2

@Lefix2 Lefix2 commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the two real-project report files with a self-contained test fixture covering all extension features
  • Add source files that snippets can load from (src/auth/auth.ts, src/api/router.ts, src/core/utils.c, src/core/parser.h)
  • Generate 3 tool report files (35 issues total, all severity levels, other_locations, rich content.body)
  • Two custom columns: outil (from filename regex) and package (from location.path via fromField/fieldRegex)
  • Fix sidebar applyFilters() to resolve fromField/fieldRegex columns correctly via getSidebarCustomValue()

Test plan

  • Open testdata/ as a VS Code workspace — reports load automatically via reportPatterns
  • Verify outil column shows eslint / codeparser / semgrep per issue
  • Verify package column shows auth / api / core per issue
  • Click any issue → snippet loads from the corresponding src/ file
  • Sidebar filter by package filters correctly (was broken for fromField columns)
  • All severity levels visible: blocker, critical, major, minor, info
  • other_locations visible on codeparser use-after-free issue

🤖 Generated with Claude Code

TREFOU Felix and others added 2 commits April 30, 2026 11:01
Replace the two real-project report files with a self-contained test
fixture that exercises all extension features:

Source files (testdata/src/):
  auth/auth.ts   — hardcoded secret, weak crypto, var/any/== issues
  api/router.ts  — SQL injection, credential logging, unused vars
  core/utils.c   — strcpy/memcpy overflows, null check, div-by-zero
  core/parser.h  — fixed arrays, raw pointer, global instance

Reports (testdata/reports/):
  eslint-report.json    — 12 TypeScript/style issues (minor→major)
  codeparser-report.json — 12 C/C++ issues (info→blocker, incl. other_locations)
  semgrep-report.json   — 11 cross-language security issues (major→blocker)

Config: two custom columns
  outil   — extracted from report filename via regex
  package — extracted from location.path via fromField/fieldRegex

Sidebar: fix applyFilters() to resolve fromField/fieldRegex columns
via getSidebarCustomValue(), mirroring the webview.js logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Lefix2
Lefix2 merged commit 888f7f8 into main Apr 30, 2026
1 check passed
@Lefix2
Lefix2 deleted the feat/improve-testdata branch June 17, 2026 14:02
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