feat: add pycustomlint check to sanity runner with unified linter report
- Wire PythonCustomLinter into run_sanity as the pycustomlint check (imports directly from the customlinter package; MAX_WORKERS 4 -> 5) - Use BaseLinter.format_violations_report so every sanity linter (markdownlint, frontmatter_lint, pycustomlint) prints the same TARGET/DEFINITIONS/FILE/SUMMARY format; align summary line order in base.py with the fmlint and mdoctor reports - Remove dead backward-compat shims (src/mdoctor/fmlint.py, src/python_ruff/pycustomlint.py); nothing imported them - Hoist all 45 inline imports in src to module level per the python-tdd skill, fixing the one test mock that relied on the lazy import - Sync SPEC: 4.2/4.4 covers, new 4.9.3 Linter Report Format section, frontmatter version 0.27.9 -> 0.28.0 Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
"""Python Custom Linter - Backward compatibility module.
|
||||
|
||||
This module provides backward compatibility by re-exporting from the new
|
||||
customlinter package.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from customlinter.base import CustomLintError
|
||||
from customlinter.pycustomlint import (
|
||||
READONLY_ZONES,
|
||||
VIOLATION_CODES,
|
||||
InlineImportVisitor,
|
||||
LintViolation,
|
||||
PythonCustomLinter,
|
||||
main,
|
||||
)
|
||||
|
||||
# Fix imports for when this module is used directly
|
||||
src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
if src_path not in sys.path:
|
||||
sys.path.insert(0, src_path)
|
||||
|
||||
__all__ = [
|
||||
"READONLY_ZONES",
|
||||
"VIOLATION_CODES",
|
||||
"CustomLintError",
|
||||
"InlineImportVisitor",
|
||||
"LintViolation",
|
||||
"PythonCustomLinter",
|
||||
"main",
|
||||
]
|
||||
@@ -7,6 +7,8 @@ import subprocess
|
||||
|
||||
import ruff
|
||||
|
||||
from fiona.logging_config import setup_logging
|
||||
|
||||
|
||||
class PythonRuff:
|
||||
|
||||
@@ -137,7 +139,6 @@ def main():
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
from fiona.logging_config import setup_logging
|
||||
|
||||
setup_logging()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user