Repository navigation
chore: clean up code scanning alerts (replace Codacy with CodeQL + pylint) - #1
Merged
Merged
Conversation
The Codacy Analysis CLI bundles three outdated linters (Pylint 1.9.5, Pylint-python3 2.6.0, Prospector 1.2.0) that reported every issue 2-3x and produced hundreds of false positives on modern Python syntax. Replace it with the native github/codeql-action workflow (Python) and drop the now-unused .codacy.yml engine config.
Run modern Pylint (3.x) with all dependencies installed so import resolution works, and tighten .pylintrc: docstring, line-length and complexity rules are now enforced, with pragmatic DESIGN thresholds and justified disables (test patching patterns, per-file error tolerance, compiled Rust extensions).
- jobs.py: add _fetch() shared by the three wget call sites, _base_origin(), _elementor_targets(), and split deploy_page into _scrape/_postprocess/_deploy pipeline steps - optimize.py: add _find_local_assets(), _save_as_modern_format() and _fix_css_format_hints() - postprocess.py: split main() into _clean_html_files/_clean_css_files and move the module docstring above the imports No behavior changes; pipeline messages and ordering are preserved.
- add docstrings to FastAPI handlers, deploy/worker/optimize entrypoints and nested test helpers - raise HTTPException/RuntimeError with explicit exception chaining - blank line before nested defs (E306), idiomatic emptiness and comparison-order asserts in tests
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The Security → Code scanning tab had 166 open alerts, all generated by the Codacy Analysis CLI workflow. Analysis showed the vast majority were tooling noise, not real code issues:
from __future__ import annotations,re.Match,pathlib,subprocess text=→ false positivesbad-whitespace,bad-continuation) conflicting with the project's Black-style alignmentimport-errorspamChanges
ci(security): replace Codacy with native CodeQL (github/codeql-action, Python); deletecodacy.yml+.codacy.ymlci(tests): add a blocking pylint 3.x step totests.yml; merge.pylintrc— re-enable docstring/line-length/complexity rules (now satisfied) while keeping the original author's pragmatic DESIGN thresholdsrefactor(worker): extract helpers (_fetch,_scrape,_postprocess,_deploy,_find_local_assets,_save_as_modern_format,_fix_css_format_hints,_clean_html_files,_clean_css_files) — no behavior changes, pipeline messages and ordering preservedstyle: add missing docstrings, explicit exception chaining (raise ... from None), E306 blank lines, idiomatic assertsdocs(agents): refresh CI workflow docsValidation (inside Docker, per AGENTS.md)
pytest tests/ -q→ 105 passedpylint api worker tests→ 10.00/10After merge
The 166 stale Codacy alerts must be bulk-dismissed (the tool no longer uploads). I'll handle that via
gh apionce CodeQL has run onmainand is confirmed clean.