-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
2,503 additions
and
277 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# .coveragerc - Coverage configuration file | ||
[run] | ||
source = asciidoc_linter | ||
omit = | ||
*/tests/* | ||
*/site-packages/* | ||
setup.py | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
def __repr__ | ||
if self.debug: | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
pass | ||
raise ImportError | ||
except ImportError: | ||
def main\(\): | ||
|
||
[html] | ||
directory = htmlcov | ||
title = AsciiDoc Linter Coverage Report |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Coverage configuration file |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Main linter module with corrected imports | ||
Main linter module with corrected method names and reporter support |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Rules package initialization with Position class | ||
Rules package initialization |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Updated base.py with check_line implementation | ||
Updated base functionality for rules with standardized attributes and severity values |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,14 @@ | ||
# base_rules.py - Contains base classes for the rule system | ||
|
||
from enum import Enum | ||
from dataclasses import dataclass | ||
from typing import List, Optional, Dict, Any | ||
|
||
class Severity(Enum): | ||
ERROR = "error" | ||
WARNING = "warning" | ||
INFO = "info" | ||
|
||
@dataclass | ||
class Position: | ||
line: int | ||
column: Optional[int] = None | ||
|
||
@dataclass | ||
class Finding: | ||
message: str | ||
severity: Severity | ||
position: Position | ||
rule_id: Optional[str] = None | ||
context: Optional[Dict[str, Any]] = None | ||
|
||
class Rule: | ||
"""Base class for all rules""" | ||
rule_id: str = "BASE" # Should be overridden by subclasses | ||
|
||
def check(self, content: str) -> List[Finding]: | ||
""" | ||
Check the content for rule violations | ||
Args: | ||
content: The content to check | ||
Returns: | ||
List of findings | ||
""" | ||
raise NotImplementedError("Rule must implement check method") | ||
# base_rules.py - Import module for base functionality | ||
""" | ||
This module re-exports the base functionality from base.py for backward compatibility. | ||
""" | ||
|
||
from .base import ( | ||
Severity, | ||
Position, | ||
Finding, | ||
Rule, | ||
RuleRegistry | ||
) | ||
|
||
__all__ = ['Severity', 'Position', 'Finding', 'Rule', 'RuleRegistry'] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Base classes for all rules | ||
Import module for base functionality |
Oops, something went wrong.