Refactor DslTerminologyAnalyzer into parsing and validation components#8
Merged
Merged
Conversation
Member
|
Implements: |
Member
|
@copilot please don't over engineer this. The intent is to find a balance between:
|
…components - Add TerminologyRule model class to represent a single rule - Add DslRuleParser for parsing DSL XML configuration - Add TerminologyValidator for validating identifiers against rules - Add ValidationResult to represent validation outcomes - Update DslTerminologyAnalyzer to use the new components - Add terminology-level unit tests for DslRuleParser (19 tests) - Add terminology-level unit tests for TerminologyValidator (21 tests) Co-authored-by: Pressacco <5507864+Pressacco@users.noreply.github.com>
- Remove ValidationResult class to reduce complexity - Change Validate() to GetViolation() returning null for valid, or the violated rule - Update DslTerminologyAnalyzer to use simplified API - Update tests to use GetViolation() method Co-authored-by: Pressacco <5507864+Pressacco@users.noreply.github.com>
Co-authored-by: Pressacco <5507864+Pressacco@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor DslTerminologyAnalyzer into parsing and validation components
Refactor DslTerminologyAnalyzer into parsing and validation components
Nov 27, 2025
Contributor
Author
Addressed in 8576bb2. Simplified to just 3 classes: |
Member
|
Implements: |
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.
Extracts parsing and validation logic from
DslTerminologyAnalyzerinto testable components, enabling terminology-level unit tests without analyzer overhead.New Components
TerminologyRule- Data model for blocked/preferred term pairs with case sensitivityDslRuleParser- Static XML parser returningList<TerminologyRule>TerminologyValidator- Validates identifiers against rulesAPI
Tests
DslRuleParser(XML parsing scenarios)TerminologyValidator(validation edge cases: MetaData/Metadata, FileName/Filename)Existing analyzer-level tests unchanged.
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.