Architecture Decisions
ADR 1: Rule Base Class Design
Status
Accepted
Context
We need a flexible and extensible way to implement different linting rules for AsciiDoc documents.
Decision
We will use an abstract base class Rule
with a defined interface that all concrete rules must implement.
Consequences
-
Positive
-
Consistent interface for all rules
-
Easy to add new rules
-
Clear separation of concerns
-
Simplified testing through common interface
-
-
Negative
-
Additional abstraction layer
-
Slight performance overhead
-
ADR 2: Finding Data Structure
Status
Accepted
Context
Rule violations need to be reported in a consistent and informative way.
Decision
We will use a Finding
data class with fields for message, severity, position, rule ID, and context.
Consequences
-
Positive
-
Structured error reporting
-
Rich context for violations
-
Consistent error format
-
-
Negative
-
More complex than simple string messages
-
Requires more memory for storing findings
-
ADR 3: Rule Implementation Strategy
Status
Accepted
Context
Rules need to process AsciiDoc content and identify violations efficiently.
Decision
Each rule will process the content line by line, using regular expressions for pattern matching.
Consequences
-
Positive
-
Simple implementation
-
Good performance for most cases
-
Easy to understand and maintain
-
-
Negative
-
Limited context awareness
-
May miss some complex patterns
-
Regular expressions can become complex
-
ADR 4: Test Strategy
Status
Accepted
Context
Rules need to be thoroughly tested to ensure reliable operation.
Decision
Each rule will have its own test class with multiple test methods covering various scenarios.
Consequences
-
Positive
-
High test coverage
-
Clear test organization
-
Easy to add new test cases
-
-
Negative
-
More maintenance effort
-
Longer test execution time
-
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.