Add MegaLinter config for non-applicable rules and jscpd threshold#3865
Conversation
|
Hello, thanks for contributing for the first time! |
❌MegaLinter analysis: Error
Detailed Issues❌ SPELL / cspell - 4 errors❌ REPOSITORY / devskim - 2027 errorsNo output available ❌ REPOSITORY / grype - 2 errorsNo output available ❌ COPYPASTE / jscpd - 811 errors❌ REPOSITORY / kingfisher - 1 errorNo output available ❌ SPELL / lychee - 2 errors❌ REPOSITORY / osv-scanner - 2 errors❌ REPOSITORY / trivy - 11 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
|
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 non-actionable findings and make duplication checks usable in this repo’s workflow model.
Changes:
- Introduces
.mega-linter.ymlto disable non-applicable linters and exclude generated/captured artifacts from broad file-mode linting. - Narrows Lychee scope to reader-facing content by excluding
.github/workflows/. - Adds
.jscpd.jsonwith an explicit duplication threshold and ignore list aligned to generated artifacts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .mega-linter.yml | Disables selected linters and excludes generated/captured paths; scopes Lychee away from workflows. |
| .jscpd.json | Sets jscpd threshold/reporters and ignores generated/artifact files for project runs. |

This adds repository-level MegaLinter configuration for findings that do not map cleanly to this repo’s execution model, and makes jscpd usable by replacing MegaLinter’s effectively-zero-tolerance default with an explicit threshold.
Disable non-applicable linters
BASH_EXEC: shell files here are sourced, piped intosh, invoked via explicit interpreters, or spawned by other entrypoints; executable-bit enforcement is not a meaningful signal.JAVASCRIPT_STANDARD: the codebase uses semicolons consistently, sostandardmostly reports style noise rather than actionable defects.Scope broad file-mode linting away from generated/captured artifacts
*.lock.yml**/otlp.json**/gradlew,**/package-lock.jsonNarrow lychee to reader-facing content
.github/workflows/from lychee so placeholder/template URLs in workflow YAML do not produce dead-link noiseConfigure jscpd explicitly
.jscpd.jsonwiththreshold: 5{ "threshold": 5, "reporters": ["console", "html"], "ignore": [ "**/*.lock.yml", "**/otlp.json", "**/gradlew", "**/package-lock.json" ] }