Skip to content

Conversation

@martinemde
Copy link
Contributor

No description provided.

@github-project-automation github-project-automation bot moved this to Triage in Modularity Jan 7, 2026
@martinemde martinemde requested a review from ivy January 7, 2026 06:10
@martinemde martinemde marked this pull request as draft January 7, 2026 06:19
Template expansion was scattered between checkers and formatters, making
it difficult to maintain consistency between default and user-supplied
templates. The reference_location placeholder needed special handling
per output format.

Changes:
- Add template.rs with expand(), build_violation_vars(), and helpers
- Move all template expansion from pack_checker to formatters
- Violation struct now stores data only (no pre-expanded message)
- ViolationIdentifier.violation_type is now CheckerType enum
- Each formatter handles reference_location appropriately:
  - text: colorized or plain based on color mode
  - json: cleared (location in separate fields)
  - csv: plain format
- Default templates restored to include {{reference_location}}
@martinemde martinemde force-pushed the martinemde/text-formatting branch from 58760e2 to 82d25f5 Compare January 7, 2026 19:02
@martinemde martinemde marked this pull request as ready for review January 7, 2026 19:03
@martinemde martinemde enabled auto-merge (squash) January 7, 2026 19:03
@martinemde martinemde merged commit 8ab81e2 into main Jan 7, 2026
7 checks passed
@martinemde martinemde deleted the martinemde/text-formatting branch January 7, 2026 19:03
@github-project-automation github-project-automation bot moved this from Triage to Done in Modularity Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants