Skip to content

Line number storage for functions, methods, and classes (v0.8.4) - #91

Merged
octo-youcef merged 3 commits into
mainfrom
feature/line-number-storage
May 1, 2026
Merged

Line number storage for functions, methods, and classes (v0.8.4)#91
octo-youcef merged 3 commits into
mainfrom
feature/line-number-storage

Conversation

@octo-youcef

Copy link
Copy Markdown
Collaborator

Summary

Adds line number storage to enable "navigate to source" functionality for quality rule violations.

Closes #87

Changes

  • Models: Added line_number: int | None field to FunctionInfo and ClassInfo
  • Extraction: AST extractor captures lineno attribute from function and class definition nodes
  • Storage: Graph loader stores line_number property in Neo4j for Function, Method, and Class nodes
  • Quality rules: Parameter complexity rule now returns line numbers in violation output (changed from null)

Benefits

  • Users can navigate directly to violations in their code
  • Foundation for IDE integrations and editor plugins
  • Improves developer experience when fixing quality issues

Testing

  • All 289 unit tests passing
  • No behavior changes for existing tests - line_number field is optional and backwards compatible
  • Coverage: 80.49% (above 75% threshold)

Commits

  1. Add line_number field to FunctionInfo and ClassInfo
  2. Update CHANGELOG for v0.8.4
  3. Bump version: 0.8.3 → 0.8.4

🤖 Generated with Claude Code

@octo-youcef
octo-youcef requested a review from ydkadri as a code owner May 1, 2026 05:39
- Add line_number field to FunctionInfo and ClassInfo models
- Capture lineno from AST nodes during extraction
- Store line_number property in Neo4j for Function/Method/Class nodes
- Update param_complexity query to use line_number instead of null
- All 289 unit tests passing
@octo-youcef
octo-youcef force-pushed the feature/line-number-storage branch from fca9e69 to 7124f77 Compare May 1, 2026 06:00
@octo-youcef
octo-youcef merged commit b87b019 into main May 1, 2026
8 checks passed
@octo-youcef
octo-youcef deleted the feature/line-number-storage branch May 1, 2026 06: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.

Store line numbers for functions/methods/classes

2 participants