-
Notifications
You must be signed in to change notification settings - Fork 0
feat(engine): optimize scan performance and update integrity hashes #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,7 +95,8 @@ def scan_directory(self, dir_path: str, exclude_paths: List[str] = None, | |
| prune_list = [ | ||
| "build", "dist", "__pycache__", ".git", "node_modules", | ||
| "target", "venv", ".venv", ".cache", "docs", "artifacts", | ||
| ".anchor", "tests", "benchmarks" | ||
| ".anchor", "tests", "benchmarks", ".yarn", ".next", ".turbo", | ||
| "bower_components", "coverage", ".nyc_output", "storybook-static", "out" | ||
| ] | ||
|
|
||
| if self.verbose: | ||
|
|
@@ -540,7 +541,7 @@ def _get_suppression_author(self, file_path: str, line_num: int) -> str: | |
| # -L <start>,<end> : only blame the specified line | ||
| # --porcelain : machine-readable format | ||
| cmd = ["git", "blame", "-L", f"{line_num},{line_num}", "--porcelain", abs_path] | ||
| result = subprocess.run(cmd, capture_output=True, text=True, check=True) # anchor: ignore ANC-018 | ||
| result = subprocess.run(cmd, capture_output=True, text=True, check=True, timeout=2) # anchor: ignore ANC-018 | ||
|
|
||
|
Comment on lines
+544
to
545
|
||
| # 3. Parse author from porcelain output | ||
| for line in result.stdout.splitlines(): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PolicyEnginedefines_get_suppression_authortwice in this class (another definition earlier in the file). The earlier definition is overwritten by this one, which makes behavior dependent on definition order and likely unintended; please remove/merge into a single implementation with a consistent fallback/return value.