Skip to content

feat(golang): Go file detection and tree-sitter-go parsing (PR-01) - #520

Merged
shivasurya merged 1 commit into
mainfrom
shiva/golang-pr01-file-detection
Feb 15, 2026
Merged

shivasurya merged 1 commit into
mainfrom
shiva/golang-pr01-file-detection

Conversation

@shivasurya

Copy link
Copy Markdown
Owner

Summary

  • Add .go file detection in getFiles() and isGoSourceFile() utility
  • Integrate tree-sitter-go language binding for AST parsing
  • Add directory skipping for vendor/, testdata/, _* dirs
  • Add test fixture: simple Go project with multi-package layout

Test plan

  • isGoSourceFile("main.go") returns true; isGoSourceFile("main.py") returns false
  • getFiles() discovers all .go files in fixture project
  • getFiles() excludes vendor/ and testdata/ directories
  • graph.Initialize() completes without error on Go project
  • Mixed .py + .go project: Python parsing unaffected
  • gradle buildGo compiles without errors
  • gradle testGo passes all tests
  • gradle lintGo reports zero lint findings

🤖 Generated with Claude Code

Add foundation for Go language support in Code Pathfinder:
- Add isGoSourceFile() helper and extend getFiles() to collect .go files
- Add directory skipping for vendor/, testdata/, node_modules/, .git/, _* dirs
- Integrate tree-sitter-go language binding for AST parsing
- Add isGoSourceFile flag in buildGraphFromAST and stub cases for all Go node types
- Guard method_declaration case for Java/Go collision
- Add isGoSourceFile field to Node struct
- Add test fixture: simple Go project with multi-package layout
- Add comprehensive tests for file detection, dir skipping, and initialization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shivasurya shivasurya added the enhancement New feature or request label Feb 14, 2026
@shivasurya shivasurya self-assigned this Feb 14, 2026
@safedep

safedep Bot commented Feb 14, 2026 •

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

Code Pathfinder Security Scan

Pass Critical High Medium Low Info

No security issues detected.

Metric Value
Files Scanned 8
Rules 38

Powered by Code Pathfinder

@codecov

codecov Bot commented Feb 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.78%. Comparing base (bb9bd01) to head (94e6bc1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sast-engine/graph/parser.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   82.75%   82.78%   +0.03%     
==========================================
  Files         122      122              
  Lines       14321    14345      +24     
==========================================
+ Hits        11851    11876      +25     
  Misses       2021     2021              
+ Partials      449      448       -1     

☔ 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 changed the title feat: Go file detection and tree-sitter-go parsing feat(golang): Go file detection and tree-sitter-go parsing (PR-01) Feb 14, 2026

shivasurya commented Feb 15, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

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

@shivasurya
shivasurya merged commit 46c3910 into main Feb 15, 2026
6 of 7 checks passed
@shivasurya
shivasurya deleted the shiva/golang-pr01-file-detection branch February 15, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant