assert-no-linter-config-files 20260103181222__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- assert_no_linter_config_files/__init__.py +0 -0
- assert_no_linter_config_files/__main__.py +5 -0
- assert_no_linter_config_files/cli.py +209 -0
- assert_no_linter_config_files/py.typed +0 -0
- assert_no_linter_config_files/scanner.py +320 -0
- assert_no_linter_config_files-20260103181222.dist-info/METADATA +180 -0
- assert_no_linter_config_files-20260103181222.dist-info/RECORD +11 -0
- assert_no_linter_config_files-20260103181222.dist-info/WHEEL +5 -0
- assert_no_linter_config_files-20260103181222.dist-info/entry_points.txt +2 -0
- assert_no_linter_config_files-20260103181222.dist-info/licenses/LICENSE.txt +190 -0
- assert_no_linter_config_files-20260103181222.dist-info/top_level.txt +1 -0
|
File without changes
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"""Command-line interface for assert-no-linter-config-files."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import json
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from .scanner import (
|
|
9
|
+
VALID_LINTERS,
|
|
10
|
+
Finding,
|
|
11
|
+
get_config_files_for_linters,
|
|
12
|
+
parse_linters,
|
|
13
|
+
scan_directory,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
EXIT_SUCCESS = 0
|
|
17
|
+
EXIT_FINDINGS = 1
|
|
18
|
+
EXIT_ERROR = 2
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def create_parser() -> argparse.ArgumentParser:
|
|
22
|
+
"""Create and configure the argument parser."""
|
|
23
|
+
linters_list = ", ".join(sorted(VALID_LINTERS))
|
|
24
|
+
|
|
25
|
+
parser = argparse.ArgumentParser(
|
|
26
|
+
prog="assert-no-linter-config-files",
|
|
27
|
+
description="Assert that no linter config files exist in directories.",
|
|
28
|
+
)
|
|
29
|
+
parser.add_argument(
|
|
30
|
+
"directories",
|
|
31
|
+
nargs="+",
|
|
32
|
+
type=Path,
|
|
33
|
+
metavar="DIRECTORY",
|
|
34
|
+
help="One or more directories to scan.",
|
|
35
|
+
)
|
|
36
|
+
parser.add_argument(
|
|
37
|
+
"--linters",
|
|
38
|
+
required=True,
|
|
39
|
+
metavar="LINTERS",
|
|
40
|
+
help=f"Comma-separated linters to check. Options: {linters_list}",
|
|
41
|
+
)
|
|
42
|
+
parser.add_argument(
|
|
43
|
+
"--exclude",
|
|
44
|
+
action="append",
|
|
45
|
+
default=None,
|
|
46
|
+
metavar="PATTERN",
|
|
47
|
+
help="Glob pattern to exclude paths (repeatable).",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
# Output mode group (mutually exclusive)
|
|
51
|
+
output_group = parser.add_mutually_exclusive_group()
|
|
52
|
+
output_group.add_argument(
|
|
53
|
+
"--quiet",
|
|
54
|
+
action="store_true",
|
|
55
|
+
help="Suppress output, exit code only.",
|
|
56
|
+
)
|
|
57
|
+
output_group.add_argument(
|
|
58
|
+
"--count",
|
|
59
|
+
action="store_true",
|
|
60
|
+
help="Print finding count only.",
|
|
61
|
+
)
|
|
62
|
+
output_group.add_argument(
|
|
63
|
+
"--json",
|
|
64
|
+
action="store_true",
|
|
65
|
+
help="Output findings as JSON.",
|
|
66
|
+
)
|
|
67
|
+
output_group.add_argument(
|
|
68
|
+
"-v",
|
|
69
|
+
"--verbose",
|
|
70
|
+
action="store_true",
|
|
71
|
+
help="Show linters, directories scanned, findings, and summary.",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Behavior modifiers (mutually exclusive)
|
|
75
|
+
behavior_group = parser.add_mutually_exclusive_group()
|
|
76
|
+
behavior_group.add_argument(
|
|
77
|
+
"--fail-fast",
|
|
78
|
+
action="store_true",
|
|
79
|
+
help="Exit on first finding.",
|
|
80
|
+
)
|
|
81
|
+
behavior_group.add_argument(
|
|
82
|
+
"--warn-only",
|
|
83
|
+
action="store_true",
|
|
84
|
+
help="Always exit 0, report only.",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
return parser
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def output_findings(
|
|
91
|
+
findings: list[Finding],
|
|
92
|
+
use_json: bool,
|
|
93
|
+
use_count: bool,
|
|
94
|
+
) -> None:
|
|
95
|
+
"""Output findings in the appropriate format."""
|
|
96
|
+
if use_json:
|
|
97
|
+
print(json.dumps([f.to_dict() for f in findings]))
|
|
98
|
+
elif use_count:
|
|
99
|
+
print(len(findings))
|
|
100
|
+
else:
|
|
101
|
+
for finding in findings:
|
|
102
|
+
print(finding)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def _print_verbose_summary(dirs_scanned: int, finding_count: int) -> None:
|
|
106
|
+
"""Print verbose summary of scan results."""
|
|
107
|
+
print(f"Scanned {dirs_scanned} directory(ies), found {finding_count} finding(s)")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _handle_fail_fast(
|
|
111
|
+
finding: Finding,
|
|
112
|
+
dirs_scanned: int,
|
|
113
|
+
args: argparse.Namespace,
|
|
114
|
+
) -> None:
|
|
115
|
+
"""Handle fail-fast output and exit."""
|
|
116
|
+
if args.verbose:
|
|
117
|
+
print(finding)
|
|
118
|
+
_print_verbose_summary(dirs_scanned, 1)
|
|
119
|
+
elif not args.quiet:
|
|
120
|
+
output_findings([finding], args.json, args.count)
|
|
121
|
+
sys.exit(EXIT_FINDINGS)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _determine_exit_code(
|
|
125
|
+
all_findings: list[Finding],
|
|
126
|
+
had_error: bool,
|
|
127
|
+
warn_only: bool,
|
|
128
|
+
) -> int:
|
|
129
|
+
"""Determine the exit code based on results."""
|
|
130
|
+
if warn_only:
|
|
131
|
+
return EXIT_SUCCESS
|
|
132
|
+
if all_findings:
|
|
133
|
+
return EXIT_FINDINGS
|
|
134
|
+
if had_error:
|
|
135
|
+
return EXIT_ERROR
|
|
136
|
+
return EXIT_SUCCESS
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def _process_directory(
|
|
140
|
+
directory: Path,
|
|
141
|
+
args: argparse.Namespace,
|
|
142
|
+
linters: frozenset[str],
|
|
143
|
+
dirs_scanned: int,
|
|
144
|
+
all_findings: list[Finding],
|
|
145
|
+
) -> tuple[int, bool]:
|
|
146
|
+
"""Process a single directory. Returns (dirs_scanned, had_error)."""
|
|
147
|
+
if args.verbose:
|
|
148
|
+
print(f"Scanning: {directory}")
|
|
149
|
+
|
|
150
|
+
try:
|
|
151
|
+
findings = scan_directory(
|
|
152
|
+
directory,
|
|
153
|
+
linters=linters,
|
|
154
|
+
exclude_patterns=args.exclude,
|
|
155
|
+
)
|
|
156
|
+
dirs_scanned += 1
|
|
157
|
+
|
|
158
|
+
if findings and args.fail_fast:
|
|
159
|
+
_handle_fail_fast(findings[0], dirs_scanned, args)
|
|
160
|
+
|
|
161
|
+
if args.verbose:
|
|
162
|
+
for finding in findings:
|
|
163
|
+
print(finding)
|
|
164
|
+
|
|
165
|
+
all_findings.extend(findings)
|
|
166
|
+
return dirs_scanned, False
|
|
167
|
+
except OSError as e:
|
|
168
|
+
print(f"Error reading: {e}", file=sys.stderr)
|
|
169
|
+
return dirs_scanned, True
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def main() -> None:
|
|
173
|
+
"""Run the assert-no-linter-config-files CLI."""
|
|
174
|
+
parser = create_parser()
|
|
175
|
+
args = parser.parse_args()
|
|
176
|
+
|
|
177
|
+
try:
|
|
178
|
+
linters = parse_linters(args.linters)
|
|
179
|
+
except ValueError as e:
|
|
180
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
181
|
+
sys.exit(EXIT_ERROR)
|
|
182
|
+
|
|
183
|
+
if args.verbose:
|
|
184
|
+
print(f"Checking for: {', '.join(sorted(linters))}")
|
|
185
|
+
config_files = get_config_files_for_linters(linters)
|
|
186
|
+
for linter, configs in config_files.items():
|
|
187
|
+
print(f" {linter}: {', '.join(configs)}")
|
|
188
|
+
|
|
189
|
+
all_findings: list[Finding] = []
|
|
190
|
+
had_error = False
|
|
191
|
+
dirs_scanned = 0
|
|
192
|
+
|
|
193
|
+
for directory in args.directories:
|
|
194
|
+
if not directory.is_dir():
|
|
195
|
+
print(f"Error: '{directory}' is not a directory", file=sys.stderr)
|
|
196
|
+
had_error = True
|
|
197
|
+
continue
|
|
198
|
+
|
|
199
|
+
dirs_scanned, dir_error = _process_directory(
|
|
200
|
+
directory, args, linters, dirs_scanned, all_findings
|
|
201
|
+
)
|
|
202
|
+
had_error = had_error or dir_error
|
|
203
|
+
|
|
204
|
+
if args.verbose:
|
|
205
|
+
_print_verbose_summary(dirs_scanned, len(all_findings))
|
|
206
|
+
elif not args.quiet:
|
|
207
|
+
output_findings(all_findings, args.json, args.count)
|
|
208
|
+
|
|
209
|
+
sys.exit(_determine_exit_code(all_findings, had_error, args.warn_only))
|
|
File without changes
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"""Scanner for detecting linter configuration files and sections."""
|
|
2
|
+
|
|
3
|
+
import configparser
|
|
4
|
+
import fnmatch
|
|
5
|
+
import os
|
|
6
|
+
import re
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
import tomllib
|
|
12
|
+
HAS_TOMLLIB = True
|
|
13
|
+
except ImportError: # pragma: no cover (Python < 3.11)
|
|
14
|
+
HAS_TOMLLIB = False
|
|
15
|
+
|
|
16
|
+
VALID_LINTERS: frozenset[str] = frozenset({
|
|
17
|
+
"pylint", "pytest", "mypy", "yamllint", "jscpd"
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
DEDICATED_CONFIG_FILES: dict[str, str] = {
|
|
21
|
+
".pylintrc": "pylint",
|
|
22
|
+
"pylintrc": "pylint",
|
|
23
|
+
".pylintrc.toml": "pylint",
|
|
24
|
+
"pytest.ini": "pytest",
|
|
25
|
+
"mypy.ini": "mypy",
|
|
26
|
+
".mypy.ini": "mypy",
|
|
27
|
+
".yamllint": "yamllint",
|
|
28
|
+
".yamllint.yml": "yamllint",
|
|
29
|
+
".yamllint.yaml": "yamllint",
|
|
30
|
+
".jscpd.json": "jscpd",
|
|
31
|
+
".jscpd.yml": "jscpd",
|
|
32
|
+
".jscpd.yaml": "jscpd",
|
|
33
|
+
".jscpd.toml": "jscpd",
|
|
34
|
+
".jscpdrc": "jscpd",
|
|
35
|
+
".jscpdrc.json": "jscpd",
|
|
36
|
+
".jscpdrc.yml": "jscpd",
|
|
37
|
+
".jscpdrc.yaml": "jscpd",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
SHARED_CONFIG_SECTIONS: dict[str, dict[str, str]] = {
|
|
41
|
+
"pylint": {
|
|
42
|
+
"pyproject.toml": "[tool.pylint.*]",
|
|
43
|
+
"setup.cfg": "[pylint.*]",
|
|
44
|
+
"tox.ini": "[pylint.*]",
|
|
45
|
+
},
|
|
46
|
+
"pytest": {
|
|
47
|
+
"pyproject.toml": "[tool.pytest.ini_options]",
|
|
48
|
+
"setup.cfg": "[tool:pytest]",
|
|
49
|
+
"tox.ini": "[pytest] or [tool:pytest]",
|
|
50
|
+
},
|
|
51
|
+
"mypy": {
|
|
52
|
+
"pyproject.toml": "[tool.mypy]",
|
|
53
|
+
"setup.cfg": "[mypy]",
|
|
54
|
+
"tox.ini": "[mypy]",
|
|
55
|
+
},
|
|
56
|
+
"yamllint": {
|
|
57
|
+
"pyproject.toml": "[tool.yamllint.*]",
|
|
58
|
+
},
|
|
59
|
+
"jscpd": {
|
|
60
|
+
"pyproject.toml": "[tool.jscpd.*]",
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def get_config_files_for_linters(linters: frozenset[str]) -> dict[str, list[str]]:
|
|
66
|
+
"""Get the config files that will be checked for each linter.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
linters: Set of linter names to get config files for.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
Dictionary mapping each linter to its list of config file descriptions.
|
|
73
|
+
"""
|
|
74
|
+
result: dict[str, list[str]] = {}
|
|
75
|
+
|
|
76
|
+
for linter in sorted(linters):
|
|
77
|
+
configs: list[str] = []
|
|
78
|
+
|
|
79
|
+
# Add dedicated config files
|
|
80
|
+
dedicated = sorted(
|
|
81
|
+
filename for filename, tool in DEDICATED_CONFIG_FILES.items()
|
|
82
|
+
if tool == linter
|
|
83
|
+
)
|
|
84
|
+
configs.extend(dedicated)
|
|
85
|
+
|
|
86
|
+
# Add shared config sections
|
|
87
|
+
if linter in SHARED_CONFIG_SECTIONS:
|
|
88
|
+
for shared_file, section in SHARED_CONFIG_SECTIONS[linter].items():
|
|
89
|
+
configs.append(f"{section} in {shared_file}")
|
|
90
|
+
|
|
91
|
+
result[linter] = configs
|
|
92
|
+
|
|
93
|
+
return result
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def make_path_relative(path: str) -> str:
|
|
97
|
+
"""Convert an absolute path to a relative path from cwd."""
|
|
98
|
+
try:
|
|
99
|
+
return str(Path(path).relative_to(Path.cwd()))
|
|
100
|
+
except ValueError:
|
|
101
|
+
return path
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@dataclass(frozen=True)
|
|
105
|
+
class Finding:
|
|
106
|
+
"""Represents a detected linter configuration."""
|
|
107
|
+
|
|
108
|
+
path: str
|
|
109
|
+
tool: str
|
|
110
|
+
reason: str
|
|
111
|
+
|
|
112
|
+
def __str__(self) -> str:
|
|
113
|
+
"""Format the finding as path:tool:reason."""
|
|
114
|
+
relative_path = make_path_relative(self.path)
|
|
115
|
+
return f"{relative_path}:{self.tool}:{self.reason}"
|
|
116
|
+
|
|
117
|
+
def to_dict(self) -> dict[str, str]:
|
|
118
|
+
"""Convert finding to dictionary for JSON output."""
|
|
119
|
+
return {
|
|
120
|
+
"path": self.path,
|
|
121
|
+
"tool": self.tool,
|
|
122
|
+
"reason": self.reason,
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def parse_linters(linters_str: str) -> frozenset[str]:
|
|
127
|
+
"""Parse comma-separated linters string and validate.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
linters_str: Comma-separated list of linter names.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
Frozenset of valid linter names.
|
|
134
|
+
|
|
135
|
+
Raises:
|
|
136
|
+
ValueError: If any linter name is invalid.
|
|
137
|
+
"""
|
|
138
|
+
linters = frozenset(
|
|
139
|
+
t.strip().lower() for t in linters_str.split(",") if t.strip()
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
invalid = linters - VALID_LINTERS
|
|
143
|
+
if invalid:
|
|
144
|
+
valid_list = ", ".join(sorted(VALID_LINTERS))
|
|
145
|
+
invalid_list = ", ".join(sorted(invalid))
|
|
146
|
+
raise ValueError(
|
|
147
|
+
f"Invalid linter(s): {invalid_list}. Valid options: {valid_list}"
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
if not linters:
|
|
151
|
+
raise ValueError("At least one linter must be specified")
|
|
152
|
+
|
|
153
|
+
return linters
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def _check_pyproject_with_tomllib(
|
|
157
|
+
path_str: str, tool_section: dict[str, object]
|
|
158
|
+
) -> list[Finding]:
|
|
159
|
+
"""Check tool section using parsed TOML data."""
|
|
160
|
+
findings: list[Finding] = []
|
|
161
|
+
if "pylint" in tool_section:
|
|
162
|
+
findings.append(Finding(path_str, "pylint", "tool.pylint section"))
|
|
163
|
+
if "mypy" in tool_section:
|
|
164
|
+
findings.append(Finding(path_str, "mypy", "tool.mypy section"))
|
|
165
|
+
if "pytest" in tool_section:
|
|
166
|
+
pytest_section = tool_section["pytest"]
|
|
167
|
+
if isinstance(pytest_section, dict) and "ini_options" in pytest_section:
|
|
168
|
+
findings.append(
|
|
169
|
+
Finding(path_str, "pytest", "tool.pytest.ini_options section")
|
|
170
|
+
)
|
|
171
|
+
if "jscpd" in tool_section:
|
|
172
|
+
findings.append(Finding(path_str, "jscpd", "tool.jscpd section"))
|
|
173
|
+
if "yamllint" in tool_section:
|
|
174
|
+
findings.append(Finding(path_str, "yamllint", "tool.yamllint section"))
|
|
175
|
+
return findings
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def _check_pyproject_with_regex(path_str: str, content: str) -> list[Finding]:
|
|
179
|
+
"""Check pyproject.toml content using regex fallback."""
|
|
180
|
+
findings: list[Finding] = []
|
|
181
|
+
if re.search(r"^\[tool\.pylint", content, re.MULTILINE):
|
|
182
|
+
findings.append(Finding(path_str, "pylint", "tool.pylint section"))
|
|
183
|
+
if re.search(r"^\[tool\.mypy\]", content, re.MULTILINE):
|
|
184
|
+
findings.append(Finding(path_str, "mypy", "tool.mypy section"))
|
|
185
|
+
if re.search(r"^\[tool\.pytest\.ini_options\]", content, re.MULTILINE):
|
|
186
|
+
findings.append(
|
|
187
|
+
Finding(path_str, "pytest", "tool.pytest.ini_options section")
|
|
188
|
+
)
|
|
189
|
+
if re.search(r"^\[tool\.jscpd", content, re.MULTILINE):
|
|
190
|
+
findings.append(Finding(path_str, "jscpd", "tool.jscpd section"))
|
|
191
|
+
if re.search(r"^\[tool\.yamllint", content, re.MULTILINE):
|
|
192
|
+
findings.append(Finding(path_str, "yamllint", "tool.yamllint section"))
|
|
193
|
+
return findings
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def check_pyproject_toml(path: Path, content: str) -> list[Finding]:
|
|
197
|
+
"""Check pyproject.toml for tool-specific sections."""
|
|
198
|
+
path_str = str(path)
|
|
199
|
+
|
|
200
|
+
if HAS_TOMLLIB:
|
|
201
|
+
try:
|
|
202
|
+
data = tomllib.loads(content)
|
|
203
|
+
tool_section = data.get("tool", {})
|
|
204
|
+
return _check_pyproject_with_tomllib(path_str, tool_section)
|
|
205
|
+
except (tomllib.TOMLDecodeError, ValueError, KeyError, TypeError):
|
|
206
|
+
pass
|
|
207
|
+
|
|
208
|
+
return _check_pyproject_with_regex(path_str, content)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def check_setup_cfg(path: Path, content: str) -> list[Finding]:
|
|
212
|
+
"""Check setup.cfg for tool-specific sections."""
|
|
213
|
+
findings: list[Finding] = []
|
|
214
|
+
path_str = str(path)
|
|
215
|
+
|
|
216
|
+
parser = configparser.ConfigParser()
|
|
217
|
+
try:
|
|
218
|
+
parser.read_string(content)
|
|
219
|
+
except configparser.Error:
|
|
220
|
+
return findings
|
|
221
|
+
|
|
222
|
+
for section in parser.sections():
|
|
223
|
+
if section == "mypy":
|
|
224
|
+
findings.append(Finding(path_str, "mypy", "mypy section"))
|
|
225
|
+
elif section == "tool:pytest":
|
|
226
|
+
findings.append(Finding(path_str, "pytest", "tool:pytest section"))
|
|
227
|
+
elif "pylint" in section.lower():
|
|
228
|
+
findings.append(Finding(path_str, "pylint", f"{section} section"))
|
|
229
|
+
|
|
230
|
+
return findings
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def check_tox_ini(path: Path, content: str) -> list[Finding]:
|
|
234
|
+
"""Check tox.ini for tool-specific sections."""
|
|
235
|
+
findings: list[Finding] = []
|
|
236
|
+
path_str = str(path)
|
|
237
|
+
|
|
238
|
+
parser = configparser.ConfigParser()
|
|
239
|
+
try:
|
|
240
|
+
parser.read_string(content)
|
|
241
|
+
except configparser.Error:
|
|
242
|
+
return findings
|
|
243
|
+
|
|
244
|
+
for section in parser.sections():
|
|
245
|
+
if section in ("pytest", "tool:pytest"):
|
|
246
|
+
findings.append(Finding(path_str, "pytest", f"{section} section"))
|
|
247
|
+
elif section == "mypy":
|
|
248
|
+
findings.append(Finding(path_str, "mypy", "mypy section"))
|
|
249
|
+
elif "pylint" in section.lower():
|
|
250
|
+
findings.append(Finding(path_str, "pylint", f"{section} section"))
|
|
251
|
+
|
|
252
|
+
return findings
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _process_shared_config_file(
|
|
256
|
+
file_path: Path, filename: str
|
|
257
|
+
) -> list[Finding]:
|
|
258
|
+
"""Process shared config files (pyproject.toml, setup.cfg, tox.ini)."""
|
|
259
|
+
content = file_path.read_text(encoding="utf-8")
|
|
260
|
+
if filename == "pyproject.toml":
|
|
261
|
+
return check_pyproject_toml(file_path, content)
|
|
262
|
+
if filename == "setup.cfg":
|
|
263
|
+
return check_setup_cfg(file_path, content)
|
|
264
|
+
# filename == "tox.ini"
|
|
265
|
+
return check_tox_ini(file_path, content)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def _matches_exclude_pattern(
|
|
269
|
+
path: str, exclude_patterns: list[str]
|
|
270
|
+
) -> bool:
|
|
271
|
+
"""Check if path matches any exclude pattern."""
|
|
272
|
+
for pattern in exclude_patterns:
|
|
273
|
+
if fnmatch.fnmatch(path, pattern):
|
|
274
|
+
return True
|
|
275
|
+
return False
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
def scan_directory(
|
|
279
|
+
directory: Path,
|
|
280
|
+
linters: frozenset[str],
|
|
281
|
+
exclude_patterns: list[str] | None = None,
|
|
282
|
+
) -> list[Finding]:
|
|
283
|
+
"""Scan a directory recursively for linter configuration files.
|
|
284
|
+
|
|
285
|
+
Args:
|
|
286
|
+
directory: The directory to scan.
|
|
287
|
+
linters: Set of linters to check.
|
|
288
|
+
exclude_patterns: List of glob patterns to exclude paths.
|
|
289
|
+
|
|
290
|
+
Returns:
|
|
291
|
+
A list of Finding objects for each config found.
|
|
292
|
+
"""
|
|
293
|
+
if exclude_patterns is None:
|
|
294
|
+
exclude_patterns = []
|
|
295
|
+
|
|
296
|
+
findings: list[Finding] = []
|
|
297
|
+
shared_config_files = {"pyproject.toml", "setup.cfg", "tox.ini"}
|
|
298
|
+
|
|
299
|
+
for root, dirs, files in os.walk(directory):
|
|
300
|
+
if ".git" in dirs:
|
|
301
|
+
dirs.remove(".git")
|
|
302
|
+
|
|
303
|
+
for filename in files:
|
|
304
|
+
file_path = Path(root) / filename
|
|
305
|
+
path_str = str(file_path)
|
|
306
|
+
|
|
307
|
+
# Check exclude patterns
|
|
308
|
+
if _matches_exclude_pattern(path_str, exclude_patterns):
|
|
309
|
+
continue
|
|
310
|
+
|
|
311
|
+
if filename in DEDICATED_CONFIG_FILES:
|
|
312
|
+
tool = DEDICATED_CONFIG_FILES[filename]
|
|
313
|
+
if tool in linters:
|
|
314
|
+
findings.append(Finding(path_str, tool, "config file"))
|
|
315
|
+
elif filename in shared_config_files:
|
|
316
|
+
file_findings = _process_shared_config_file(file_path, filename)
|
|
317
|
+
# Filter by requested linters
|
|
318
|
+
findings.extend(f for f in file_findings if f.tool in linters)
|
|
319
|
+
|
|
320
|
+
return findings
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: assert-no-linter-config-files
|
|
3
|
+
Version: 20260103181222
|
|
4
|
+
Summary: CLI tool to assert that no linter config files exist
|
|
5
|
+
Author-email: 10U Labs <dev@10ulabs.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/10U-Labs-LLC/assert-no-linter-config-files
|
|
8
|
+
Project-URL: Issues, https://github.com/10U-Labs-LLC/assert-no-linter-config-files/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/10U-Labs-LLC/assert-no-linter-config-files
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE.txt
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# assert-no-linter-config-files
|
|
25
|
+
|
|
26
|
+
A command-line tool that asserts there are no configuration files (or embedded
|
|
27
|
+
configuration sections) for common linters in your codebase. This is useful for
|
|
28
|
+
enforcing that linter configurations are managed centrally rather than in
|
|
29
|
+
individual repositories.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install assert-no-linter-config-files
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or install from source:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install -e .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
assert-no-linter-config-files --linters LINTERS [OPTIONS] DIRECTORY [DIRECTORY ...]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Required Arguments
|
|
50
|
+
|
|
51
|
+
- `--linters LINTERS` - Comma-separated linters to check: `pylint,mypy,pytest,yamllint,jscpd`
|
|
52
|
+
- `DIRECTORY` - One or more directories to scan
|
|
53
|
+
|
|
54
|
+
### Optional Arguments
|
|
55
|
+
|
|
56
|
+
- `--exclude PATTERN` - Glob pattern to exclude paths (repeatable)
|
|
57
|
+
- `--quiet` - Suppress output, exit code only
|
|
58
|
+
- `--count` - Print finding count only
|
|
59
|
+
- `--json` - Output findings as JSON
|
|
60
|
+
- `--fail-fast` - Exit on first finding
|
|
61
|
+
- `--warn-only` - Always exit 0, report only
|
|
62
|
+
|
|
63
|
+
### Exit Codes
|
|
64
|
+
|
|
65
|
+
- `0` - No linter configuration found (or `--warn-only`)
|
|
66
|
+
- `1` - One or more linter configurations found
|
|
67
|
+
- `2` - Usage/runtime error (invalid args, unreadable files)
|
|
68
|
+
|
|
69
|
+
### Examples
|
|
70
|
+
|
|
71
|
+
Check for pylint and mypy configs in the current directory:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
assert-no-linter-config-files --linters pylint,mypy .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Check specific directories:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
assert-no-linter-config-files --linters pylint,mypy src/ tests/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Check all linters:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
assert-no-linter-config-files --linters pylint,mypy,pytest,yamllint,jscpd .
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Exclude vendor directories:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
assert-no-linter-config-files --linters pylint,mypy \
|
|
93
|
+
--exclude "*vendor*" --exclude "*node_modules*" .
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Get JSON output for CI integration:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
assert-no-linter-config-files --linters pylint --json . | jq .
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use in CI to enforce no local linter configs:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
assert-no-linter-config-files --linters pylint,mypy . || exit 1
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## What It Checks
|
|
109
|
+
|
|
110
|
+
### Dedicated Config Files
|
|
111
|
+
|
|
112
|
+
The tool flags the presence of these files anywhere in the scanned tree:
|
|
113
|
+
|
|
114
|
+
**pylint:** `.pylintrc`, `pylintrc`, `.pylintrc.toml`
|
|
115
|
+
|
|
116
|
+
**pytest:** `pytest.ini`
|
|
117
|
+
|
|
118
|
+
**mypy:** `mypy.ini`, `.mypy.ini`
|
|
119
|
+
|
|
120
|
+
**yamllint:** `.yamllint`, `.yamllint.yml`, `.yamllint.yaml`
|
|
121
|
+
|
|
122
|
+
**jscpd:** `.jscpd.json`, `.jscpd.yml`, `.jscpd.yaml`, `.jscpd.toml`,
|
|
123
|
+
`.jscpdrc`, `.jscpdrc.json`, `.jscpdrc.yml`, `.jscpdrc.yaml`
|
|
124
|
+
|
|
125
|
+
### Embedded Config Sections
|
|
126
|
+
|
|
127
|
+
The tool also checks shared config files for tool-specific sections:
|
|
128
|
+
|
|
129
|
+
**pyproject.toml:**
|
|
130
|
+
|
|
131
|
+
- `[tool.pylint]` or `[tool.pylint.*]`
|
|
132
|
+
- `[tool.mypy]`
|
|
133
|
+
- `[tool.pytest.ini_options]`
|
|
134
|
+
- `[tool.jscpd]`
|
|
135
|
+
- `[tool.yamllint]`
|
|
136
|
+
|
|
137
|
+
**setup.cfg:**
|
|
138
|
+
|
|
139
|
+
- `[mypy]`
|
|
140
|
+
- `[tool:pytest]`
|
|
141
|
+
- Any section containing "pylint"
|
|
142
|
+
|
|
143
|
+
**tox.ini:**
|
|
144
|
+
|
|
145
|
+
- `[pytest]` or `[tool:pytest]`
|
|
146
|
+
- `[mypy]`
|
|
147
|
+
- Any section containing "pylint"
|
|
148
|
+
|
|
149
|
+
## Output Format
|
|
150
|
+
|
|
151
|
+
When findings are detected, each is printed on a separate line:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
<path>:<tool>:<reason>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Examples:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
./pytest.ini:pytest:config file
|
|
161
|
+
./pyproject.toml:mypy:tool.mypy section
|
|
162
|
+
./setup.cfg:pylint:pylint.messages_control section
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
With `--json`:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
[{"path": "./pytest.ini", "tool": "pytest", "reason": "config file"}]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## CI Checks
|
|
172
|
+
|
|
173
|
+
The following checks run on every push and pull request:
|
|
174
|
+
|
|
175
|
+
- **yamllint** - YAML linting for workflow files
|
|
176
|
+
- **markdownlint** - Markdown linting
|
|
177
|
+
- **pylint** - Python linting for source and test code
|
|
178
|
+
- **mypy** - Static type checking for source code
|
|
179
|
+
- **jscpd** - Duplicate code detection
|
|
180
|
+
- **pytest** - Unit, integration, and E2E tests
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
assert_no_linter_config_files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
assert_no_linter_config_files/__main__.py,sha256=U8gT1p3t8bAvDLQg1fmWUG9ihjuLGiKGwiselStVBik,94
|
|
3
|
+
assert_no_linter_config_files/cli.py,sha256=XUJOYlvB8_ShGqZ3sMg_unkSaNa6-rdlSNQDvzoCs9w,5607
|
|
4
|
+
assert_no_linter_config_files/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
assert_no_linter_config_files/scanner.py,sha256=RPXba8HlM6m5L3j_1NB30VASgKEy7zduEbsRuk-_4UQ,10062
|
|
6
|
+
assert_no_linter_config_files-20260103181222.dist-info/licenses/LICENSE.txt,sha256=dl6gJivslVJcwUu-EWVFNCR64UpMpEXiz4olTSt17Sg,10761
|
|
7
|
+
assert_no_linter_config_files-20260103181222.dist-info/METADATA,sha256=nA1VBYfZIQlj93t08eCDw11jvI5FRsopegxJ6ME9Eko,4508
|
|
8
|
+
assert_no_linter_config_files-20260103181222.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
assert_no_linter_config_files-20260103181222.dist-info/entry_points.txt,sha256=qQrnULgXqcS_n_5453-LciShwVjtUMUDTnPOGM-TPlo,89
|
|
10
|
+
assert_no_linter_config_files-20260103181222.dist-info/top_level.txt,sha256=c8bMFXQQuhU_Bwj8vQGdzkJMWad69k8z5WVkByghxcw,30
|
|
11
|
+
assert_no_linter_config_files-20260103181222.dist-info/RECORD,,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 10U Labs LLC
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
assert_no_linter_config_files
|