MCPcopy Create free account
hub / github.com/FastLED/FastLED / run_single_file_mode

Function run_single_file_mode

ci/lint.py:41–66  ·  view source on GitHub ↗

Run linting on specific files, auto-detecting type by extension. Args: files: List of absolute file paths to lint strict: If True, run pyright on Python files and IWYU on C++ files

(
    files: list[str], strict: bool, use_rust_cpp_lint: bool
)

Source from the content-addressed store, hash-verified

39
40
41def run_single_file_mode(
42 files: list[str], strict: bool, use_rust_cpp_lint: bool
43) -> bool:
44 """Run linting on specific files, auto-detecting type by extension.
45
46 Args:
47 files: List of absolute file paths to lint
48 strict: If True, run pyright on Python files and IWYU on C++ files
49 """
50 success = True
51 for file_path in files:
52 ext = Path(file_path).suffix.lower()
53 if ext in CPP_EXTENSIONS:
54 if not run_cpp_lint_single_file(
55 file_path, strict=strict, use_rust_cpp_lint=use_rust_cpp_lint
56 ):
57 success = False
58 elif ext in PYTHON_EXTENSIONS:
59 if not run_python_lint_single_file(file_path, strict=strict):
60 success = False
61 elif ext in JS_EXTENSIONS:
62 if not run_js_lint_single_file(file_path):
63 success = False
64 else:
65 print(f"⚠️ Unknown file type: {file_path} (skipping)")
66 return success
67
68
69def cleanup_visual_studio_files() -> None:

Callers 1

mainFunction · 0.85

Calls 4

run_cpp_lint_single_fileFunction · 0.90
run_js_lint_single_fileFunction · 0.90
printFunction · 0.50

Tested by

no test coverage detected