MegaLinter config: exclude generated files, disable non-applicable linters, fix jscpd threshold - #3833
#3833MegaLinter config: exclude generated files, disable non-applicable linters, fix jscpd threshold#3833plengauer wants to merge 1 commit intomainplengauer/Thoth:mainfrom chore/megalinter-config-triageplengauer/Thoth:chore/megalinter-config-triageCopy head branch name to clipboard
Conversation
…e linters, fix jscpd threshold Follows a full triage of the 2026-07-24 Analyze workflow run. See linked issues for the detailed reasoning behind each change. - Exclude *.lock.yml (gh-aw compiled workflows), demos/**/otlp.json (captured OTel export output), **/gradlew (vendored wrapper), and package-lock.json (npm lockfile) from all list_of_files/file-mode linters. - Scope lychee away from .github/workflows/ (template/placeholder URLs aren't real links to check). - Disable BASH_EXEC (no script here is invoked via `./script.sh`) and JAVASCRIPT_STANDARD (codebase uses semicolons; standard's core style clashes with nearly every line). - Set jscpd threshold to 5% via .jscpd.json (MegaLinter's own default is 0%, which fails on any repo with normal levels of duplication).
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds repository-level MegaLinter and jscpd configuration to reduce noise from generated/vendored artifacts, disable non-applicable linters, and set a more practical duplication threshold.
Changes:
- Add
.mega-linter.ymlto disable selected linters and exclude generated/captured files from linting. - Add
.jscpd.jsonto set a 5% duplication threshold and ignore the same generated/captured files for copy/paste detection. - Exclude
.github/workflows/from Lychee checks to avoid false positives from template/placeholder URLs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .mega-linter.yml | Configures MegaLinter with disabled linters and regex-based excludes (including Lychee-specific excludes). |
| .jscpd.json | Configures jscpd threshold/reporters and ignore globs for generated/vendored files. |
❌MegaLinter analysis: Error
Detailed Issues❌ SPELL / cspell - 4 errors❌ REPOSITORY / devskim - 2027 errorsNo output available ❌ COPYPASTE / jscpd - 811 errors❌ REPOSITORY / kingfisher - 1 errorNo output available ❌ SPELL / lychee - 2 errors❌ REPOSITORY / osv-scanner - 1 error❌ REPOSITORY / trivy - 8 errorsNo output available Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|

Follows a full triage of the 2026-07-24 Analyze workflow run (megalinter log analyzed conversationally, ~30k line CI log). Full writeup and per-finding detail is split across the linked issues; this PR is just the resulting config.
Adds
.mega-linter.yml:DISABLE_LINTERS: [BASH_EXEC, JAVASCRIPT_STANDARD]— see disable/reconfigure tracking issueFILTER_REGEX_EXCLUDEfor*.lock.yml,**/otlp.json,**/gradlew,package-lock.json— see generated-files issueSPELL_LYCHEE_FILTER_REGEX_EXCLUDEfor.github/workflows/— template/placeholder URLs, not real linksAdds
.jscpd.json: raises the copy-paste threshold from MegaLinter's own default of 0% (which fails on any repo with normal duplication) to 5%, and adds the same generated-file ignores (jscpd runs inprojectmode so it can't use the MegaLinter-level filters above).Since
mainis protected (required status checks, PR-only), opening this as a normal PR rather than pushing directly. Merging this will change what the next Analyze run reports — worth reviewing the two files directly before merging.