Repository navigation
Super-linter JSCPD: exclude generated/vendored files (partial, needs refactor decision) - #1
Merged
Merged
Conversation
…ndored Prism from jscpd via .ignore
Contributor
|
Summary
Potential Issues
|
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.
JSCPD failed at 33.4% (453 clones). This PR is a partial fix: it only excludes generated and vendored files, and JSCPD will still fail.
Excluded via root
.ignore, with provenance comments:**/obj/and**/bin/are MSBuild/WPF build output, including the*.g.cs/*.g.i.csfiles from MarkupCompilePass1.**/*.Designer.csare Visual Studio resource and settings generator output, all marked<auto-generated>.csharp/prism/Bin/holds the vendored Microsoft Prism 4 / Unity binaries and XML API docs.report/report/resources/dotcover/is a generated JetBrains dotCover HTML coverage report. It was the largest single contributor.Result: locally, jscpd 4.3.0 drops to 16.7% (7197 of 43083 lines), so this is still over the 5% threshold.
What's left is first-party duplication, which needs a refactor:
perl/opt/lgp/client/distribution/*.pm(Ubuntu, Redhat, Fedora, Mint, Centos, Debian, Gentoo) repeat each other heavily and should move intoDistribution.pm.ServiceController.pmandPackageManager.pmare duplicated between client and server.LGP.Components.Panels/Plugin.cs, the OrganizationUnitExplorer/ModuleEditor/PolicyEditor xaml.cs code-behind, and the Database provider projects. The prompt's suggested shared database base class falls in this group.That is roughly 5,000 duplicated lines of untested runtime code. The C# is a WPF solution that can't be built on Linux CI (no build/test pipeline here), and every touched file must also pass perlcritic, dotnet format and the other linters. I'm holding this for David's decision rather than refactoring it blind.
Nothing was deleted, moved or untracked. There are no linter, workflow or VALIDATE_* changes and no suppressions.