Skip to content

Commit f65fe24

Browse files
authored
Disable 1770523057 (#48)
* Fixed eslint exceptions 1770523444 * Fixed eslint exceptions 1770523695
1 parent 3869ab4 commit f65fe24

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/scripts/disable_statements_check.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,22 @@ def check_eslint_disable(self, content: str, file_path: str) -> list[str]:
4141
violations: List of violation messages.
4242
"""
4343
violations = []
44+
filename_exceptions = [
45+
"test/graphql/types/gql.tada-cache.d.ts",
46+
"test/graphql/types/gql.tada.d.ts",
47+
]
4448
pattern = re.compile(
4549
r"\/\*?\s*eslint-disable(?:-next-line|"
4650
r"-line)?\s(?:\S+)?\s*\*?\/?",
4751
re.IGNORECASE,
4852
)
4953

54+
# Skip exceptions
55+
for item in filename_exceptions:
56+
if item in file_path:
57+
return violations
58+
59+
# Process content
5060
for match in pattern.finditer(content):
5161
line_num = content[: match.start()].count("\n") + 1
5262
violations.append(
@@ -205,12 +215,6 @@ def check_file(self, file_path: str) -> list[str]:
205215
if f".{extension.lower()}" not in VALID_EXTENSIONS:
206216
return violations
207217

208-
# for item in VALID_EXTENSIONS:
209-
# print(item)
210-
# if not file_path.endswith(item):
211-
212-
print(file_path)
213-
214218
# Check if it's a test file
215219
is_test_file = file_path.endswith(
216220
(".test.ts", ".spec.ts", ".test.tsx", ".spec.tsx")
@@ -222,8 +226,6 @@ def check_file(self, file_path: str) -> list[str]:
222226
except (OSError, UnicodeDecodeError) as e:
223227
return [f"{file_path}: Error reading file - {e}"]
224228

225-
print(content)
226-
227229
# Auto-discover and run all check methods
228230
# Patterns are naturally specific - they only match in files
229231
# where they exist
@@ -241,7 +243,6 @@ def check_file(self, file_path: str) -> list[str]:
241243

242244
violations.extend(method(content, file_path))
243245

244-
print("boo", violations)
245246
return violations
246247

247248
def check_files(self, file_paths: list[str]) -> list[str]:

0 commit comments

Comments
 (0)