Skip to content

Conversation

@shivasurya
Copy link
Owner

@shivasurya shivasurya commented Nov 9, 2025

Summary

Removes legacy ANTLR query parser and expr-lang evaluation system to prepare for new Python DSL architecture.

Breaking Changes

  • Removed ANTLR query syntax and parser
  • Removed expr-lang evaluation engine
  • Stubbed out query, ci, and scan commands (will be reimplemented)

Files Changed

  • Deleted: antlr/* (13 files), graph/query.go, graph/query_test.go, cmd/ci_test.go, cmd/scan_test.go
  • Modified: cmd/query.go, cmd/ci.go, cmd/scan.go (stubbed), go.mod, main_test.go

Testing

✅ Build succeeds
✅ All tests pass
✅ Lint clean

Next Steps

Python DSL implementation in stacked PR.

Co-Authored-By: Claude noreply@anthropic.com

## Summary
Removes legacy ANTLR query parser and expr-lang evaluation system to prepare for callgraph-native Python DSL.

## Breaking Changes
- Removed ANTLR query syntax and parser (antlr/ directory)
- Removed expr-lang evaluation engine (graph/query.go)
- Stubbed out query, ci, and scan commands (will be reimplemented with Python DSL)
- Removed dependencies: antlr4-go/antlr/v4, expr-lang/expr

## Files Changed
**Deleted:**
- antlr/* (13 files, ~200KB of generated code)
- graph/query.go, graph/query_test.go
- cmd/ci_test.go, cmd/scan_test.go

**Modified:**
- cmd/query.go, cmd/ci.go, cmd/scan.go (stubbed for Python DSL)
- go.mod (removed ANTLR/expr-lang dependencies)
- graph/parser_python_test.go (removed ANTLR query integration test)
- main_test.go (updated expected command descriptions)

**Added:**
- cmd/query_test.go (simple stub test)

## Testing
✅ Build succeeds: gradle buildGo
✅ All tests pass: gradle testGo
✅ Lint clean: gradle lintGo
✅ No ANTLR/expr-lang imports remain

## Next Steps
PR #2 will introduce Python DSL core matchers (calls(), variable(), flows())

🤖 Generated with Claude Code
@shivasurya shivasurya self-assigned this Nov 9, 2025
@shivasurya shivasurya added enhancement New feature or request go Pull requests that update go code labels Nov 9, 2025
@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.75%. Comparing base (6196728) to head (05aee26).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
sourcecode-parser/cmd/ci.go 0.00% 2 Missing ⚠️
sourcecode-parser/cmd/scan.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   77.22%   80.75%   +3.53%     
==========================================
  Files          60       59       -1     
  Lines        7325     6237    -1088     
==========================================
- Hits         5657     5037     -620     
+ Misses       1435      992     -443     
+ Partials      233      208      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shivasurya shivasurya marked this pull request as ready for review November 9, 2025 16:19
@safedep
Copy link

safedep bot commented Nov 9, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

Copy link
Owner Author

shivasurya commented Nov 10, 2025

Merge activity

  • Nov 10, 4:23 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 10, 4:23 AM UTC: @shivasurya merged this pull request with Graphite.

@shivasurya shivasurya merged commit d9459ed into main Nov 10, 2025
4 of 5 checks passed
@shivasurya shivasurya deleted the pr-01-remove-antlr-expr-lang branch November 10, 2025 04:23
shivasurya added a commit that referenced this pull request Nov 10, 2025
## Summary
Python DSL core matchers and rule decorator for security pattern definitions.

## Changes
- Implemented `calls()` and `variable()` matchers
- Added `@rule` decorator for metadata
- JSON IR serialization for Go executor

## Testing
- 36 tests, 97% coverage
- All linters pass

## Stacked On
PR #352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants