Exclude intentional src/Polyfills boilerplate from duplicate-code reporting#8593
Merged
Merged
Conversation
9 tasks
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove duplicate code in polyfill file structure
Exclude intentional May 26, 2026
src/Polyfills boilerplate from duplicate-code reporting
Evangelink
approved these changes
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tunes the repository’s duplicate-code detection workflow and its operator guidance to treat intentional polyfill scaffolding under src/Polyfills/** as non-actionable noise, preventing high-severity duplication reports driven by boilerplate.
Changes:
- Updated the
jscpdignore list in thededup-analysisworkflow to exclude**/src/Polyfills/**. - Documented the
src/Polyfills/**boilerplate pattern as a “Skip These Patterns” item in the duplicate-code detector guidance.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/duplicate-code-detector.md | Adds explicit guidance to ignore known src/Polyfills/** boilerplate patterns during duplicate triage. |
| .github/workflows/dedup-analysis.yml | Excludes src/Polyfills/** from jscpd scanning to avoid flagging intentional scaffolding as duplication. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
The duplicate-code detector flagged repeated polyfill file scaffolding (
auto-generatedheader + preprocessor/type-forwarding structure) acrosssrc/Polyfills/**as high-severity duplication. This PR narrows detector scope so intentional polyfill boilerplate is treated as non-actionable.Dedup scan scope (
jscpd).github/workflows/dedup-analysis.ymlto ignore**/src/Polyfills/**, preventing this known generated/structural pattern from being surfaced as duplication findings.Detector policy guidance
.github/workflows/duplicate-code-detector.md“Skip These Patterns” to explicitly classify polyfill structure boilerplate insrc/Polyfills/**as ignorable noise.Representative config change
--ignore "**/bin/**,**/obj/**,**/artifacts/**,**/*.Designer.cs,**/*.g.cs,**/*.xlf,**/*.resx,**/PublicAPI.*.txt,**/test/**,**/samples/**,**/formal-verification/**,**/src/Polyfills/**"