Repository navigation
Add end line/column and metadata to violations (#68) - #97
Merged
Merged
Conversation
Violation and AnalyzerViolation gain optional EndLine/EndColumn, and Violation gains an optional Metadata bag. Roslyn-backed models and the analyzers that report from them thread end positions through from GetLineSpan().EndLinePosition (1-based, exclusive end column). - SARIF: Region.EndLine/EndColumn when present; metadata goes into the result property bag. - JSON v1 contract: endLine, endColumn and metadata are optional additive per-violation properties; schema and RESULT_CONTRACT.md updated. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
ViolationandAnalyzerViolationgain optionalEndLine/EndColumn;Violationgains an optionalMetadatadictionary. All new parameters default tonull, so existing call sites compile.TypeModel,MethodModel,PropertyModel,ConstructorModel,FieldModel,CallSiteModel,DiagnosticModel, and the syntax-fact models) populate end positions fromGetLineSpan().EndLinePosition, using the same 1-based convention as the start. End column is exclusive, matching SARIFregion.endColumn.RuleEvaluatorcarries them ontoViolation.Region.EndLine/EndColumnare set only when present. Metadata goes into the result property bag. A violation without an end span still gets a start-only region.endLine,endColumnandmetadataare optional additive per-violation properties inValidationReportV1, the mapper, the schema, andRESULT_CONTRACT.md.JsonViolationReporteris unchanged.IMPLEMENTATION_STATUS.mdhas a short note.No built-in rule populates
Metadatayet.Closes #68
🤖 Generated with Claude Code