Skip to content

Commit 92588fe

Browse files
committed
refactor: create unified linting orchestrator
- Replace redundant lint.py with clean orchestrator architecture - Each linter uses its own configuration files (.ansible-lint, .yamllint.yml, pyproject.toml) - Remove duplicate path discovery and file finding logic - Add proper exclusion patterns to avoid scanning third-party collections - Support all linters: ruff, yamllint, ansible-lint, terraform, shellcheck - Provides single interface for all linting operations - Eliminates architectural duplication identified in review
1 parent 8155329 commit 92588fe

File tree

4 files changed

+288
-427
lines changed

4 files changed

+288
-427
lines changed

.ansible-lint

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ quiet: false
66
verbosity: 1
77

88
# Use specific profile
9-
profile: production
9+
profile: shared
1010

1111
# Set paths to exclude from linting
1212
exclude_paths:
@@ -49,10 +49,7 @@ skip_list:
4949
- var-naming[no-role-prefix] # Allow variables without role prefixes
5050

5151
# Rules to enforce
52-
enable_list:
53-
- yaml
54-
- ansible
55-
- syntax-check
52+
# enable_list: -
5653

5754
# Warnings that should be ignored
5855
warn_list:

.pre-commit-config.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ repos:
109109
- id: ansible-lint
110110
name: ansible-lint
111111
description: Lint Ansible playbooks and roles
112-
files: \.(yml|yaml)$
113-
exclude: |
114-
(?x)^(
115-
.github/.*|
116-
docs/.*|
117-
monitoring/.*\.yml|
118-
terraform/.*\.yml|
119-
mkdocs\.yml
120-
)$
121-
args:
122-
- --profile=production
123-
- --offline
124-
- --project-dir=ansible/
112+
# files: \.(yml|yaml)$
113+
# exclude: |
114+
# (?x)^(
115+
# .github/.*|
116+
# docs/.*|
117+
# monitoring/.*\.yml|
118+
# terraform/.*\.yml|
119+
# mkdocs\.yml
120+
# )$
121+
# args:
122+
# - --profile=production
123+
# - --offline
124+
# - --project-dir=ansible/
125125

126126
# === TERRAFORM ===
127127
- repo: https://github.com/antonbabenko/pre-commit-terraform

.yamllint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ ignore: |
1515
node_modules/
1616
.coverage
1717
htmlcov/
18+
.ansible/
19+
logs/
20+
tmp/
21+
site/
1822
1923
rules:
2024
# Line length - allow longer lines for readability

0 commit comments

Comments
 (0)