Public report of argoproj/argo-cd, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 13:57 UTC · Survey ID cd_b385707f9fd1471dbc8e2b4730e7efeb
argoproj/argo-cd
Measured 13 November 2026, 13:54 UTC, at code version b4af7e7
CAI scoreAt riskUp 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 112,019 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Accessibility, 47
Findings by how serious they are
113 critical1661 serious282 minor
22 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 13:54 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
57of 57 dimensions measured by tools.
2008of 2056 findings point to an exact file and line, so you can open each one in the code. The other 48 concern the repository as a whole, such as missing documentation.
57dimensions across 7 lenses, read from 112,019 lines of product code in 4 projects.
argoproj/argo-cd is rated At risk because critical security findings are open. Its score is held back because it has controls that only work with a mouse. It scores 58 out of 100, which the At risk rating leaves unchanged.
Accessibility, at 47, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 8 points. Labelling the form fields and buttons comes next, worth about 3 points. Raising Accessibility to 70 would lift the score to about 67.
Twenty-seven settings leave the servers or containers unsafe. Twenty-one controls can't be used without a mouse, and seventeen buttons or links have no name a screen reader can say. Making the controls work with a keyboard, correcting the unsafe settings and naming the buttons and links would close these risks. Updating the vulnerable packages would fix the ten packages with a known security hole, and the five passwords or keys in the code's history need replacing, with the old ones switched off. The 11 labels or groups of fields with no name need connecting to their fields or naming.
The product code is 112,019 lines, about €320,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Accessibility rose from 47 to 70, the lowest score rated Strong, the score would rise from 58 to about 67.
Code composition: what the lines of code are
Product code 36%Tests 64%
New since the last survey: 220 findings
These 220 critical or serious findings weren't in the previous survey, on 24 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · ClassTooLong: store gitops-engine/pkg/cache/cluster.go
God Classes · TooManyMethods: store gitops-engine/pkg/cache/cluster.go
God Classes · TooManyFields: store gitops-engine/pkg/cache/cluster.go
God Classes · FunctionTooLong: util.SetAppSpecOptions cmd/util/app.go
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) commitserver/commit/hydratorhelper.go
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) controller/appcontroller.go
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) util/cert/cert.go
Code Duplication · Edited copy of a member (69 corresponding lines) cmd/argocd/commands/app_resources.go
Code Duplication · Edited copy of a member (68 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (86 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (61 corresponding lines) server/application/application.go
Code Duplication · Edited copy of a member (58 corresponding lines) cmd/argocd/commands/projectwindows.go
Code Duplication · Edited copy of a member (64 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (51 corresponding lines) cmd/argocd/commands/project.go
Code Duplication · Edited copy of a member (54 corresponding lines) cmd/argocd/commands/admin/cluster.go
Code Duplication · Edited copy of a member (50 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (51 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (43 corresponding lines) server/repository/repository.go
Code Duplication · Edited copy of a member (47 corresponding lines) cmd/argocd/commands/admin/settings.go
Code Duplication · Edited copy of a member (34 corresponding lines) util/db/repository_secrets.go
Code Duplication · Edited copy of a member (54 corresponding lines) cmd/argocd/commands/admin/cluster.go
Code Duplication · Edited copy of a member (72 corresponding lines) cmd/argocd/commands/project_role.go
Code Duplication · Edited copy of a member (52 corresponding lines) pkg/apis/application/v1alpha1/repository_types.go
Code Duplication · Edited copy of a member (43 corresponding lines) util/cmp/stream.go
Code Duplication · Edited copy of a member (64 corresponding lines) cmd/argocd/commands/repo.go
Code Duplication · Edited copy of a member (54 corresponding lines) util/trace/meter.go
Code Duplication · Edited copy of a member (33 corresponding lines) server/repocreds/repocreds.go
Code Duplication · Edited copy of a member (38 corresponding lines) cmd/argocd/commands/project_role.go
Code Duplication · Edited copy of a member (37 corresponding lines) hack/gen-resources/cmd/commands/cmd.go
Code Duplication · Edited copy of a member (44 corresponding lines) cmd/argocd/commands/applicationset.go
Code Duplication · Edited copy of a member (45 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) cmd/argocd/commands/project.go
Code Duplication · Edited copies of one member (4 members, 41+ corresponding lines) cmd/argocd/commands/project.go
Code Duplication · Edited copy of a member (21 corresponding lines) server/repository/repository.go
Code Duplication · Edited copy of a member (29 corresponding lines) cmd/argocd/commands/project_role.go
Code Duplication · Edited copy of a member (29 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (35 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (29 corresponding lines) gitops-engine/pkg/utils/kube/ctl.go
Code Duplication · Edited copy of a member (37 corresponding lines) cmd/argocd/commands/admin/project.go
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) server/application/application.go
Code Duplication · Edited copy of a member (20 corresponding lines) cmd/argocd/commands/tree.go
Code Duplication · Edited copy of a member (36 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (23 corresponding lines) cmd/argocd/commands/project.go
Code Duplication · Edited copy of a member (31 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (27 corresponding lines) applicationset/services/pull_request/utils.go
Code Duplication · Edited copy of a member (24 corresponding lines) applicationset/generators/pull_request.go
Code Duplication · Edited copy of a member (33 corresponding lines) cmd/argocd/commands/project.go
Code Duplication · Edited copy of a member (36 corresponding lines) server/application/application.go
Code Duplication · Edited copies of one member (6 members, 31+ corresponding lines) cmd/argocd/commands/account.go
Code Duplication · Edited copy of a member (40 corresponding lines) pkg/apiclient/apiclient.go
Code Duplication · Edited copy of a member (33 corresponding lines) controller/appcontroller.go
Code Duplication · Edited copy of a member (26 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) cmd/argocd/commands/gpg.go
Code Duplication · Edited copy of a member (21 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (28 corresponding lines) applicationset/services/pull_request/github.go
Code Duplication · Edited copy of a member (35 corresponding lines) applicationset/generators/matrix.go
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) cmpserver/plugin/plugin.go
Code Duplication · Edited copies of one member (5 members, 22+ corresponding lines) gitops-engine/pkg/utils/kube/ctl.go
Code Duplication · Edited copy of a member (24 corresponding lines) server/repocreds/repocreds.go
Code Duplication · Edited copy of a member (23 corresponding lines) server/application/application.go
Code Duplication · Edited copy of a member (22 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (19 corresponding lines) cmd/argocd/commands/tree.go
Code Duplication · Edited copy of a member (24 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (27 corresponding lines) server/application/application.go
Code Duplication · Edited copy of a member (22 corresponding lines) util/notification/settings/settings.go
Code Duplication · Edited copy of a member (25 corresponding lines) util/cmp/stream.go
Code Duplication · Edited copy of a member (21 corresponding lines) server/repository/repository.go
Code Duplication · Edited copy of a member (26 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (20 corresponding lines) cmd/argocd/commands/admin/settings.go
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) server/repository/repository.go
Code Duplication · Edited copy of a member (23 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (26 corresponding lines) cmd/argocd/commands/app.go
Code Duplication · Edited copy of a member (25 corresponding lines) commitserver/metrics/githandlers.go
Code Duplication · Edited copy of a member (20 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (25 corresponding lines) controller/sharding/sharding.go
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 183 findings
These 183 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one. The first 100 are listed here.
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Documentation (README) · README may be stale
Exception handling · Swallowed exception (caught, then discarded) applicationset/services/scm_provider/aws_codecommit.go
Exception handling · Swallowed exception (caught, then discarded) commitserver/commit/commit.go
Exception handling · Swallowed exception (caught, then discarded) controller/clusterinfoupdater.go
Exception handling · Swallowed exception (caught, then discarded) controller/appcontroller.go
Exception handling · Swallowed exception (caught, then discarded) controller/appcontroller.go
Exception handling · Swallowed exception (caught, then discarded) controller/appcontroller.go
Exception handling · Swallowed exception (caught, then discarded) controller/cache/info.go
Exception handling · Swallowed exception (caught, then discarded) controller/cache/info.go
Exception handling · Swallowed exception (caught, then discarded) controller/cache/info.go
Exception handling · Swallowed exception (caught, then discarded) controller/cache/info.go
Exception handling · Swallowed exception (caught, then discarded) controller/cache/cache.go
Exception handling · Swallowed exception (caught, then discarded) notification_controller/controller/controller.go
Forms & labels · <Autocomplete> field component without a label ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx
Forms & labels · <select> without a programmatic label ui/src/app/applications/components/pod-logs-viewer/tail-selector.tsx
Forms & labels · <button> with no accessible text ui/src/app/resources/components/resources-list/resources-list.tsx
Forms & labels · Custom control named only by title on <i> ui/src/app/resources/components/resources-list/resources-list.tsx
Forms & labels · Custom control named only by title on <i> ui/src/app/resources/components/resources-list/resources-list.tsx
Forms & labels · <Select> field component without a label ui/src/app/settings/components/appearance-list/appearance-list.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/cluster-details/cluster-details.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx
Forms & labels · <input> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <select> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <select> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <select> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <select> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <select> without a programmatic label ui/src/app/settings/components/project-sync-windows-edit/project-sync-windows-edit.tsx
Forms & labels · <button> with no accessible text ui/src/app/shared/components/action-menu/action-menu.tsx
Forms & labels · <label> that labels no control ui/src/app/shared/components/application-selector/application-selector.tsx
Forms & labels · <button> with no accessible text ui/src/app/shared/components/array-input/array-input.tsx
Forms & labels · <label> that labels no control ui/src/app/shared/components/array-input/array-input.tsx
Forms & labels · <button> with no accessible text ui/src/app/shared/components/array-input/array-input.tsx
Forms & labels · <textarea> without a programmatic label ui/src/app/shared/components/badge-panel/badge-panel.tsx
Forms & labels · Custom control with no accessible name on <i> ui/src/app/shared/components/clipboard-text.tsx
Forms & labels · Custom control with no accessible name on <i> ui/src/app/shared/components/editable-panel/editable-panel.tsx
Forms & labels · Clickable <a> with no accessible name ui/src/app/shared/components/expandable/expandable.tsx
Forms & labels · <Autocomplete> field component without a label ui/src/app/shared/components/search-bar/search-bar.tsx
Forms & labels · <input> without a programmatic label ui/src/app/shared/components/search-bar/search-bar.tsx
Forms & labels · <Autocomplete> field component without a label ui/src/app/shared/components/tags-input/tags-input.tsx
Forms & labels · Custom control with no accessible name on <div> ui/src/app/sidebar/sidebar.tsx
Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/application-resources-diff/individual-diff-section.tsx
Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/application-status-panel/application-status-panel.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/application-status-panel.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/application-status-panel.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/application-status-panel.tsx
Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/application-status-panel/appset-status-panel.tsx
Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/application-status-panel/appset-status-panel.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/condition-counters.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/condition-counters.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-status-panel/condition-counters.tsx
Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/application-summary/application-summary.tsx
Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/application-summary/application-summary.tsx
Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/application-summary/application-summary.tsx
Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-sync-panel/application-sync-panel-body.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-sync-panel/application-sync-panel-body.tsx
Keyboard semantics · Anchor without href ui/src/app/applications/components/application-sync-panel/application-sync-panel-body.tsx
Rebuild cost: about €320,000 · Estimate
Cost to rebuild
€110,000 to €540,000, for 1,787 to 5,669 hours of work, about 2.2 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 112,019 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 3 points · Medium effort · Forms & labels
3
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with applications-list.test.tsx.
Raises the score by about 1 point · Low effort · Test Quality
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €320,000 to build again, about 2.2 person-years of work. Its weakest lens is Accessibility, at 47 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 1,809,984 lines over the last 90 days, which is about 7,340,491 lines a year. At that pace, the extra work comes to an estimated 730.6 to 4383.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
412 modules, with 532 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 372 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
2 pairs of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses a module listed above it, which is the healthy direction.
7 pairs of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/apiclient uses github.com/argoproj/argo-cd/v3/util/io, so a change to github.com/argoproj/argo-cd/v3/util/io can break github.com/argoproj/argo-cd/v3/reposerver/apiclient, while a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can't break github.com/argoproj/argo-cd/v3/util/io.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/apiclient uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/cache uses github.com/argoproj/argo-cd/v3/util/cache, so a change to github.com/argoproj/argo-cd/v3/util/cache can break github.com/argoproj/argo-cd/v3/reposerver/cache, while a change to github.com/argoproj/argo-cd/v3/reposerver/cache can't break github.com/argoproj/argo-cd/v3/util/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/cache uses github.com/argoproj/argo-cd/v3/util/git, so a change to github.com/argoproj/argo-cd/v3/util/git can break github.com/argoproj/argo-cd/v3/reposerver/cache, while a change to github.com/argoproj/argo-cd/v3/reposerver/cache can't break github.com/argoproj/argo-cd/v3/util/git.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/cache uses a module listed above it, which is the healthy direction.
13→18 github.com/argoproj/argo-cd/v3/reposerver/cache uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1part of a loop✕
Connections
15 pairs of types, where a type in github.com/argoproj/argo-cd/v3/reposerver/cache uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/reposerver/cache uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/reposerver/cache, while a change to github.com/argoproj/argo-cd/v3/reposerver/cache can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2 pairs of types, where a type in ui.src.app.applications.components.applications-list.applications-filter uses a type in ui.src.app.shared.services.view-preferences-service.
ui.src.app.applications.components.applications-list.applications-filter uses ui.src.app.shared.services.view-preferences-service, so a change to ui.src.app.shared.services.view-preferences-service can break ui.src.app.applications.components.applications-list.applications-filter, while a change to ui.src.app.applications.components.applications-list.applications-filter can't break ui.src.app.shared.services.view-preferences-service.
Position
Below the diagonal: ui.src.app.applications.components.applications-list.applications-filter uses a module listed above it, which is the healthy direction.
ui.src.app.resources.components.resources-list uses ui.src.app.shared.context, so a change to ui.src.app.shared.context can break ui.src.app.resources.components.resources-list, while a change to ui.src.app.resources.components.resources-list can't break ui.src.app.shared.context.
Position
Below the diagonal: ui.src.app.resources.components.resources-list uses a module listed above it, which is the healthy direction.
ui.src.app.resources.components.resources-list uses ui.src.app.shared.models, so a change to ui.src.app.shared.models can break ui.src.app.resources.components.resources-list, while a change to ui.src.app.resources.components.resources-list can't break ui.src.app.shared.models.
Position
Below the diagonal: ui.src.app.resources.components.resources-list uses a module listed above it, which is the healthy direction.
ui.src.app.resources.components.resources-list uses ui.src.app.shared.services.view-preferences-service, so a change to ui.src.app.shared.services.view-preferences-service can break ui.src.app.resources.components.resources-list, while a change to ui.src.app.resources.components.resources-list can't break ui.src.app.shared.services.view-preferences-service.
Position
Below the diagonal: ui.src.app.resources.components.resources-list uses a module listed above it, which is the healthy direction.
ui.src.app.shared.services uses ui.src.app.shared.models, so a change to ui.src.app.shared.models can break ui.src.app.shared.services, while a change to ui.src.app.shared.services can't break ui.src.app.shared.models.
Position
Below the diagonal: ui.src.app.shared.services uses a module listed above it, which is the healthy direction.
ui.src.app.shared.services uses ui.src.app.shared.services.view-preferences-service, so a change to ui.src.app.shared.services.view-preferences-service can break ui.src.app.shared.services, while a change to ui.src.app.shared.services can't break ui.src.app.shared.services.view-preferences-service.
Position
Below the diagonal: ui.src.app.shared.services uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a module listed above it, which is the healthy direction.
8 pairs of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a module listed above it, which is the healthy direction.
18 pairs of types, where a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common can break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync, while a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
Position
Below the diagonal: github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, while a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, while a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses github.com/argoproj/argo-cd/v3/util/git, so a change to github.com/argoproj/argo-cd/v3/util/git can break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, while a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can't break github.com/argoproj/argo-cd/v3/util/git.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a module listed above it, which is the healthy direction.
6 pairs of types, where a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common can break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, while a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a type in github.com/argoproj/argo-cd/v3/reposerver/cache.
github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses github.com/argoproj/argo-cd/v3/reposerver/cache, so a change to github.com/argoproj/argo-cd/v3/reposerver/cache can break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, while a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can't break github.com/argoproj/argo-cd/v3/reposerver/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 uses a module listed above it, which is the healthy direction.
ui.src.app.applications.components.applications-list uses ui.src.app.shared.models, so a change to ui.src.app.shared.models can break ui.src.app.applications.components.applications-list, while a change to ui.src.app.applications.components.applications-list can't break ui.src.app.shared.models.
Position
Below the diagonal: ui.src.app.applications.components.applications-list uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in ui.src.app.applications.components.applications-list uses a type in ui.src.app.shared.services.view-preferences-service.
ui.src.app.applications.components.applications-list uses ui.src.app.shared.services.view-preferences-service, so a change to ui.src.app.shared.services.view-preferences-service can break ui.src.app.applications.components.applications-list, while a change to ui.src.app.applications.components.applications-list can't break ui.src.app.shared.services.view-preferences-service.
Position
Below the diagonal: ui.src.app.applications.components.applications-list uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in ui.src.app.applications.components.applications-list uses a type in ui.src.app.applications.components.applications-list.applications-filter.
ui.src.app.applications.components.applications-list uses ui.src.app.applications.components.applications-list.applications-filter, so a change to ui.src.app.applications.components.applications-list.applications-filter can break ui.src.app.applications.components.applications-list, while a change to ui.src.app.applications.components.applications-list can't break ui.src.app.applications.components.applications-list.applications-filter.
Position
Below the diagonal: ui.src.app.applications.components.applications-list uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/repository uses github.com/argoproj/argo-cd/v3/util/git, so a change to github.com/argoproj/argo-cd/v3/util/git can break github.com/argoproj/argo-cd/v3/reposerver/repository, while a change to github.com/argoproj/argo-cd/v3/reposerver/repository can't break github.com/argoproj/argo-cd/v3/util/git.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/repository uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/repository uses github.com/argoproj/argo-cd/v3/util/io, so a change to github.com/argoproj/argo-cd/v3/util/io can break github.com/argoproj/argo-cd/v3/reposerver/repository, while a change to github.com/argoproj/argo-cd/v3/reposerver/repository can't break github.com/argoproj/argo-cd/v3/util/io.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/repository uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/reposerver/repository uses github.com/argoproj/argo-cd/v3/reposerver/cache, so a change to github.com/argoproj/argo-cd/v3/reposerver/cache can break github.com/argoproj/argo-cd/v3/reposerver/repository, while a change to github.com/argoproj/argo-cd/v3/reposerver/repository can't break github.com/argoproj/argo-cd/v3/reposerver/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/repository uses a module listed above it, which is the healthy direction.
20 pairs of types, where a type in github.com/argoproj/argo-cd/v3/reposerver/repository uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/reposerver/repository uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/reposerver/repository, while a change to github.com/argoproj/argo-cd/v3/reposerver/repository can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/reposerver/repository uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/cache uses github.com/argoproj/argo-cd/v3/util/cache, so a change to github.com/argoproj/argo-cd/v3/util/cache can break github.com/argoproj/argo-cd/v3/server/cache, while a change to github.com/argoproj/argo-cd/v3/server/cache can't break github.com/argoproj/argo-cd/v3/util/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/cache uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/cache uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/server/cache uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/server/cache, while a change to github.com/argoproj/argo-cd/v3/server/cache can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/cache uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/argo/normalizers uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/util/argo/normalizers uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/argo/normalizers, while a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo/normalizers uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/db uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/db, while a change to github.com/argoproj/argo-cd/v3/util/db can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/db uses a module listed above it, which is the healthy direction.
23→27 github.com/argoproj/argo-cd/v3/util/db uses github.com/argoproj/argo-cd/v3/util/settingspart of a loop✕
Connections
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/util/db uses a type in github.com/argoproj/argo-cd/v3/util/settings.
github.com/argoproj/argo-cd/v3/util/db uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/util/db, while a change to github.com/argoproj/argo-cd/v3/util/db can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a type in github.com/argoproj/argo-cd/v3/util/argo/normalizers.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses github.com/argoproj/argo-cd/v3/util/argo/normalizers, so a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands can't break github.com/argoproj/argo-cd/v3/util/argo/normalizers.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/metrics uses github.com/argoproj/argo-cd/v3/util/cache, so a change to github.com/argoproj/argo-cd/v3/util/cache can break github.com/argoproj/argo-cd/v3/controller/metrics, while a change to github.com/argoproj/argo-cd/v3/controller/metrics can't break github.com/argoproj/argo-cd/v3/util/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/metrics uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller/metrics uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache.
github.com/argoproj/argo-cd/v3/controller/metrics uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache can break github.com/argoproj/argo-cd/v3/controller/metrics, while a change to github.com/argoproj/argo-cd/v3/controller/metrics can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/metrics uses a module listed above it, which is the healthy direction.
7 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller/metrics uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/controller/metrics uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/controller/metrics, while a change to github.com/argoproj/argo-cd/v3/controller/metrics can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/metrics uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/metrics uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/controller/metrics, while a change to github.com/argoproj/argo-cd/v3/controller/metrics can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/metrics uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/reposerver/cache, so a change to github.com/argoproj/argo-cd/v3/reposerver/cache can break github.com/argoproj/argo-cd/v3/util/webhook, while a change to github.com/argoproj/argo-cd/v3/util/webhook can't break github.com/argoproj/argo-cd/v3/reposerver/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/webhook uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/webhook uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/webhook, while a change to github.com/argoproj/argo-cd/v3/util/webhook can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/webhook uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/server/cache, so a change to github.com/argoproj/argo-cd/v3/server/cache can break github.com/argoproj/argo-cd/v3/util/webhook, while a change to github.com/argoproj/argo-cd/v3/util/webhook can't break github.com/argoproj/argo-cd/v3/server/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/webhook uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/util/webhook, while a change to github.com/argoproj/argo-cd/v3/util/webhook can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/webhook uses a module listed above it, which is the healthy direction.
26→27 github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/util/settingspart of a loop✕
Connections
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/webhook uses a type in github.com/argoproj/argo-cd/v3/util/settings.
github.com/argoproj/argo-cd/v3/util/webhook uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/util/webhook, while a change to github.com/argoproj/argo-cd/v3/util/webhook can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/settings uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/util/settings uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/settings, while a change to github.com/argoproj/argo-cd/v3/util/settings can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/settings uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/settings uses github.com/argoproj/argo-cd/v3/util/webhook, so a change to github.com/argoproj/argo-cd/v3/util/webhook can break github.com/argoproj/argo-cd/v3/util/settings, while a change to github.com/argoproj/argo-cd/v3/util/settings can't break github.com/argoproj/argo-cd/v3/util/webhook.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/settings uses a module listed above it, which is the healthy direction.
15 pairs of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/utils uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/applicationset/utils uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/applicationset/utils, while a change to github.com/argoproj/argo-cd/v3/applicationset/utils can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/utils uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/utils uses a type in github.com/argoproj/argo-cd/v3/util/argo/normalizers.
github.com/argoproj/argo-cd/v3/applicationset/utils uses github.com/argoproj/argo-cd/v3/util/argo/normalizers, so a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can break github.com/argoproj/argo-cd/v3/applicationset/utils, while a change to github.com/argoproj/argo-cd/v3/applicationset/utils can't break github.com/argoproj/argo-cd/v3/util/argo/normalizers.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/utils uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/applicationset/utils uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/applicationset/utils, while a change to github.com/argoproj/argo-cd/v3/applicationset/utils can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/utils uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/argo uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/argo uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/util/argo, while a change to github.com/argoproj/argo-cd/v3/util/argo can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/argo uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/util/notification/argocd uses a type in github.com/argoproj/argo-cd/v3/reposerver/apiclient.
github.com/argoproj/argo-cd/v3/util/notification/argocd uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/util/notification/argocd, while a change to github.com/argoproj/argo-cd/v3/util/notification/argocd can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/notification/argocd uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/util/notification/argocd uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/util/notification/argocd uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/util/notification/argocd, while a change to github.com/argoproj/argo-cd/v3/util/notification/argocd can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/notification/argocd uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/notification/argocd uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/util/notification/argocd, while a change to github.com/argoproj/argo-cd/v3/util/notification/argocd can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/notification/argocd uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/util/session uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/util/session, while a change to github.com/argoproj/argo-cd/v3/util/session can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/util/session uses a module listed above it, which is the healthy direction.
52 pairs of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/generators uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/argoproj/argo-cd/v3/applicationset/generators uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/applicationset/generators, while a change to github.com/argoproj/argo-cd/v3/applicationset/generators can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/generators uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/generators uses a type in github.com/argoproj/argo-cd/v3/util/settings.
github.com/argoproj/argo-cd/v3/applicationset/generators uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/applicationset/generators, while a change to github.com/argoproj/argo-cd/v3/applicationset/generators can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/generators uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/generators uses a type in github.com/argoproj/argo-cd/v3/applicationset/utils.
github.com/argoproj/argo-cd/v3/applicationset/generators uses github.com/argoproj/argo-cd/v3/applicationset/utils, so a change to github.com/argoproj/argo-cd/v3/applicationset/utils can break github.com/argoproj/argo-cd/v3/applicationset/generators, while a change to github.com/argoproj/argo-cd/v3/applicationset/generators can't break github.com/argoproj/argo-cd/v3/applicationset/utils.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/generators uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/controller/cache uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller/cache uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
8 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller/cache uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
13 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller/cache uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/util/argo/normalizers, so a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/util/argo/normalizers.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/controller/metrics, so a change to github.com/argoproj/argo-cd/v3/controller/metrics can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/controller/metrics.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller/cache uses github.com/argoproj/argo-cd/v3/util/argo, so a change to github.com/argoproj/argo-cd/v3/util/argo can break github.com/argoproj/argo-cd/v3/controller/cache, while a change to github.com/argoproj/argo-cd/v3/controller/cache can't break github.com/argoproj/argo-cd/v3/util/argo.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller/cache uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/application uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/util/rbac, so a change to github.com/argoproj/argo-cd/v3/util/rbac can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/util/rbac.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/application uses a type in github.com/argoproj/argo-cd/v3/reposerver/apiclient.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/application uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/server/cache, so a change to github.com/argoproj/argo-cd/v3/server/cache can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/server/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/util/argo, so a change to github.com/argoproj/argo-cd/v3/util/argo can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/util/argo.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/application uses github.com/argoproj/argo-cd/v3/util/session, so a change to github.com/argoproj/argo-cd/v3/util/session can break github.com/argoproj/argo-cd/v3/server/application, while a change to github.com/argoproj/argo-cd/v3/server/application can't break github.com/argoproj/argo-cd/v3/util/session.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/application uses a module listed above it, which is the healthy direction.
9 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/extension uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/server/extension uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/server/extension, while a change to github.com/argoproj/argo-cd/v3/server/extension can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/extension uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/extension uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/server/extension, while a change to github.com/argoproj/argo-cd/v3/server/extension can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/extension uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/extension uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/server/extension, while a change to github.com/argoproj/argo-cd/v3/server/extension can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/extension uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/extension uses github.com/argoproj/argo-cd/v3/util/argo, so a change to github.com/argoproj/argo-cd/v3/util/argo can break github.com/argoproj/argo-cd/v3/server/extension, while a change to github.com/argoproj/argo-cd/v3/server/extension can't break github.com/argoproj/argo-cd/v3/util/argo.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/extension uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/server/project uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/server/project uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/server/project, while a change to github.com/argoproj/argo-cd/v3/server/project can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/project uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/project uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/server/project, while a change to github.com/argoproj/argo-cd/v3/server/project can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/project uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/project uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/server/project, while a change to github.com/argoproj/argo-cd/v3/server/project can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/project uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/project uses github.com/argoproj/argo-cd/v3/util/argo, so a change to github.com/argoproj/argo-cd/v3/util/argo can break github.com/argoproj/argo-cd/v3/server/project, while a change to github.com/argoproj/argo-cd/v3/server/project can't break github.com/argoproj/argo-cd/v3/util/argo.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/project uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server/project uses github.com/argoproj/argo-cd/v3/util/session, so a change to github.com/argoproj/argo-cd/v3/util/session can break github.com/argoproj/argo-cd/v3/server/project, while a change to github.com/argoproj/argo-cd/v3/server/project can't break github.com/argoproj/argo-cd/v3/util/session.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server/project uses a module listed above it, which is the healthy direction.
9 pairs of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/controllers uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/applicationset/controllers uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/applicationset/controllers, while a change to github.com/argoproj/argo-cd/v3/applicationset/controllers can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/controllers uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/applicationset/controllers uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/applicationset/controllers, while a change to github.com/argoproj/argo-cd/v3/applicationset/controllers can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/controllers uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/controllers uses a type in github.com/argoproj/argo-cd/v3/util/settings.
github.com/argoproj/argo-cd/v3/applicationset/controllers uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/applicationset/controllers, while a change to github.com/argoproj/argo-cd/v3/applicationset/controllers can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/controllers uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/controllers uses a type in github.com/argoproj/argo-cd/v3/applicationset/utils.
github.com/argoproj/argo-cd/v3/applicationset/controllers uses github.com/argoproj/argo-cd/v3/applicationset/utils, so a change to github.com/argoproj/argo-cd/v3/applicationset/utils can break github.com/argoproj/argo-cd/v3/applicationset/controllers, while a change to github.com/argoproj/argo-cd/v3/applicationset/controllers can't break github.com/argoproj/argo-cd/v3/applicationset/utils.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/controllers uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/applicationset/controllers uses a type in github.com/argoproj/argo-cd/v3/applicationset/generators.
github.com/argoproj/argo-cd/v3/applicationset/controllers uses github.com/argoproj/argo-cd/v3/applicationset/generators, so a change to github.com/argoproj/argo-cd/v3/applicationset/generators can break github.com/argoproj/argo-cd/v3/applicationset/controllers, while a change to github.com/argoproj/argo-cd/v3/applicationset/controllers can't break github.com/argoproj/argo-cd/v3/applicationset/generators.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/applicationset/controllers uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/util/rbac, so a change to github.com/argoproj/argo-cd/v3/util/rbac can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/util/rbac.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/reposerver/apiclient.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/util/argo/normalizers.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/util/argo/normalizers, so a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/util/argo/normalizers.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/controller/metrics.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/controller/metrics, so a change to github.com/argoproj/argo-cd/v3/controller/metrics can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/controller/metrics.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/util/settings.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a type in github.com/argoproj/argo-cd/v3/controller/cache.
github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses github.com/argoproj/argo-cd/v3/controller/cache, so a change to github.com/argoproj/argo-cd/v3/controller/cache can break github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin, while a change to github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin can't break github.com/argoproj/argo-cd/v3/controller/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
9 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/argoproj/argo-cd/v3/controller uses a type in github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync, so a change to github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
51 pairs of types, where a type in github.com/argoproj/argo-cd/v3/controller uses a type in github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1, so a change to github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1 can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/util/argo/normalizers, so a change to github.com/argoproj/argo-cd/v3/util/argo/normalizers can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/util/argo/normalizers.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/controller/metrics, so a change to github.com/argoproj/argo-cd/v3/controller/metrics can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/controller/metrics.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/util/argo, so a change to github.com/argoproj/argo-cd/v3/util/argo can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/util/argo.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/controller uses github.com/argoproj/argo-cd/v3/controller/cache, so a change to github.com/argoproj/argo-cd/v3/controller/cache can break github.com/argoproj/argo-cd/v3/controller, while a change to github.com/argoproj/argo-cd/v3/controller can't break github.com/argoproj/argo-cd/v3/controller/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/controller uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/reposerver/apiclient, so a change to github.com/argoproj/argo-cd/v3/reposerver/apiclient can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/reposerver/apiclient.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/reposerver/cache, so a change to github.com/argoproj/argo-cd/v3/reposerver/cache can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/reposerver/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/server/cache, so a change to github.com/argoproj/argo-cd/v3/server/cache can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/server/cache.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/util/db, so a change to github.com/argoproj/argo-cd/v3/util/db can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/util/db.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/util/settings, so a change to github.com/argoproj/argo-cd/v3/util/settings can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/util/settings.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/util/session, so a change to github.com/argoproj/argo-cd/v3/util/session can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/util/session.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/server/application, so a change to github.com/argoproj/argo-cd/v3/server/application can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/server/application.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/server/extension, so a change to github.com/argoproj/argo-cd/v3/server/extension can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/server/extension.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
github.com/argoproj/argo-cd/v3/server uses github.com/argoproj/argo-cd/v3/server/project, so a change to github.com/argoproj/argo-cd/v3/server/project can break github.com/argoproj/argo-cd/v3/server, while a change to github.com/argoproj/argo-cd/v3/server can't break github.com/argoproj/argo-cd/v3/server/project.
Position
Below the diagonal: github.com/argoproj/argo-cd/v3/server uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 76% · Adequate · gated by D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
509
High / Critical
A05:2025 — Injection
106
High / Critical
A03:2025 — Software Supply Chain Failures
28
High / Critical
A07:2025 — Authentication Failures
7
High / Critical
Roadmap
Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Per-file score 0–10 — a quality signature. Of 348 files carrying findings, judged against the Production bar: 4% slop · 67% mixed · 29% near-clean.
File
Score
Band
Worst signal
REDACTED
0.0
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
0.0
Slop
Dependency Vulnerabilities: High CVE: REDACTED
REDACTED
0.0
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
0.0
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
0.6
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
0.8
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
1.6
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
1.6
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
1.6
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
1.7
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
1.7
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
2.0
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
2.0
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
3.0
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.5
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 113
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1661
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 282
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 22
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 57 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 57 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2008 of 2056 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for ui/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (ERR_PNPM_FETCH_403 GET https://codeload.github.com/argoproj/argo-ui/tar.gz/28927a57027a361505ff91d0498a4bc9670bd882: Forbidden - 403), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (.codecov.yml) and a coverage step in CI (`go tool covdata merge -pcombine -i=test-results,test-results…`) shows coverage is measured in your own CI.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 641 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 438 test source file(s) (.go) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for ui/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (ERR_PNPM_FETCH_403 GET https://codeload.github.com/argoproj/argo-ui/tar.gz/28927a57027a361505ff91d0498a4bc9670bd882: Forbidden - 403), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in ui/ was NOT MEASURED: the dependency install for ui/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (ERR_PNPM_FETCH_403 GET https://codeload.github.com/argoproj/argo-ui/tar.gz/28927a57027a361505ff91d0498a4bc9670bd882: Forbidden - 403), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `controller/appcontroller.go`, `server/application/application.go` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 29 further occurrence(s) are not listed individually; the score already reflects all 69.
AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 99 further occurrence(s) are not listed individually; the score already reflects all 139.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go, lua is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go, lua is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go, Lua is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Lua is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 18 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D42 Runtime Threat Enforcement: Runtime enforcement is read from committed policy files — a Tetragon/Falco/Kyverno stack installed cluster-wide (Helm release, platform add-on) with no in-repo trace can't be credited, and a committed policy is declared intent, not proof the engine is running and blocking in the live cluster.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 174 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with appStateManager.CompareAppState (cyclomatic 94), commands.NewApplicationSyncCommand (cyclomatic 69), admin.NewImportCommand (cyclomatic 65). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 4.7 to about 5.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 346 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 27 bodies over 60 down to 60 or less in Cognitive Complexity — start with appStateManager.CompareAppState (cognitive 164), kustomize.Build (cognitive 163), admin.NewImportCommand (cognitive 135). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 27 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.9 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 FileTooLong finding(s) in God Classes — start with REDACTED (2), app.go (2), REDACTED (2). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 24 FunctionTooLong finding(s) in God Classes — start with app.go (6), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (24 warning-level).
Resolve the 20 MethodTooLong finding(s) in God Classes — start with appcontroller.go (3), application.go (3), REDACTED (2). — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
215 duplicated block group(s) detected. A further 168 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 144 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), tree.go (2), pull_request.go. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 19 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with REDACTED (5), REDACTED (3), application.go (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 17 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with application.go (4), app.go (3), REDACTED (2). — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.3 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.
Off the main sequence: github.com/argoproj/argo-cd/gitops-engine/v3
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with types.go, mock.go. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
1 skipped (1 with a documented reason), 2 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 641 tests. Measured on the JavaScript/TypeScript suite only — at least 438 test source file(s) (.go) went unread, so its test quality is unmeasured and is not in these counts.
No assertions (empty test): a failed cluster list is not an unhandled rejection outside the summary viewui/src/app/applications/components/applications-list/applications-list.test.tsx:147
No assertions: renders without crashingui/src/app/shared/components/form/__tests__/compat.test.tsx:32
Mock-dominated test: only reports a refresh as successful when the refetch succeeds · ×2ui/src/app/settings/components/repos-list/repos-list.test.tsx:125
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with applications-list.test.tsx. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Mock-dominated test finding(s) in Test Quality — start with repos-list.test.tsx, certs-list.test.tsx. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 No assertions finding(s) in Test Quality — start with compat.test.tsx. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
24 outdated, 0 author-deprecated direct Go module(s), 11 pinning or checksum defect(s). 141 of 141 direct requirement(s) were graded against proxy.golang.org (0 not served there, 13 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Dependency pinned to a stale untagged commit: github.com/davecgh/go-spew · ×11
Outdated: github.com/Masterminds/semver/v3 · ×24
What to do
Resolve the 11 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 187 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 187 package(s) this repository's committed lockfile installs for a consumer — its 39 production, optional and peer dependency(ies), across 1 product package.json manifest(s), and everything those install in turn. Its 60 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum) and a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 25 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED (2), appcontroller.go. — One of this dimension's main actionable groups (25 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 303 of the 490 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
111 deducted task-comment markers across 112019 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×64util/webhook/push.go:91
FixmeComment · ×8REDACTED:3019
HackComment · ×2util/oidc/provider.go:176
FixmeComment repeated across 18 filesutil/workloadidentity/workloadidentity.go:8
What to do
Resolve the 64 TodoComment finding(s) in Explicit Debt — start with gpg.go (8), REDACTED (5), types.go (4). — One of this dimension's main actionable groups (64 warning-level).
Resolve the 8 FixmeComment finding(s) in Explicit Debt — start with REDACTED, REDACTED, appcontroller.go. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 2 HackComment finding(s) in Explicit Debt — start with provider.go, repo_management_test.go. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 253 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Procfile. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
2 of 4 build units (Go, Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
16 % of calls cross a namespace and 6 % go through an interface, but 42 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
6 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
106 finding(s): 0 critical, 12 high, 61 medium, 33 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 39 file(s) — `REDACTED` (lines 136–169), `applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook/templates/deployment.yaml`, `controller/appcontroller.go` (lines 3029–3030, line 3181), `docs/snyk/v3.4.13/ghcr.io_dexidp_dex_v2.45.0.html` (lines 2–16428), `docs/snyk/v3.4.13/quay.io_argoproj_argocd_v3.4.13.html` (lines 2–13457), … (+34 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 29 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 12 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED (6). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 10 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9), REDACTED. — One of this dimension's main actionable groups (10 issue-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 362 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (44), REDACTED (27), REDACTED (26). — One of this dimension's main actionable groups (362 warning-level).
Resolve the 15 Critical IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 12 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED, REDACTED. — One of this dimension's main actionable groups (12 issue-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
34 of 303 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is applicationset/services/scm_provider/aws_codecommit.go. Counted over 303 of the 490 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 34 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (3), bitbucket_server.go (2), aws_codecommit.go. — One of this dimension's main actionable groups (34 recommendation-level).
Resolve the 1 Orphaned files with no living knowledge finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
84/95 workload(s) run every container under a seccomp profile; 0/95 declare an AppArmor/SELinux profile.
No seccomp profile · ×11REDACTED:3
What to do
Resolve the 11 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the Kubernetes deployment wires runtime threat enforcement — a detection engine (Tetragon/Falco) and/or an admission-control policy gate (Kyverno / OPA Gatekeeper / PodSecurity). Presence of committed policy, not a runtime guarantee.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a runtime threat-detection engine (Tetragon TracingPolicy / Falco) and an admission-control policy (Kyverno / OPA Gatekeeper / PodSecurity). Reward-leaning; NotApplicable without workloads. Deterministic.
Resolve the 1 No runtime threat detection finding(s) in Runtime Threat Enforcement. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d42_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 4 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.4 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — ui/src/app/shared/components/badge-panel/badge-panel.tsx:41
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×11) — ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:55, ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:403, ui/src/app/applications/components/application-operation-state/application-operation-state.tsx:239, …
This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:56, ui/src/app/applications/components/application-sync-options/application-sync-options.tsx:57
This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×6) — ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:65, ui/src/app/applications/components/application-parameters/application-parameters.tsx:325, ui/src/app/applications/components/application-resources-diff/individual-diff-section.tsx:28, …
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — ui/src/app/applications/components/application-details/application-details-app-dropdown.tsx:29, ui/src/app/applications/components/application-parameters/application-parameters.tsx:47, ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:186, …
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×3) — ui/src/app/applications/components/application-parameters/kustomize.tsx:17, ui/src/app/applications/components/application-parameters/kustomize.tsx:26, ui/src/app/applications/components/pod-logs-viewer/log-message-filter.tsx:7
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×7) — ui/src/app/applications/components/application-status-panel/application-status-panel.tsx:63, ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:218, ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:225, …
This <a> has no href, so it exposes no link role — but it carries a click handler, which makes it a control. It has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — ui/src/app/applications/components/application-status-panel/application-status-panel.tsx:316
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:154, ui/src/app/applications/components/filter/filter.tsx:179
This <i> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. (×3) — ui/src/app/applications/components/applications-list/view-type-switcher.tsx:16, ui/src/app/applications/components/applications-list/view-type-switcher.tsx:24, ui/src/app/applications/components/applications-list/view-type-switcher.tsx:32
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure7.2 / 10Strong✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it. — ui/src/app/index.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×21) — ui/src/app/applications/components/application-create-panel/collapsible-multi-source-section.tsx:24, ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:42, ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:65, …
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×19) — ui/src/app/applications/components/application-deployment-history/revision-metadata-rows.tsx:46, ui/src/app/applications/components/application-details/application-details.tsx:411, ui/src/app/applications/components/application-details/application-details.tsx:468, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<div> moves — its inline style sets `transition: width 0.1s ease-in` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/src/app/shared/components/progress/progress-bar.tsx:14
`.project-role-jwt-tokens__expired-token` sets color: white on background-color: #8FA4B1 — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — ui/src/app/settings/components/project-role-jwt-tokens/project-role-jwt-tokens.scss:19
`.tags-input--focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/shared/components/tags-input/tags-input.scss:24
`.resources-list__accordion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/resources/components/resources-list/resources-list.scss:17
`.pod-logs-viewer__settings .argo-checkbox` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.scss:32
`.applications-list__accordion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/applications/components/applications-list/applications-list.scss:77
`.applications-tiles.applications-tiles--virtualized .ReactVirtualized__Grid:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/applications/components/applications-list/applications-tiles.scss:32
`.application-node-info__application-external-link:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/src/app/applications/components/application-node-info/application-node-info.scss:126
`.search-bar__input` moves (`transition: width 200ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ui/src/app/shared/components/search-bar/search-bar.scss:56
`.expandable` moves (`transition: max-height 0.5s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ui/src/app/shared/components/expandable/expandable.scss:6
`.resources-list__search` moves (`transition: width 200ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ui/src/app/resources/components/resources-list/resources-list.scss:58
`.icon.spin` moves (`animation: spin 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ui/src/app/applications/components/utils.scss:48
`.application-resource-tree--network .application-resource-tree__line` moves (`animation: network-flow 1s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ui/src/app/applications/components/application-resource-tree/application-resource-tree.scss:37
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Package `commands` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (handledRequests, tokenString, refreshToken; e.g. `handledRequests` in `oauth2Login` at line 345). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — REDACTED:345
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `hack/get-previous-release`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Do you agree with this assessment?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×10) — applicationset/generators/scm_provider.go:325, applicationset/generators/scm_provider.go:329, applicationset/services/github_metrics.go:238, …
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 8/10 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`ReadRemoteFile` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — util/config/reader.go:73
`GetContents` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — applicationset/services/scm_provider/bitbucket_cloud.go:26
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×33) — REDACTED:2885, REDACTED:749, REDACTED:392, …
`if err := json.Unmarshal(jsonData, &f); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:1279
`if err := settings.ValidateExternalURL(managedByURL); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — server/deeplinks/deeplinks.go:70
`if minVersion, err = strconv.Atoi(q.GetResourceVersion()); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — server/applicationset/applicationset.go:98, server/application/application.go:1309
`if _, err = url.Parse(" " + dep.Repo); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:1208
`if err := json.Unmarshal(ext.Raw, &v); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/apis/application/v1alpha1/values.go:81
`if _, err = w.Write([]byte(logEntry.GetContent() + " ")); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/apiclient/application/forwarder_overwrite.go:318
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 39 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 55 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — AX6 reached only 18% of this repository's production lines — go (111,432 lines), lua (12,657 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Go, JavaScript not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (util), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .go source were not judged.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 1 strongly-typed id(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 event-sourced shape(s) (event folds / event-recording aggregates))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 Go aggregate(s) recording domain events (own events-slice append / raise-record))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 198 current-state document(s) make no claim of a kind M4 checks. 200 claim(s) of kinds M4 does not check were not checked (path 31, command argument 8, environment variable 141, setting 12, route 6, cd 2); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 18% of this repository's production lines — go (111,432 lines), lua (12,657 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 18% of this repository's production lines — go (111,432 lines), lua (12,657 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 113 finding(s)
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×17
Click handler on a non-interactive <div> ui/src/app/applications/components/application-create-panel/collapsible-multi-source-section.tsx:24— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:42— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-deployment-history/application-deployment-history.tsx:29— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:104— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:107— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:113— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:116— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:120— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:123— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-details/application-resource-list.tsx:133— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-parameters/application-parameters.tsx:295— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-pod-view/pod-view.tsx:123— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:344— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:536— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:609— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:860— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:947— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· <label> that labels no control · ×11
<label> that labels no control ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:55— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:403— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-operation-state/application-operation-state.tsx:239— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-parameters/application-parameters.tsx:1055— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-parameters/application-parameters.tsx:1070— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:223— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-sync-options/application-sync-options.tsx:56— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-sync-panel/application-sync-panel-body.tsx:268— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/application-sync-panel/application-sync-panel-body.tsx:285— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/applications-refresh-panel/applications-refresh-panel-body.tsx:68— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control ui/src/app/applications/components/applications-sync-panel/applications-sync-panel-body.tsx:101— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels· <button> with no accessible text · ×7
<button> with no accessible text ui/src/app/applications/components/application-status-panel/application-status-panel.tsx:63— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:218— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:225— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/applications-list/application-sets-list.tsx:182— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/applications-list/application-table-row.tsx:61— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/applications-list/applications-list.tsx:228— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text ui/src/app/applications/components/applications-list/appset-table-row.tsx:52— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· Custom control with no accessible name on <i> · ×6
Custom control with no accessible name on <i> ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:65— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <i> ui/src/app/applications/components/application-parameters/application-parameters.tsx:325— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <i> ui/src/app/applications/components/application-resources-diff/individual-diff-section.tsx:28— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <i> ui/src/app/applications/components/application-summary/application-summary.tsx:754— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <i> ui/src/app/applications/components/application-summary/application-summary.tsx:762— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <i> ui/src/app/applications/components/filter/filter.tsx:168— This <i> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels· <input> without a programmatic label · ×6
<input> without a programmatic label ui/src/app/applications/components/application-details/application-details-app-dropdown.tsx:29— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/src/app/applications/components/application-parameters/application-parameters.tsx:47— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/src/app/applications/components/application-parameters/kustomize.tsx:17— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label ui/src/app/applications/components/application-parameters/kustomize.tsx:26— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:186— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ui/src/app/applications/components/pod-logs-viewer/log-message-filter.tsx:7— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· Custom control named only by title on <i> · ×3
Custom control named only by title on <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx:16— This <i> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
Custom control named only by title on <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx:24— This <i> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
Custom control named only by title on <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx:32— This <i> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC2 · Forms & labels· <select> without a programmatic label · ×2
<select> without a programmatic label ui/src/app/applications/components/pod-logs-viewer/container-selector.tsx:31— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ui/src/app/applications/components/pod-logs-viewer/since-seconds-selector.tsx:7— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Click handler on a non-interactive <i> · ×2
Click handler on a non-interactive <i> ui/src/app/applications/components/application-deployment-history/application-deployment-history-details.tsx:65— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <i> ui/src/app/applications/components/application-parameters/application-parameters.tsx:325— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC1 · Text alternatives· <img> without a text alternative · ×1
<img> without a text alternative ui/src/app/shared/components/badge-panel/badge-panel.tsx:41— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· Clickable <a> with no accessible name · ×1
Clickable <a> with no accessible name ui/src/app/applications/components/application-status-panel/application-status-panel.tsx:316— This <a> has no href, so it exposes no link role — but it carries a click handler, which makes it a control. It has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <li> · ×1
Click handler on a non-interactive <li> ui/src/app/applications/components/application-details/application-details-app-dropdown.tsx:52— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×1
Click handler on a non-interactive <span> ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:550— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): a failed cluster list is not an unhandled rejection outside the summary view ui/src/app/applications/components/applications-list/applications-list.test.tsx:147— Test method has an empty body — it asserts nothing and exercises no code.
TodoComment util/webhook/push.go:91— // TODO: bitbucket includes multiple changes as part of a single event. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:496— // TODO: need to support multi source (calculate refSourceCommitSHAs for SetNewRevisionManifests) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment util/oidc/templates.go:66— // TODO(ericchiang): replace with better internal server error. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Swallowed exception (caught, then discarded) REDACTED:2885— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:749— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:392— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:405— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/log/logrus.go:52— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/localconfig/localconfig.go:374— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/jwt/jwt.go:122— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/grpc/logging.go:238— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/grpc/logging.go:252— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:416— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:420— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:1279— `if err := json.Unmarshal(jsonData, &f); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/git/git.go:86— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/exec/exec.go:50— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/exec/exec.go:54— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/dex/config.go:240— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/db/certificate.go:94— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/cert/cert.go:289— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/cert/cert.go:298— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/cert/cert.go:348— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/argo/argo.go:1257— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/argo/argo.go:1262— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/argo/argo.go:1277— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/argo/resource_tracking.go:58— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) util/argo/resource_tracking.go:62— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
FileTooLong: REDACTED REDACTED— FileTooLong — 2421 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1921 over it, 4.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: v1alpha1/types.go pkg/apis/application/v1alpha1/types.go— FileTooLong — 2340 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1840 over it, 4.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: controller/appcontroller.go controller/appcontroller.go— FileTooLong — 2258 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: ApplicationController (64 blocks, 120-3615). The bar is 500 significant lines; this is 1758 over it, 4.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: commands/app.go cmd/argocd/commands/app.go— FileTooLong — 2167 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1667 over it, 4.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: application/application.go server/application/application.go— FileTooLong — 2126 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: Server (60 blocks, 103-3327). The bar is 500 significant lines; this is 1626 over it, 4.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1786 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1286 over it, 3.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1323 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 823 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1291 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 791 over it, 2.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: sync/sync_context.go gitops-engine/pkg/sync/sync_context.go— FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: syncContext (36 blocks, 364-1843). The bar is 500 significant lines; this is 627 over it, 2.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: argo/argo.go util/argo/argo.go— FileTooLong — 904 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 404 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 901 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: appStateManager (8 blocks, 133-1404). The bar is 500 significant lines; this is 401 over it, 1.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: ApplicationSetReconciler (16 blocks, 90-1247). The bar is 500 significant lines; this is 362 over it, 1.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: commands/project.go cmd/argocd/commands/project.go— FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 320 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cache/cluster.go gitops-engine/pkg/cache/cluster.go— FileTooLong — 816 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: store (45 blocks, 243-1496). The bar is 500 significant lines; this is 316 over it, 1.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: apiclient/apiclient.go pkg/apiclient/apiclient.go— FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 241 over it, 1.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: util/app.go cmd/util/app.go— FileTooLong — 731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 231 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: ClientApp (17 blocks, 75-1141). The bar is 500 significant lines; this is 209 over it, 1.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 113 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED controller/cache/cache.go— FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 105 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: progressivesync/progressive_sync.go applicationset/progressivesync/progressive_sync.go— FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: Manager (12 blocks, 71-1064). The bar is 500 significant lines; this is 104 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: v1alpha1/applicationset_types.go pkg/apis/application/v1alpha1/applicationset_types.go— FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 45 over it, 1.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/app_diff.go cmd/argocd/commands/app_diff.go— FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 30 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cache/info.go controller/cache/info.go— FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 21 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Hotspot: controller/appcontroller.go controller/appcontroller.go:1367— controller/appcontroller.go changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ApplicationController.finalizeApplicationDeletion at line 1367. 7 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- controller/appcontroller.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/argocd/commands/app.go cmd/argocd/commands/app.go:1711— cmd/argocd/commands/app.go changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in commands.NewApplicationSyncCommand at line 1711. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- cmd/argocd/commands/app.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:682— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in appStateManager.CompareAppState at line 682. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:871— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Service.runManifestGenAsync at line 871. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:119— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in ApplicationSetReconciler.Reconcile at line 119. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/apiclient/apiclient.go pkg/apiclient/apiclient.go:223— pkg/apiclient/apiclient.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in apiclient.NewClientWithContext at line 223. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- pkg/apiclient/apiclient.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/apis/application/v1alpha1/types.go pkg/apis/application/v1alpha1/types.go:4394— pkg/apis/application/v1alpha1/types.go changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Cluster.rawRestConfig at line 4394. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- pkg/apis/application/v1alpha1/types.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: util/kustomize/kustomize.go util/kustomize/kustomize.go:124— util/kustomize/kustomize.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in kustomize.Build at line 124. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- util/kustomize/kustomize.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:1285— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in nativeGitClient.resolveRevisionWithOptions at line 1285. 5 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: gitops-engine/pkg/cache/cluster.go gitops-engine/pkg/cache/cluster.go:1309— gitops-engine/pkg/cache/cluster.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in store.GetManagedLiveObjs at line 1309. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- gitops-engine/pkg/cache/cluster.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: util/dex/config.go util/dex/config.go:20— util/dex/config.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in dex.GenerateDexConfigYAML at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- util/dex/config.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: util/exec/exec.go util/exec/exec.go:184— util/exec/exec.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in exec.RunCommandExt at line 184. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- util/exec/exec.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:489— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in appCollector.collectApps at line 489. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:93— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in Handler.ServeHTTP at line 93. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:407— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SSHCreds.Environ at line 407. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:54— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in commands.NewCommand at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:43— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in commands.NewLoginCommand at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:57— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in command.NewCommand at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/argocd-application-controller/commands/argocd_application_controller.go cmd/argocd-application-controller/commands/argocd_application_controller.go:52— cmd/argocd-application-controller/commands/argocd_application_controller.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in commands.NewCommand at line 52. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- cmd/argocd-application-controller/commands/argocd_application_controller.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/argocd/commands/app_diff.go cmd/argocd/commands/app_diff.go:624— cmd/argocd/commands/app_diff.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in commands.NewApplicationDiffCommand at line 624. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- cmd/argocd/commands/app_diff.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/argocd/commands/cluster.go cmd/argocd/commands/cluster.go:86— cmd/argocd/commands/cluster.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in commands.NewClusterAddCommand at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- cmd/argocd/commands/cluster.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/apis/application/v1alpha1/app_project_types.go pkg/apis/application/v1alpha1/app_project_types.go:507— pkg/apis/application/v1alpha1/app_project_types.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AppProject.isDestinationMatched at line 507. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- pkg/apis/application/v1alpha1/app_project_types.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/argocd-server/commands/argocd_server.go cmd/argocd-server/commands/argocd_server.go:57— cmd/argocd-server/commands/argocd_server.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in commands.NewCommand at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- cmd/argocd-server/commands/argocd_server.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:38— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in commands.NewCommand at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/apiclient/grpcproxy.go pkg/apiclient/grpcproxy.go:112— pkg/apiclient/grpcproxy.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in client.startGRPCProxy at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:49:25 -10:00' --until='2026-11-12 22:49:25 -10:00' --full-history --no-merges -- pkg/apiclient/grpcproxy.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FunctionTooLong: commands.NewCommand cmd/argocd-server/commands/argocd_server.go:57— FunctionTooLong — NewCommand runs 263 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 163 over it, 2.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewApplicationSyncCommand cmd/argocd/commands/app.go:1711— FunctionTooLong — NewApplicationSyncCommand runs 259 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewCommand cmd/argocd-application-controller/commands/argocd_application_controller.go:52— FunctionTooLong — NewCommand runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: command.NewCommand REDACTED:57— FunctionTooLong — NewCommand runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: admin.NewImportCommand cmd/argocd/commands/admin/backup.go:160— FunctionTooLong — NewImportCommand runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewCommand REDACTED:54— FunctionTooLong — NewCommand runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: dex.GenerateDexConfigYAML util/dex/config.go:20— FunctionTooLong — GenerateDexConfigYAML runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewLoginCommand REDACTED:43— FunctionTooLong — NewLoginCommand runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: controller.NewApplicationController controller/appcontroller.go:171— FunctionTooLong — NewApplicationController runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewApplicationDiffCommand cmd/argocd/commands/app_diff.go:624— FunctionTooLong — NewApplicationDiffCommand runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: util.ConstructSource cmd/util/app.go:706— FunctionTooLong — ConstructSource runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewRepoAddCommand cmd/argocd/commands/repo.go:58— FunctionTooLong — NewRepoAddCommand runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: apiclient.NewClientWithContext pkg/apiclient/apiclient.go:223— FunctionTooLong — NewClientWithContext runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: metrics.NewMetricsServer reposerver/metrics/metrics.go:41— FunctionTooLong — NewMetricsServer runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.waitOnApplicationStatus cmd/argocd/commands/app.go:2445— FunctionTooLong — waitOnApplicationStatus runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: util.SetAppSpecOptions cmd/util/app.go:188— FunctionTooLong — SetAppSpecOptions runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand cmd/argocd/commands/project_source_integrity.go:350— FunctionTooLong — NewProjectSourceIntegrityGitPoliciesUpdateCommand runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewApplicationManifestsCommand cmd/argocd/commands/app.go:2888— FunctionTooLong — NewApplicationManifestsCommand runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewCommand REDACTED:38— FunctionTooLong — NewCommand runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewApplicationGetCommand cmd/argocd/commands/app.go:335— FunctionTooLong — NewApplicationGetCommand runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.oauth2Login REDACTED:292— FunctionTooLong — oauth2Login runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: admin.NewGenClusterConfigCommand cmd/argocd/commands/admin/cluster.go:588— FunctionTooLong — NewGenClusterConfigCommand runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: cache.AddCacheFlagsToCmd REDACTED:211— FunctionTooLong — AddCacheFlagsToCmd runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.NewClusterAddCommand cmd/argocd/commands/cluster.go:86— FunctionTooLong — NewClusterAddCommand runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: appStateManager.CompareAppState REDACTED:682— MethodTooLong — CompareAppState runs 312 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 212 over it, 3.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: appStateManager.SyncAppState controller/sync.go:160— MethodTooLong — SyncAppState runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ApplicationSetReconciler.Reconcile REDACTED:119— MethodTooLong — Reconcile runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: kustomize.Build util/kustomize/kustomize.go:124— MethodTooLong — Build runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ApplicationController.processAppRefreshQueueItem controller/appcontroller.go:2139— MethodTooLong — processAppRefreshQueueItem runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: appStateManager.GetRepoObjs REDACTED:229— MethodTooLong — GetRepoObjs runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Server.ServerSideDiff server/application/application.go:3088— MethodTooLong — ServerSideDiff runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Service.runRepoOperation REDACTED:354— MethodTooLong — runRepoOperation runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: syncContext.Sync gitops-engine/pkg/sync/sync_context.go:493— MethodTooLong — Sync runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ApplicationController.processRequestedAppOperation controller/appcontroller.go:1603— MethodTooLong — processRequestedAppOperation runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Service.runManifestGenAsync REDACTED:871— MethodTooLong — runManifestGenAsync runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Handler.ServeHTTP REDACTED:93— MethodTooLong — ServeHTTP runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ArgoCDServer.Run REDACTED:598— MethodTooLong — Run runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ApplicationController.finalizeApplicationDeletion controller/appcontroller.go:1367— MethodTooLong — finalizeApplicationDeletion runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: syncContext.getSyncTasks gitops-engine/pkg/sync/sync_context.go:989— MethodTooLong — getSyncTasks runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Server.PodLogs server/application/application.go:1900— MethodTooLong — PodLogs runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Server.GetManifests server/application/application.go:505— MethodTooLong — GetManifests runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SCMProviderGenerator.GenerateParams applicationset/generators/scm_provider.go:146— MethodTooLong — GenerateParams runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: terminalHandler.ServeHTTP server/application/terminal.go:110— MethodTooLong — ServeHTTP runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: liveStateCache.getCluster controller/cache/cache.go:504— MethodTooLong — getCluster runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
AC4 · Keyboard semantics· Anchor without href · ×19
Anchor without href ui/src/app/applications/components/application-deployment-history/revision-metadata-rows.tsx:46— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:411— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:468— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:503— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1055— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1068— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1087— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1096— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1108— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1111— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1116— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-details/application-details.tsx:1119— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-parameters/application-parameters.tsx:117— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-parameters/application-parameters.tsx:128— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:313— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:600— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:701— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:961— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx:982— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Duplicated block (9 lines × 2) applicationset/generators/pull_request.go:167— applicationset/generators/pull_request.go:167-175 | applicationset/generators/scm_provider.go:206-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) cmd/argocd-application-controller/commands/argocd_application_controller.go:130— cmd/argocd-application-controller/commands/argocd_application_controller.go:130-138 | cmd/argocd-server/commands/argocd_server.go:141-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd-server/commands/argocd_server.go:138` calls `SetCacheSize` and `cmd/argocd-application-controller/commands/argocd_application_controller.go:127` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) cmd/argocd/commands/admin/cluster.go:560— cmd/argocd/commands/admin/cluster.go:560-568 | cmd/argocd/commands/admin/project.go:164-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:560` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) cmd/argocd/commands/admin/settings.go:396— cmd/argocd/commands/admin/settings.go:396-404 | cmd/argocd/commands/admin/settings.go:527-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:396` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) cmd/argocd/commands/applicationset.go:91— cmd/argocd/commands/applicationset.go:91-99 | cmd/argocd/commands/applicationset.go:393-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) cmpserver/server.go:51— cmpserver/server.go:51-59 | reposerver/server.go:94-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmpserver/server.go:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `reposerver/server.go:104` calls `ErrorSanitizerUnaryServerInterceptor` and `cmpserver/server.go:61` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) controller/cache/info.go:154— controller/cache/info.go:154-162 | controller/cache/info.go:190-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/cache/info.go:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) util/cmp/stream.go:217— util/cmp/stream.go:217-225 | util/manifeststream/stream.go:233-241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `util/cmp/stream.go:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) util/db/repository_secrets.go:331— util/db/repository_secrets.go:331-339 | util/db/repository_secrets.go:476-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) util/kube/kube.go:145— util/kube/kube.go:145-153 | util/kube/kube.go:167-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/kube/kube.go:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) util/notification/settings/settings.go:66— util/notification/settings/settings.go:66-74 | util/notification/settings/settings.go:89-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/notification/settings/settings.go:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) util/notification/settings/settings.go:78— util/notification/settings/settings.go:78-86 | util/notification/settings/settings.go:102-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/notification/settings/settings.go:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:265— REDACTED:265-273 | REDACTED:172-180 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:1089— REDACTED:1089-1097 | REDACTED:1135-1143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1089` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) gitops-engine/pkg/health/health_deployment.go:72— gitops-engine/pkg/health/health_deployment.go:72-80 | gitops-engine/pkg/health/health_replicaset.go:55-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) applicationset/services/pull_request/bitbucket_server.go:51— applicationset/services/pull_request/bitbucket_server.go:51-59 | applicationset/services/scm_provider/bitbucket_server.go:51-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) cmd/argocd/commands/tree.go:78— cmd/argocd/commands/tree.go:78-86 | cmd/argocd/commands/tree.go:93-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/tree.go:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) cmd/argocd/commands/tree.go:113— cmd/argocd/commands/tree.go:113-121 | cmd/argocd/commands/tree.go:134-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/tree.go:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:341— REDACTED:341-349 | REDACTED:356-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:341` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) cmd/argocd/commands/admin/settings.go:343— cmd/argocd/commands/admin/settings.go:343-350 | cmd/argocd/commands/admin/settings.go:364-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) cmd/argocd/commands/app.go:2822— cmd/argocd/commands/app.go:2822-2829 | cmd/argocd/commands/app.go:2942-2950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) cmd/argocd/commands/cluster.go:357— cmd/argocd/commands/cluster.go:357-364 | cmd/argocd/commands/cluster.go:438-445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) controller/sharding/cache.go:298— controller/sharding/cache.go:298-305 | controller/sharding/sharding.go:246-253 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `controller/sharding/cache.go:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) gitops-engine/pkg/sync/sync_context.go:632— gitops-engine/pkg/sync/sync_context.go:632-639 | gitops-engine/pkg/sync/sync_context.go:753-760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) REDACTED:934— REDACTED:934-941 | REDACTED:2684-2691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:934` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:3772— REDACTED:3772-3779 | REDACTED:3858-3865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) server/application/application.go:1020— server/application/application.go:1020-1027 | server/applicationset/applicationset.go:590-597 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1020` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/application/application.go:1743— server/application/application.go:1743-1750 | server/application/application.go:1773-1780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) server/repository/repository.go:160— server/repository/repository.go:160-167 | server/repository/repository.go:625-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) REDACTED:575— REDACTED:575-582 | REDACTED:1219-1226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:575` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) cmd/argocd/commands/admin/settings.go:534— cmd/argocd/commands/admin/settings.go:534-541 | cmd/argocd/commands/admin/settings.go:599-606 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) gitops-engine/pkg/cache/settings.go:134— gitops-engine/pkg/cache/settings.go:134-141 | gitops-engine/pkg/engine/engine_options.go:33-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) hack/gen-catalog/main.go:203— hack/gen-catalog/main.go:203-210 | hack/gen-catalog/main.go:227-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) REDACTED:1104— REDACTED:1104-1111 | REDACTED:1119-1126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1100` calls `now`, `Unix` and `REDACTED:1118` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) REDACTED:434— REDACTED:434-441 | REDACTED:504-511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:434` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) cmd/argocd/commands/admin/backup.go:322— cmd/argocd/commands/admin/backup.go:322-329 | cmd/argocd/commands/admin/backup.go:356-363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/backup.go:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:1254— REDACTED:1254-1261 | REDACTED:1265-1272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) cmpserver/plugin/plugin.go:310— cmpserver/plugin/plugin.go:310-317 | cmpserver/plugin/plugin.go:396-403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) cmd/argocd-application-controller/commands/argocd_application_controller.go:154— cmd/argocd-application-controller/commands/argocd_application_controller.go:154-162 | REDACTED:225-231 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd-application-controller/commands/argocd_application_controller.go:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) cmd/argocd/commands/app.go:984— cmd/argocd/commands/app.go:984-990 | cmd/argocd/commands/app.go:3262-3268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:984` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) cmd/argocd/commands/app.go:1290— cmd/argocd/commands/app.go:1290-1296 | cmd/argocd/commands/app.go:1633-1639 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:1290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) controller/appcontroller.go:1107— controller/appcontroller.go:1107-1113 | controller/appcontroller.go:2986-2992 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:1107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) REDACTED:1005— REDACTED:1005-1011 | REDACTED:1080-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1005` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) server/application/application.go:422— server/application/application.go:422-429 | server/applicationset/applicationset.go:348-354 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) server/application/application.go:2252— server/application/application.go:2252-2258 | server/application/application.go:2400-2406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) server/application/application.go:2298— server/application/application.go:2298-2304 | server/application/application.go:2323-2329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:2298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) server/repository/repository.go:287— server/repository/repository.go:287-294 | server/repository/repository.go:338-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) cmpserver/plugin/plugin.go:164— cmpserver/plugin/plugin.go:164-170 | util/exec/exec.go:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `util/exec/exec.go:130` calls `String`, `Error` and `cmpserver/plugin/plugin.go:172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) gitops-engine/pkg/cache/settings.go:144— gitops-engine/pkg/cache/settings.go:144-150 | gitops-engine/pkg/engine/engine_options.go:43-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) util/kube/kube.go:25— util/kube/kube.go:25-31 | util/kube/kube.go:103-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) cmpserver/plugin/plugin.go:230— cmpserver/plugin/plugin.go:230-237 | cmpserver/plugin/plugin.go:403-409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) cmd/argocd/commands/app.go:1471— cmd/argocd/commands/app.go:1471-1477 | cmd/argocd/commands/applicationset.go:359-365 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:1471` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) gitops-engine/pkg/cache/legacy_engine.go:142— gitops-engine/pkg/cache/legacy_engine.go:142-148 | gitops-engine/pkg/cache/legacy_engine.go:231-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) server/application/application.go:1339— server/application/application.go:1339-1345 | server/applicationset/applicationset.go:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) REDACTED:123— REDACTED:123-129 | REDACTED:260-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:268` calls `Flags`, `Int64Var`, `ParseNumFromEnv` and `REDACTED:131` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
ClassTooLong: ApplicationController controller/appcontroller.go:120— ClassTooLong — 1883 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods, 64 blocks, lines 120-3615. The bar is 400 significant lines; this is 1483 over it, 4.71× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Server server/application/application.go:103— ClassTooLong — 1858 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods, 60 blocks, lines 103-3327. The bar is 400 significant lines; this is 1458 over it, 4.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Service REDACTED:93— ClassTooLong — 1261 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods, 36 blocks, lines 93-3909. The bar is 400 significant lines; this is 861 over it, 3.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SettingsManager REDACTED:632— ClassTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods, 71 blocks, lines 632-3001. The bar is 400 significant lines; this is 514 over it, 2.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: syncContext gitops-engine/pkg/sync/sync_context.go:388— ClassTooLong — 850 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods, 36 blocks, lines 364-1843. The bar is 400 significant lines; this is 450 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: nativeGitClient REDACTED:202— ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods, 50 blocks, lines 202-2313. The bar is 400 significant lines; this is 354 over it, 1.89× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ApplicationSetReconciler REDACTED:90— ClassTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods, 16 blocks, lines 90-1247. The bar is 400 significant lines; this is 261 over it, 1.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: appStateManager REDACTED:133— ClassTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods, 8 blocks, lines 133-1404. The bar is 400 significant lines; this is 258 over it, 1.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ArgoCDServer REDACTED:190— ClassTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods, 24 blocks, lines 190-1890. The bar is 400 significant lines; this is 250 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: store gitops-engine/pkg/cache/cluster.go:243— ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods, 45 blocks, lines 243-1496. The bar is 400 significant lines; this is 200 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ClientApp REDACTED:75— ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods, 17 blocks, lines 75-1141. The bar is 400 significant lines; this is 74 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: client pkg/apiclient/apiclient.go:164— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods, 62 blocks, lines 164-1121. The bar is 400 significant lines; this is 42 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Server server/repository/repository.go:34— ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods, 28 blocks, lines 34-797. The bar is 400 significant lines; this is 16 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities· Medium CVE · ×12
Duplicated block (12 lines × 2) applicationset/generators/utils.go:26— applicationset/generators/utils.go:26-37 | applicationset/generators/utils.go:39-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) applicationset/webhook/webhook.go:429— applicationset/webhook/webhook.go:429-440 | applicationset/webhook/webhook.go:485-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) REDACTED:62— REDACTED:62-73 | REDACTED:103-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 2) cmpserver/server.go:63— cmpserver/server.go:63-74 | reposerver/server.go:107-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `reposerver/server.go:104` calls `ErrorSanitizerUnaryServerInterceptor` and `cmpserver/server.go:60` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) REDACTED:3786— REDACTED:3786-3797 | REDACTED:3872-3883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3786` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 2) server/application/application.go:1029— server/application/application.go:1029-1040 | server/applicationset/applicationset.go:599-610 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1029` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) REDACTED:1092— REDACTED:1092-1103 | REDACTED:1203-1214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1092` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) util/kube/kube.go:45— util/kube/kube.go:45-56 | util/kube/kube.go:82-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) REDACTED:2024— REDACTED:2024-2035 | REDACTED:2039-2050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2024` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) util/db/repository_secrets.go:290— util/db/repository_secrets.go:290-301 | util/db/repository_secrets.go:312-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/db/repository_secrets.go:290` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) cmd/argocd-application-controller/commands/argocd_application_controller.go:115— cmd/argocd-application-controller/commands/argocd_application_controller.go:115-126 | REDACTED:55-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cmd/argocd-application-controller/commands/argocd_application_controller.go:127` calls `SetGLogLevel` and `REDACTED:69` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) server/application/application.go:1069— server/application/application.go:1069-1080 | server/application/application.go:2619-2630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1069` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) applicationset/generators/pull_request.go:143— applicationset/generators/pull_request.go:143-152 | applicationset/generators/scm_provider.go:180-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/generators/pull_request.go:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) applicationset/services/scm_provider/github.go:53— applicationset/services/scm_provider/github.go:53-62 | applicationset/services/scm_provider/gitlab.go:69-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/services/scm_provider/github.go:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) cmd/argocd/commands/account.go:185— cmd/argocd/commands/account.go:185-194 | cmd/argocd/commands/app_actions.go:118-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) cmd/argocd/commands/applicationset.go:154— cmd/argocd/commands/applicationset.go:154-163 | cmd/argocd/commands/applicationset.go:263-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) cmd/util/app.go:613— cmd/util/app.go:613-622 | cmd/util/applicationset.go:33-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/util/app.go:613` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) gitops-engine/pkg/cache/legacy_engine.go:188— gitops-engine/pkg/cache/legacy_engine.go:188-197 | gitops-engine/pkg/cache/legacy_engine.go:253-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/cache/legacy_engine.go:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gitops-engine/pkg/cache/legacy_engine.go:198` calls `Lock` and `gitops-engine/pkg/cache/legacy_engine.go:263` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) server/application/application.go:1604— server/application/application.go:1604-1613 | server/application/application.go:1647-1656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) REDACTED:176— REDACTED:176-185 | REDACTED:263-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:187` calls `GetCAPath` and `REDACTED:273` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) REDACTED:172— REDACTED:172-181 | cmd/argocd/commands/relogin.go:85-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:170` calls `passwordLogin` and `cmd/argocd/commands/relogin.go:84` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) REDACTED:929— REDACTED:929-941 | REDACTED:945-954 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:929` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) REDACTED:411— REDACTED:411-420 | REDACTED:534-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) controller/hydrator/hydrator.go:230— controller/hydrator/hydrator.go:230-239 | controller/hydrator/hydrator.go:265-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/hydrator/hydrator.go:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×11
Dependency pinned to a stale untagged commit: github.com/davecgh/go-spew — Direct dependency `github.com/davecgh/go-spew` is required at `v1.1.2-0.20180830191138-d8f796af33cc` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2018-08-30, 8.2 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/davecgh/go-spew` and has not moved this requirement in 8.2 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/davecgh/go-spew` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/gogits/go-gogs-client — Direct dependency `github.com/gogits/go-gogs-client` is required at `v0.0.0-20210131175652-1d7215cd8d85` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-01-31, 5.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/gogits/go-gogs-client` and has not moved this requirement in 5.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/gogits/go-gogs-client` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/google/shlex — Direct dependency `github.com/google/shlex` is required at `v0.0.0-20191202100458-e7afc7fbc510` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2019-12-02, 6.9 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/google/shlex` and has not moved this requirement in 6.9 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/google/shlex` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/improbable-eng/grpc-web — Direct dependency `github.com/improbable-eng/grpc-web` is required at `v0.15.1-0.20230209220825-1d9bbb09a099` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2023-02-09, 3.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/improbable-eng/grpc-web` and has not moved this requirement in 3.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/improbable-eng/grpc-web` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/jeremywohl/flatten — Direct dependency `github.com/jeremywohl/flatten` is required at `v1.0.2-0.20211013061545-07e4a09fb8e4` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-10-13, 5.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/jeremywohl/flatten` and has not moved this requirement in 5.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/jeremywohl/flatten` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/kballard/go-shellquote — Direct dependency `github.com/kballard/go-shellquote` is required at `v0.0.0-20180428030007-95032a82bc51` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2018-04-28, 8.5 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/kballard/go-shellquote` and has not moved this requirement in 8.5 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/kballard/go-shellquote` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/minio/blake2b-simd — Direct dependency `github.com/minio/blake2b-simd` is required at `v0.0.0-20160723061019-3f5f724cb5b1` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2016-07-23, 10.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/minio/blake2b-simd` and has not moved this requirement in 10.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/minio/blake2b-simd` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/patrickmn/go-cache — Direct dependency `github.com/patrickmn/go-cache` is required at `v2.1.1-0.20191004192108-46f407853014+incompatible` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2019-10-04, 7.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/patrickmn/go-cache` and has not moved this requirement in 7.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/patrickmn/go-cache` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/robfig/cron/v3 — Direct dependency `github.com/robfig/cron/v3` is required at `v3.0.2-0.20210106135023-bc59245fe10e` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-01-06, 5.9 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/robfig/cron/v3` and has not moved this requirement in 5.9 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/robfig/cron/v3` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/skratchdot/open-golang — Direct dependency `github.com/skratchdot/open-golang` is required at `v0.0.0-20200116055534-eef842397966` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-01-16, 6.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/skratchdot/open-golang` and has not moved this requirement in 6.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/skratchdot/open-golang` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: layeh.com/gopher-json — Direct dependency `layeh.com/gopher-json` is required at `v0.0.0-20190114024228-97fed8db8427` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2019-01-14, 7.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `layeh.com/gopher-json` and has not moved this requirement in 7.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `layeh.com/gopher-json` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
TooManyMethods: ApplicationController controller/appcontroller.go:120— TooManyMethods — 83 methods, declared across 3 files: controller/appcontroller.go (64), controller/hydrator_dependencies.go (13), REDACTED (6). The bar is 30 methods; this is 53 over it, 2.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SettingsManager REDACTED:632— TooManyMethods — 75 methods, declared across 2 files: REDACTED (70), settings/accounts.go (5). The bar is 30 methods; this is 45 over it, 2.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: client pkg/apiclient/apiclient.go:164— TooManyMethods — 64 methods, declared across 2 files: apiclient/apiclient.go (61), apiclient/grpcproxy.go (3). The bar is 30 methods; this is 34 over it, 2.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement apiclient.Client (57 of 64 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: db util/db/db.go:127— TooManyMethods — 60 methods, declared across 8 files: db/repository.go (35), REDACTED (10), db/certificate.go (5), db/secrets.go (4), +4 more file(s). The bar is 30 methods; this is 30 over it, 2.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement db.ArgoDB (43 of 60 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Server server/application/application.go:103— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: nativeGitClient REDACTED:202— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: store gitops-engine/pkg/cache/cluster.go:243— TooManyMethods — 45 methods, declared across 2 files: cache/cluster.go (44), cache/references.go (1). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ArgoCDSettings REDACTED:87— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: syncContext gitops-engine/pkg/sync/sync_context.go:388— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Service REDACTED:93— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Cache reposerver/cache/cache.go:32— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (11 lines × 2) cmd/argocd/commands/admin/settings.go:415— cmd/argocd/commands/admin/settings.go:415-425 | cmd/argocd/commands/admin/settings.go:462-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:415` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) cmd/argocd/commands/repo.go:387— cmd/argocd/commands/repo.go:387-398 | cmd/argocd/commands/repo.go:459-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) commitserver/metrics/githandlers.go:11— commitserver/metrics/githandlers.go:11-21 | reposerver/metrics/githandlers.go:27-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `commitserver/metrics/githandlers.go:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) server/application/application.go:1302— server/application/application.go:1302-1312 | server/applicationset/applicationset.go:91-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/application/application.go:1301` calls `NewNameFilter`, `GetNames` and `server/applicationset/applicationset.go:90` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) server/project/project.go:96— server/project/project.go:96-106 | server/project/project.go:215-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) util/cert/cert.go:127— util/cert/cert.go:127-137 | util/cert/cert.go:193-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/cert/cert.go:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) util/db/repository.go:61— util/db/repository.go:61-71 | util/db/repository.go:75-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/db/repository.go:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) cmd/argocd/commands/project_role.go:642— cmd/argocd/commands/project_role.go:642-652 | cmd/argocd/commands/project_role.go:673-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) cmd/argocd/commands/app.go:1186— cmd/argocd/commands/app.go:1186-1196 | cmd/util/app.go:910-920 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) cmd/argocd/commands/admin/settings_rbac.go:188— cmd/argocd/commands/admin/settings_rbac.go:188-198 | cmd/argocd/commands/admin/settings_rbac.go:281-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings_rbac.go:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) cmd/argocd/commands/common.go:25— cmd/argocd/commands/common.go:25-35 | cmd/argocd/commands/common.go:59-69 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/common.go:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) REDACTED:140— REDACTED:140-144 | REDACTED:206-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:212` calls `Flags`, `StringVarP` and `REDACTED:146` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) cmd/argocd/commands/tree.go:107— cmd/argocd/commands/tree.go:107-111 | cmd/argocd/commands/tree.go:127-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) gitops-engine/pkg/cache/legacy_engine.go:170— gitops-engine/pkg/cache/legacy_engine.go:170-174 | gitops-engine/pkg/cache/legacy_engine.go:322-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/cache/legacy_engine.go:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) server/application/application.go:1882— server/application/application.go:1882-1886 | server/application/application.go:3154-3158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1882` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) server/project/project.go:113— server/project/project.go:113-117 | server/project/project.go:232-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/project/project.go:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) util/webhook/push.go:36— util/webhook/push.go:36-40 | util/webhook/push.go:58-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) util/hash/hash.go:13— util/hash/hash.go:13-17 | REDACTED:113-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) controller/appcontroller.go:1962— controller/appcontroller.go:1962-1967 | controller/appcontroller.go:1998-2002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:1962` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `controller/appcontroller.go:1968` calls `isOperationStatePayloadTooLargeError` and `controller/appcontroller.go:2003` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) gitops-engine/pkg/utils/kube/resource_ops.go:266— gitops-engine/pkg/utils/kube/resource_ops.go:266-270 | gitops-engine/pkg/utils/kube/resource_ops.go:340-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/utils/kube/resource_ops.go:266` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (5 lines × 2) util/exec/exec.go:270— util/exec/exec.go:270-274 | util/exec/exec.go:284-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) cmd/argocd/commands/projectwindows.go:238— cmd/argocd/commands/projectwindows.go:238-242 | cmd/argocd/commands/projectwindows.go:347-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/projectwindows.go:237` calls `Flags`, `StringVarP` and `cmd/argocd/commands/projectwindows.go:346` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Outbound HTTP without resilience applicationset/generators/scm_provider.go:325— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience applicationset/generators/scm_provider.go:329— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience applicationset/services/github_metrics.go:238— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience applicationset/services/internal/github_app/client.go:42— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience applicationset/services/internal/github_app/client.go:47— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience applicationset/services/util.go:21— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:632— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience util/kube/portforwarder.go:79— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:147— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:167— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
FixmeComment REDACTED:3019— // FIXME: remove when we have proper WatchListClient and InOrderInformers support — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment REDACTED:2801— // FIXME: omit it for now — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment controller/appcontroller.go:2731— // FIXME: remove check when caller function in hydrator gets tracing added — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment controller/hydrator_dependencies.go:61— // FIXME: use cache and revision cache — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment controller/metrics/clustercollector.go:103— //nolint:staticcheck // FIXME: complains about SA1015 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment controller/hydrator/hydrator.go:439— // FIXME: As a convenience, the commit server will create the syncBranch if it does not exist. If the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment commitserver/commit/commit.go:286— // FIXME: make it work for GHE — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment REDACTED:265— // FIXME: record.EventRecorder -> events.EventRecorder — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TooManyFields: AppOptions cmd/util/app.go:30— TooManyFields — 76 stored fields. The bar is 30 stored fields; this is 46 over it, 2.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ApplicationController controller/appcontroller.go:120— TooManyFields — 42 stored fields beside 83 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ArgoCDSettings REDACTED:87— TooManyFields — 42 stored fields beside 38 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ArgoCDServerOpts REDACTED:231— TooManyFields — 42 stored fields. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: syncContext gitops-engine/pkg/sync/sync_context.go:388— TooManyFields — 39 stored fields beside 35 methods. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: store gitops-engine/pkg/cache/cluster.go:243— TooManyFields — 37 stored fields beside 45 methods. The bar is 30 stored fields; this is 7 over it, 1.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Repository pkg/apis/application/v1alpha1/repository_types.go:71— TooManyFields — 32 stored fields beside 12 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×7
Edited copy of a member (10 corresponding lines) server/repocreds/repocreds.go:158— server/repocreds/repocreds.go:158-167 | server/repocreds/repocreds.go:170-179 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) REDACTED:1204— REDACTED:1204-1213 | REDACTED:1215-1224 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) gitops-engine/pkg/cache/cluster.go:450— gitops-engine/pkg/cache/cluster.go:450-459 | gitops-engine/pkg/cache/cluster.go:463-472 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) controller/sharding/consistent/consistent.go:167— controller/sharding/consistent/consistent.go:167-176 | controller/sharding/consistent/consistent.go:181-190 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) pkg/apis/application/v1alpha1/types.go:627— pkg/apis/application/v1alpha1/types.go:627-637 | pkg/apis/application/v1alpha1/types.go:640-649 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) cmpserver/apiclient/clientset.go:22— cmpserver/apiclient/clientset.go:22-31 | commitserver/apiclient/clientset.go:18-27 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) gitops-engine/pkg/sync/hook/helm/weight.go:10— gitops-engine/pkg/sync/hook/helm/weight.go:10-19 | gitops-engine/pkg/sync/syncwaves/waves.go:12-21 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) controller/appcontroller.go:1324— controller/appcontroller.go:1324-1334 | controller/appcontroller.go:1561-1576 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) util/db/helmrepository.go:11— util/db/helmrepository.go:11-21 | util/db/repository.go:194-204 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) cmd/argocd/commands/app.go:2633— cmd/argocd/commands/app.go:2633-2644 | pkg/apiclient/apiclient.go:1123-1133 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) server/repository/repository.go:185— server/repository/repository.go:185-195 | server/repository/repository.go:199-213 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) cmd/argocd/commands/app_diff.go:87— cmd/argocd/commands/app_diff.go:87-97 | REDACTED:562-572 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) util/io/files/secure_mkdir_default.go:15— util/io/files/secure_mkdir_default.go:15-25 | util/io/files/secure_mkdir_linux.go:16-26 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) pkg/apis/application/v1alpha1/types.go:4533— pkg/apis/application/v1alpha1/types.go:4533-4543 | util/lua/lua.go:339-350 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×7
Edited copy of a member (12 corresponding lines) util/notification/settings/settings.go:20— util/notification/settings/settings.go:20-31 | util/notification/settings/settings.go:34-50 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) gitops-engine/pkg/cache/manifest_codec.go:245— gitops-engine/pkg/cache/manifest_codec.go:245-256 | gitops-engine/pkg/cache/manifest_codec.go:289-300 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) pkg/apiclient/apiclient.go:1135— pkg/apiclient/apiclient.go:1135-1146 | pkg/apiclient/grpcproxy.go:247-258 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) commitserver/server.go:30— commitserver/server.go:30-41 | reposerver/server.go:139-153 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) REDACTED:28— REDACTED:28-42 | cmd/argocd/commands/admin/settings_rbac.go:114-125 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) REDACTED:362— REDACTED:362-373 | REDACTED:1174-1186 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/application/terminal.go:56— server/application/terminal.go:56-67 | server/repository/repository.go:57-69 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×7
Edited copy of a member (7 corresponding lines) cmpserver/plugin/plugin.go:72— cmpserver/plugin/plugin.go:72-78 | util/rand/rand.go:34-40 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) REDACTED:473— REDACTED:473-479 | REDACTED:345-351 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) applicationset/generators/matrix.go:177— applicationset/generators/matrix.go:177-186 | REDACTED:2752-2758 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) applicationset/services/pull_request/azure_devops.go:28— applicationset/services/pull_request/azure_devops.go:28-34 | applicationset/services/scm_provider/azure_devops.go:36-42 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) applicationset/generators/matrix.go:188— applicationset/generators/matrix.go:188-197 | REDACTED:2776-2782 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) applicationset/utils/map.go:7— applicationset/utils/map.go:7-14 | util/helm/index.go:15-21 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) cmpserver/apiclient/clientset.go:33— cmpserver/apiclient/clientset.go:33-39 | commitserver/apiclient/clientset.go:30-36 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 2) REDACTED:129— REDACTED:129-134 | cmd/argocd/commands/admin/notifications.go:58-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) cmd/argocd/commands/admin/app.go:293— cmd/argocd/commands/admin/app.go:293-298 | cmd/argocd/commands/headless/headless.go:137-142 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) cmd/argocd/commands/admin/repo.go:160— cmd/argocd/commands/admin/repo.go:160-165 | cmd/argocd/commands/repo.go:223-228 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) cmpserver/apiclient/clientset.go:47— cmpserver/apiclient/clientset.go:47-52 | REDACTED:130-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:128` calls `UnaryClientInterceptor`, `Duration` and `cmpserver/apiclient/clientset.go:46` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) REDACTED:3353— REDACTED:3353-3358 | REDACTED:3425-3430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3353` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) util/cache/redis.go:222— util/cache/redis.go:222-227 | util/cache/redis_hook.go:20-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) cmd/argocd/commands/app.go:1255— cmd/argocd/commands/app.go:1255-1260 | cmd/argocd/commands/app_diff.go:777-782 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×6
Animation without a prefers-reduced-motion guard ui/src/app/shared/components/progress/progress-bar.tsx:14— <div> moves — its inline style sets `transition: width 0.1s ease-in` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ui/src/app/shared/components/search-bar/search-bar.scss:56— `.search-bar__input` moves (`transition: width 200ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ui/src/app/shared/components/expandable/expandable.scss:6— `.expandable` moves (`transition: max-height 0.5s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ui/src/app/resources/components/resources-list/resources-list.scss:58— `.resources-list__search` moves (`transition: width 200ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ui/src/app/applications/components/utils.scss:48— `.icon.spin` moves (`animation: spin 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ui/src/app/applications/components/application-resource-tree/application-resource-tree.scss:37— `.application-resource-tree--network .application-resource-tree__line` moves (`animation: network-flow 1s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×6
Focus outline removed in CSS without a :focus replacement ui/src/app/shared/components/tags-input/tags-input.scss:24— `.tags-input--focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/src/app/resources/components/resources-list/resources-list.scss:17— `.resources-list__accordion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.scss:32— `.pod-logs-viewer__settings .argo-checkbox` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/src/app/applications/components/applications-list/applications-list.scss:77— `.applications-list__accordion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/src/app/applications/components/applications-list/applications-tiles.scss:32— `.applications-tiles.applications-tiles--virtualized .ReactVirtualized__Grid:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ui/src/app/applications/components/application-node-info/application-node-info.scss:126— `.application-node-info__application-external-link:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×6
Edited copy of a member (20 corresponding lines) cmd/argocd/commands/tree.go:29— cmd/argocd/commands/tree.go:29-48 | cmd/argocd/commands/tree.go:50-74 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) cmd/argocd/commands/admin/settings.go:342— cmd/argocd/commands/admin/settings.go:342-361 | cmd/argocd/commands/admin/settings.go:363-386 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) REDACTED:1934— REDACTED:1934-1959 | REDACTED:1963-1982 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) util/kube/kube.go:140— util/kube/kube.go:140-159 | util/kube/kube.go:162-181 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) gitops-engine/pkg/health/health_apiservice.go:36— gitops-engine/pkg/health/health_apiservice.go:36-55 | gitops-engine/pkg/health/health_apiservice.go:57-76 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) pkg/apis/application/v1alpha1/app_project_types.go:70— pkg/apis/application/v1alpha1/app_project_types.go:70-94 | pkg/apis/application/v1alpha1/app_project_types.go:97-116 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) cmd/argocd/commands/tree.go:76— cmd/argocd/commands/tree.go:76-89 | cmd/argocd/commands/tree.go:91-104 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) REDACTED:1090— REDACTED:1090-1103 | REDACTED:1201-1214 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) REDACTED:1019— REDACTED:1019-1032 | REDACTED:2797-2812 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) applicationset/services/pull_request/bitbucket_cloud.go:78— applicationset/services/pull_request/bitbucket_cloud.go:78-95 | applicationset/services/pull_request/bitbucket_cloud.go:97-110 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) cmd/util/project.go:97— cmd/util/project.go:97-110 | cmd/util/project.go:112-126 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) util/cli/cli.go:166— util/cli/cli.go:166-179 | util/cli/cli.go:183-198 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (16 lines × 2) REDACTED:1093— REDACTED:1093-1108 | REDACTED:1222-1237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1093` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) REDACTED:96— REDACTED:96-111 | REDACTED:209-224 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 2) cmd/argocd/commands/admin/backup.go:71— cmd/argocd/commands/admin/backup.go:71-86 | cmd/argocd/commands/admin/backup.go:207-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) cmd/argocd/commands/admin/cluster.go:205— cmd/argocd/commands/admin/cluster.go:205-220 | cmd/argocd/commands/admin/cluster.go:500-515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) REDACTED:100— REDACTED:100-115 | REDACTED:58-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) gitops-engine/pkg/health/health_apiservice.go:40— gitops-engine/pkg/health/health_apiservice.go:40-55 | gitops-engine/pkg/health/health_apiservice.go:61-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/health/health_apiservice.go:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) server/cluster/cluster.go:334— server/cluster/cluster.go:334-346 | server/cluster/cluster.go:451-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) util/cmp/stream.go:200— util/cmp/stream.go:200-212 | util/manifeststream/stream.go:212-224 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `util/cmp/stream.go:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) util/db/repository.go:438— util/db/repository.go:438-450 | util/db/repository.go:455-467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/db/repository.go:438` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) util/db/repository_secrets.go:431— util/db/repository_secrets.go:431-443 | util/db/repository_secrets.go:541-553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) REDACTED:749— REDACTED:749-762 | REDACTED:785-797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:749` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) cmd/argocd/commands/admin/repo.go:137— cmd/argocd/commands/admin/repo.go:137-149 | cmd/argocd/commands/repo.go:181-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/repo.go:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) cmd/argocd/commands/app_diff.go:473— cmd/argocd/commands/app_diff.go:473-487 | cmd/argocd/commands/app_diff.go:490-508 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) util/db/repository.go:151— util/db/repository.go:151-165 | util/db/repository.go:279-293 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) cmd/argocd-k8s-auth/commands/azure_cgo.go:55— cmd/argocd-k8s-auth/commands/azure_cgo.go:55-69 | cmd/argocd-k8s-auth/commands/gcp.go:24-40 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) controller/appcontroller.go:2688— controller/appcontroller.go:2688-2702 | REDACTED:918-932 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) cmd/argocd/commands/app_diff.go:369— cmd/argocd/commands/app_diff.go:369-384 | cmd/argocd/commands/app_diff.go:393-407 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) REDACTED:224— REDACTED:224-232 | util/cli/cli.go:111-119 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) cmpserver/plugin/plugin.go:177— cmpserver/plugin/plugin.go:177-185 | pkg/apis/application/v1alpha1/types.go:172-180 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) gitops-engine/pkg/sync/resource/annotations.go:44— gitops-engine/pkg/sync/resource/annotations.go:44-52 | pkg/apis/application/v1alpha1/types.go:1513-1521 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) REDACTED:153— REDACTED:153-161 | REDACTED:513-521 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) REDACTED:15— REDACTED:15-23 | applicationset/services/pull_request/github.go:14-22 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) applicationset/services/scm_provider/utils.go:111— applicationset/services/scm_provider/utils.go:111-125 | applicationset/services/scm_provider/utils.go:145-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/services/scm_provider/utils.go:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) cmd/argocd/commands/admin/backup.go:55— cmd/argocd/commands/admin/backup.go:55-69 | cmd/argocd/commands/admin/project_allowlist.go:54-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) cmd/argocd/commands/admin/cluster.go:403— cmd/argocd/commands/admin/cluster.go:403-417 | cmd/argocd/commands/admin/cluster.go:461-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:403` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cmd/argocd/commands/admin/cluster.go:418` calls `Flags`, `BoolVar`, `IntVar` and `cmd/argocd/commands/admin/cluster.go:476` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) cmd/argocd/commands/app.go:287— cmd/argocd/commands/app.go:287-301 | cmd/argocd/commands/app_resources.go:444-458 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:287` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) REDACTED:3380— REDACTED:3380-3394 | REDACTED:3452-3466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) applicationset/generators/matrix.go:124— applicationset/generators/matrix.go:124-138 | applicationset/generators/merge.go:165-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/generators/matrix.go:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) controller/appcontroller.go:830— controller/appcontroller.go:830-843 | server/application/application.go:3272-3285 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:830` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) gitops-engine/pkg/cache/cluster.go:604— gitops-engine/pkg/cache/cluster.go:604-617 | gitops-engine/pkg/cache/cluster.go:620-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/cache/cluster.go:604` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) server/application/application.go:527— server/application/application.go:527-540 | server/application/application.go:701-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) util/argo/audit_logger.go:139— util/argo/audit_logger.go:139-152 | util/argo/audit_logger.go:179-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 3) cmd/argocd/commands/admin/settings.go:395— cmd/argocd/commands/admin/settings.go:395-401 | cmd/argocd/commands/admin/settings.go:493-499 | cmd/argocd/commands/admin/settings.go:526-532 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) cmd/argocd/commands/project_source_integrity.go:113— cmd/argocd/commands/project_source_integrity.go:113-119 | cmd/argocd/commands/project_source_integrity.go:274-280 | cmd/argocd/commands/project_source_integrity.go:379-385 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_source_integrity.go:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) cmd/argocd/commands/project_source_integrity.go:125— cmd/argocd/commands/project_source_integrity.go:125-131 | cmd/argocd/commands/project_source_integrity.go:190-196 | cmd/argocd/commands/project_source_integrity.go:392-398 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) server/project/project.go:342— server/project/project.go:342-348 | server/project/project.go:505-511 | server/project/project.go:535-541 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) REDACTED:47— REDACTED:47-55 | applicationset/generators/git.go:50-56 | applicationset/generators/oci.go:36-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:57` calls `GetTemplate` and `applicationset/generators/git.go:60` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) server/repository/repository.go:547— server/repository/repository.go:547-567 | server/repository/repository.go:570-594 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) cmd/argocd/commands/app.go:278— cmd/argocd/commands/app.go:278-301 | cmd/argocd/commands/app_resources.go:438-458 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) server/repository/repository.go:137— server/repository/repository.go:137-157 | server/repository/repository.go:159-182 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) util/db/repository_secrets.go:281— util/db/repository_secrets.go:281-301 | util/db/repository_secrets.go:303-323 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×4
Edited copy of a member (23 corresponding lines) cmd/argocd/commands/project.go:600— cmd/argocd/commands/project.go:600-622 | cmd/argocd/commands/project.go:624-646 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) server/application/application.go:1018— server/application/application.go:1018-1040 | server/applicationset/applicationset.go:588-610 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) REDACTED:339— REDACTED:339-361 | util/db/repository_secrets.go:231-253 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) pkg/apis/application/v1alpha1/types.go:965— pkg/apis/application/v1alpha1/types.go:965-987 | pkg/apis/application/v1alpha1/types.go:999-1021 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) applicationset/progressivesync/validation_issues.go:54— applicationset/progressivesync/validation_issues.go:54-66 | applicationset/progressivesync/validation_issues.go:90-102 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) controller/sharding/cache.go:290— controller/sharding/cache.go:290-305 | controller/sharding/sharding.go:241-253 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) util/db/repository.go:333— util/db/repository.go:333-346 | util/db/repository.go:349-361 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/cluster/cluster.go:115— server/cluster/cluster.go:115-127 | util/argo/argo.go:307-319 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) util/localconfig/file_perm_unix.go:10— util/localconfig/file_perm_unix.go:10-15 | util/localconfig/file_perm_windows.go:10-16 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) cmd/argocd/commands/app.go:752— cmd/argocd/commands/app.go:752-757 | cmd/argocd/commands/applicationset.go:547-552 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) gitops-engine/pkg/utils/io/io.go:18— gitops-engine/pkg/utils/io/io.go:18-23 | hack/gen-crd-spec/main.go:69-74 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) REDACTED:117— REDACTED:117-122 | hack/gen-resources/cmd/main.go:12-18 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) cmd/argocd/commands/admin/repo.go:123— cmd/argocd/commands/admin/repo.go:123-141 | cmd/argocd/commands/repo.go:144-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19 lines × 2) cmd/argocd/commands/app.go:258— cmd/argocd/commands/app.go:258-276 | cmd/argocd/commands/applicationset.go:586-604 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:258` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) cmd/argocd/commands/app.go:2915— cmd/argocd/commands/app.go:2915-2933 | cmd/argocd/commands/app_diff.go:649-667 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:2915` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) cmd/argocd/commands/project_role.go:101— cmd/argocd/commands/project_role.go:101-119 | cmd/argocd/commands/project_role.go:176-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_role.go:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11–12 lines × 2) applicationset/generators/pull_request.go:221— applicationset/generators/pull_request.go:221-232 | applicationset/generators/scm_provider.go:300-310 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/generators/pull_request.go:221` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) cmd/argocd/commands/project_source_integrity.go:117— cmd/argocd/commands/project_source_integrity.go:117-127 | cmd/argocd/commands/project_source_integrity.go:181-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_source_integrity.go:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11–12 lines × 2) controller/appcontroller.go:3285— controller/appcontroller.go:3285-3295 | controller/appcontroller.go:3581-3592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:3581` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) REDACTED:427— REDACTED:427-438 | REDACTED:469-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:427` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×3
Edited copy of a member (54 corresponding lines) cmd/argocd/commands/admin/cluster.go:193— cmd/argocd/commands/admin/cluster.go:193-246 | cmd/argocd/commands/admin/cluster.go:479-539 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) cmd/argocd/commands/admin/cluster.go:369— cmd/argocd/commands/admin/cluster.go:369-422 | cmd/argocd/commands/admin/cluster.go:424-477 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) util/trace/meter.go:27— util/trace/meter.go:27-84 | REDACTED:155-208 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) server/repocreds/repocreds.go:88— server/repocreds/repocreds.go:88-120 | server/repocreds/repocreds.go:123-155 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) cmd/argocd/commands/project.go:833— cmd/argocd/commands/project.go:833-865 | cmd/argocd/commands/project_role.go:448-508 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) controller/appcontroller.go:1193— controller/appcontroller.go:1193-1234 | controller/appcontroller.go:2397-2429 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×3
Edited copy of a member (29 corresponding lines) cmd/argocd/commands/project_role.go:223— cmd/argocd/commands/project_role.go:223-262 | cmd/argocd/commands/project_role.go:637-665 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) cmd/argocd/commands/app.go:1380— cmd/argocd/commands/app.go:1380-1408 | cmd/argocd/commands/applicationset.go:468-499 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) gitops-engine/pkg/utils/kube/ctl.go:288— gitops-engine/pkg/utils/kube/ctl.go:288-316 | gitops-engine/pkg/utils/kube/ctl.go:319-347 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×3
Edited copy of a member (24 corresponding lines) applicationset/generators/pull_request.go:219— applicationset/generators/pull_request.go:219-244 | applicationset/generators/scm_provider.go:298-321 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) server/repocreds/repocreds.go:36— server/repocreds/repocreds.go:36-59 | server/repocreds/repocreds.go:62-85 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) REDACTED:25— REDACTED:25-52 | REDACTED:25-48 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) cmd/argocd/commands/app.go:2745— cmd/argocd/commands/app.go:2745-2779 | cmd/argocd/commands/app.go:3049-3074 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) REDACTED:434— REDACTED:434-459 | REDACTED:486-511 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) cmd/argocd/commands/app.go:247— cmd/argocd/commands/app.go:247-276 | cmd/argocd/commands/applicationset.go:579-604 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) REDACTED:223— REDACTED:223-244 | REDACTED:247-284 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) util/notification/settings/settings.go:65— util/notification/settings/settings.go:65-86 | util/notification/settings/settings.go:88-110 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) pkg/apis/application/v1alpha1/types.go:3227— pkg/apis/application/v1alpha1/types.go:3227-3248 | pkg/apis/application/v1alpha1/types.go:3257-3281 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) util/cmp/stream.go:165— util/cmp/stream.go:165-189 | util/manifeststream/stream.go:73-103 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) commitserver/metrics/githandlers.go:10— commitserver/metrics/githandlers.go:10-34 | reposerver/metrics/githandlers.go:26-51 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) controller/sharding/sharding.go:141— controller/sharding/sharding.go:141-165 | controller/sharding/sharding.go:171-201 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×3
Edited copies of one member (3 members, 15+ corresponding lines) server/repository/repository.go:241— server/repository/repository.go:241-260 | server/repository/repository.go:262-281 | server/repository/repository.go:412-426 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) REDACTED:2830— REDACTED:2830-2844 | REDACTED:2846-2860 | REDACTED:2862-2881 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) util/argo/argo.go:190— util/argo/argo.go:190-204 | util/argo/argo.go:207-221 | util/argo/argo.go:224-238 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) REDACTED:817— REDACTED:817-834 | REDACTED:841-858 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) REDACTED:50— REDACTED:50-67 | REDACTED:69-89 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) pkg/apis/application/v1alpha1/types.go:1150— pkg/apis/application/v1alpha1/types.go:1150-1167 | pkg/apis/application/v1alpha1/types.go:4152-4174 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) cmd/util/app.go:612— cmd/util/app.go:612-627 | cmd/util/applicationset.go:32-47 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) util/db/repository.go:435— util/db/repository.go:435-450 | util/db/repository.go:452-467 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) applicationset/services/scm_provider/mock.go:11— applicationset/services/scm_provider/mock.go:11-26 | applicationset/services/scm_provider/mock.go:32-49 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×3
Edited copies of one member (3 members, 14+ corresponding lines) gitops-engine/pkg/health/health_pod.go:17— gitops-engine/pkg/health/health_pod.go:17-30 | gitops-engine/pkg/health/health_pvc.go:13-26 | gitops-engine/pkg/health/health_service.go:13-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:1528— REDACTED:1528-1550 | REDACTED:1557-1579 | REDACTED:1586-1599 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:2006— REDACTED:2006-2020 | REDACTED:2022-2035 | REDACTED:2037-2050 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) server/repocreds/repocreds.go:182— server/repocreds/repocreds.go:182-189 | server/repocreds/repocreds.go:192-199 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) applicationset/services/pull_request/github_app.go:12— applicationset/services/pull_request/github_app.go:12-25 | applicationset/services/scm_provider/github_app.go:12-19 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) cmd/argocd/commands/app.go:1692— cmd/argocd/commands/app.go:1692-1699 | cmd/argocd/commands/app.go:1701-1708 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) cmd/argocd/commands/admin/repo.go:99— cmd/argocd/commands/admin/repo.go:99-115 | cmd/argocd/commands/repo.go:121-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/repo.go:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) cmd/argocd/commands/app.go:888— cmd/argocd/commands/app.go:888-904 | cmd/argocd/commands/app.go:1001-1017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) REDACTED:979— REDACTED:979-995 | REDACTED:996-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 3) applicationset/services/scm_provider/bitbucket_server.go:140— applicationset/services/scm_provider/bitbucket_server.go:140-148 | applicationset/services/scm_provider/github.go:55-63 | applicationset/services/scm_provider/gitlab.go:71-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/services/scm_provider/bitbucket_server.go:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `applicationset/services/scm_provider/github.go:64` calls `GetName`, `GetCommit`, `GetSHA` and `applicationset/services/scm_provider/bitbucket_server.go:149` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) REDACTED:104— REDACTED:104-112 | REDACTED:175-183 | REDACTED:262-270 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:273` calls `GetInsecureSkipVerify` and `REDACTED:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) applicationset/generators/plugin.go:41— applicationset/generators/plugin.go:41-49 | applicationset/generators/pull_request.go:40-48 | applicationset/generators/scm_provider.go:94-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `applicationset/generators/pull_request.go:50` calls `GetContinueOnRepoNotFoundError` and `applicationset/generators/plugin.go:51` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) server/cluster/cluster.go:180— server/cluster/cluster.go:180-187 | server/cluster/cluster.go:337-344 | server/cluster/cluster.go:454-461 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/cluster/cluster.go:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) util/cert/cert.go:131— util/cert/cert.go:131-138 | util/cert/cert.go:197-204 | REDACTED:244-251 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 3) util/kustomize/kustomize.go:192— util/kustomize/kustomize.go:192-199 | util/kustomize/kustomize.go:213-220 | util/kustomize/kustomize.go:263-270 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/kustomize/kustomize.go:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC2 · Forms & labels· <Select> field component without a label · ×2
<Select> field component without a label ui/src/app/applications/components/application-create-panel/application-create-panel.tsx:56— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label ui/src/app/applications/components/application-sync-options/application-sync-options.tsx:57— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels· <Autocomplete> field component without a label · ×2
<Autocomplete> field component without a label ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:154— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Autocomplete> field component without a label ui/src/app/applications/components/filter/filter.tsx:179— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
Server.Get (cyclomatic 22) server/application/application.go:804— Server.Get has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.Get (cyclomatic 22) server/settings/settings.go:41— Server.Get has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HackComment util/oidc/provider.go:176— // HACK: if we failed token verification, it's possible the reason was because dex — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment test/e2e/repo_management_test.go:63— // Hack: First we need to create repo with valid credentials — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
commands.NewCommand (cognitive 20) cmd/argocd-application-controller/commands/argocd_application_controller.go:52— commands.NewCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3 (nesting depth added 5). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 111). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewCommand (cognitive 20) REDACTED:38— commands.NewCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 3). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 58). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) controller/appcontroller.go:503— controller/appcontroller.go:503-534 | controller/appcontroller.go:560-690 | controller/appcontroller.go:692-798 | REDACTED:229-461 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) util/cert/cert.go:126— util/cert/cert.go:126-140 | util/cert/cert.go:192-206 | REDACTED:407-519 | REDACTED:234-255 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (64 corresponding lines) · ×2
Edited copy of a member (64 corresponding lines) REDACTED:269— REDACTED:269-338 | REDACTED:552-615 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (64 corresponding lines) cmd/argocd/commands/repo.go:357— cmd/argocd/commands/repo.go:357-420 | cmd/argocd/commands/repo.go:423-492 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×2
Edited copy of a member (51 corresponding lines) cmd/argocd/commands/project.go:277— cmd/argocd/commands/project.go:277-327 | cmd/argocd/commands/project.go:1165-1234 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (51 corresponding lines) REDACTED:93— REDACTED:93-150 | REDACTED:257-307 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×2
Edited copy of a member (43 corresponding lines) server/repository/repository.go:436— server/repository/repository.go:436-492 | server/repository/repository.go:495-537 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (43 corresponding lines) util/cmp/stream.go:194— util/cmp/stream.go:194-236 | util/manifeststream/stream.go:201-253 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) hack/gen-resources/cmd/commands/cmd.go:50— hack/gen-resources/cmd/commands/cmd.go:50-93 | hack/gen-resources/cmd/commands/cmd.go:95-131 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) cmd/argocd/commands/admin/project.go:42— cmd/argocd/commands/admin/project.go:42-84 | cmd/argocd/commands/project.go:106-142 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) REDACTED:738— REDACTED:738-772 | REDACTED:774-808 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) applicationset/generators/matrix.go:272— applicationset/generators/matrix.go:272-306 | applicationset/generators/merge.go:180-214 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×2
Edited copies of one member (3 members, 27+ corresponding lines) server/application/application.go:1709— server/application/application.go:1709-1738 | server/application/application.go:1741-1769 | server/application/application.go:1771-1797 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 27+ corresponding lines) cmpserver/plugin/plugin.go:219— cmpserver/plugin/plugin.go:219-253 | cmpserver/plugin/plugin.go:309-335 | cmpserver/plugin/plugin.go:395-424 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×2
Edited copy of a member (36 corresponding lines) REDACTED:54— REDACTED:54-89 | applicationset/services/pull_request/github.go:59-98 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) server/application/application.go:142— server/application/application.go:142-177 | server/applicationset/applicationset.go:195-235 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) applicationset/services/pull_request/utils.go:12— applicationset/services/pull_request/utils.go:12-38 | applicationset/services/scm_provider/utils.go:13-50 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) server/application/application.go:1261— server/application/application.go:1261-1288 | server/applicationset/applicationset.go:143-169 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) cmd/argocd/commands/tree.go:106— cmd/argocd/commands/tree.go:106-124 | cmd/argocd/commands/tree.go:126-145 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) util/gpgsign/gpgsign.go:235— util/gpgsign/gpgsign.go:235-253 | util/gpgsign/gpgsign.go:284-304 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) util/argo/argo.go:98— util/argo/argo.go:98-114 | util/argo/argo.go:117-133 | util/argo/argo.go:171-187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) util/argo/audit_logger.go:117— util/argo/audit_logger.go:117-136 | util/argo/audit_logger.go:138-154 | util/argo/audit_logger.go:178-194 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) server/notification/notification.go:24— server/notification/notification.go:24-36 | server/notification/notification.go:39-52 | server/notification/notification.go:55-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) cmd/argocd/commands/project_source_integrity.go:56— cmd/argocd/commands/project_source_integrity.go:56-68 | cmd/argocd/commands/project_source_integrity.go:71-83 | cmd/argocd/commands/repocreds.go:28-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) gitops-engine/pkg/health/health_daemonset.go:13— gitops-engine/pkg/health/health_daemonset.go:13-26 | gitops-engine/pkg/health/health_deployment.go:13-26 | gitops-engine/pkg/health/health_replicaset.go:14-27 | gitops-engine/pkg/health/health_statefulset.go:13-26 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) cmd/argocd-k8s-auth/commands/argocd_k8s_auth.go:9— cmd/argocd-k8s-auth/commands/argocd_k8s_auth.go:9-25 | cmd/argocd/commands/admin/app.go:51-74 | cmd/argocd/commands/admin/project.go:26-39 | cmd/argocd/commands/admin/settings.go:326-340 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (30 lines × 2) applicationset/generators/matrix.go:277— applicationset/generators/matrix.go:277-306 | applicationset/generators/merge.go:185-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/generators/matrix.go:277` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (30 lines × 2) applicationset/generators/git.go:60— applicationset/generators/git.go:60-89 | applicationset/generators/oci.go:58-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `applicationset/generators/oci.go:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `applicationset/generators/git.go:96` calls `Contains`, `WithField`, `Infof` and `applicationset/generators/oci.go:93` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) gitops-engine/pkg/utils/kube/resource_ops.go:549— gitops-engine/pkg/utils/kube/resource_ops.go:549-569 | gitops-engine/pkg/utils/kube/resource_ops.go:606-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) util/kustomize/gitwrapper.go:109— util/kustomize/gitwrapper.go:109-129 | util/kustomize/helmwrapper.go:112-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `util/kustomize/gitwrapper.go:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–16 lines × 2) cmd/argocd/commands/project_source_integrity.go:274— cmd/argocd/commands/project_source_integrity.go:274-288 | cmd/argocd/commands/project_source_integrity.go:379-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_source_integrity.go:274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15–16 lines × 2) cmd/argocd/commands/admin/cluster.go:231— cmd/argocd/commands/admin/cluster.go:231-246 | cmd/argocd/commands/admin/cluster.go:525-539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13–14 lines × 2) cmd/argocd/commands/app.go:3195— cmd/argocd/commands/app.go:3195-3207 | cmd/argocd/commands/app.go:3342-3355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:3195` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13–14 lines × 2) cmd/argocd/commands/applicationset.go:106— cmd/argocd/commands/applicationset.go:106-118 | cmd/argocd/commands/applicationset.go:214-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/applicationset.go:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cmd/argocd/commands/applicationset.go:120` calls `printHelmParams`, `GetSource` and `cmd/argocd/commands/applicationset.go:228` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–13 lines × 2) cmd/argocd/commands/app.go:3095— cmd/argocd/commands/app.go:3095-3107 | cmd/argocd/commands/project.go:1132-1142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:3095` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) util/webhook/registry.go:80— util/webhook/registry.go:80-90 | REDACTED:330-342 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `util/webhook/registry.go:80` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) cmd/argocd/commands/project.go:339— cmd/argocd/commands/project.go:339-349 | cmd/argocd/commands/project.go:387-397 | cmd/argocd/commands/project.go:437-447 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 3) gitops-engine/pkg/utils/kube/resource_ops.go:515— gitops-engine/pkg/utils/kube/resource_ops.go:515-525 | gitops-engine/pkg/utils/kube/resource_ops.go:550-560 | gitops-engine/pkg/utils/kube/resource_ops.go:607-617 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/utils/kube/resource_ops.go:515` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) REDACTED:414— REDACTED:414-424 | util/hydrator/template.go:38-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:414` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–11 lines × 2) util/kustomize/kustomize.go:190— util/kustomize/kustomize.go:190-199 | util/kustomize/kustomize.go:210-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/kustomize/kustomize.go:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) gitops-engine/pkg/cache/cluster.go:1378— gitops-engine/pkg/cache/cluster.go:1378-1385 | gitops-engine/pkg/cache/cluster.go:1393-1399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/cache/cluster.go:1378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–8 lines × 2) hack/gen-resources/cmd/commands/cmd.go:62— hack/gen-resources/cmd/commands/cmd.go:62-69 | hack/gen-resources/cmd/commands/cmd.go:101-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 4) cmd/argocd/commands/app.go:389— cmd/argocd/commands/app.go:389-396 | cmd/argocd/commands/app.go:583-589 | cmd/argocd/commands/app.go:3197-3205 | cmd/argocd/commands/app.go:3345-3353 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 4) util/cert/cert.go:131— util/cert/cert.go:131-137 | util/cert/cert.go:197-203 | REDACTED:416-422 | REDACTED:244-250 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `util/cert/cert.go:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Low cohesion: Application (LCOM4 10) pkg/apis/application/v1alpha1/types.go:70— Application's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MockKubectlCmd (LCOM4 6) gitops-engine/pkg/utils/kube/kubetest/mock.go:28— MockKubectlCmd's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
X2 · Cancellation propagation· Function without context.Context · ×2
Function without context.Context: ReadRemoteFile util/config/reader.go:73— `ReadRemoteFile` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: GetContents applicationset/services/scm_provider/bitbucket_cloud.go:26— `GetContents` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark ui/src/app/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
Low contrast colour pair in CSS (2.6:1) ui/src/app/settings/components/project-role-jwt-tokens/project-role-jwt-tokens.scss:19— `.project-role-jwt-tokens__expired-token` sets color: white on background-color: #8FA4B1 — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Stateful package: commands REDACTED:345— Package `commands` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (handledRequests, tokenString, refreshToken; e.g. `handledRequests` in `oauth2Login` at line 345). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
appStateManager.CompareAppState (cyclomatic 94) REDACTED:682— appStateManager.CompareAppState has cyclomatic complexity 94 (threshold 15). Of this number, 93 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewApplicationSyncCommand (cyclomatic 69) cmd/argocd/commands/app.go:1711— commands.NewApplicationSyncCommand has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 1 of the 69 points is its own statement and the rest belongs to one function literal inside it that branches (line 1775). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.NewImportCommand (cyclomatic 65) cmd/argocd/commands/admin/backup.go:160— admin.NewImportCommand has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 1 of the 65 points is its own statement and the rest belongs to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
kustomize.Build (cyclomatic 62) util/kustomize/kustomize.go:124— kustomize.Build has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
syncContext.Sync (cyclomatic 60) gitops-engine/pkg/sync/sync_context.go:493— syncContext.Sync has cyclomatic complexity 60 (threshold 15). Of this number, 44 points are the body's own statements and 16 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
util.ConstructSource (cyclomatic 56) cmd/util/app.go:706— util.ConstructSource has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to one function literal inside it that branches (line 708). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
appStateManager.SyncAppState (cyclomatic 52) controller/sync.go:160— appStateManager.SyncAppState has cyclomatic complexity 52 (threshold 15). Of this number, 45 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.ServeHTTP (cyclomatic 52) REDACTED:93— Handler.ServeHTTP has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationSetReconciler.Reconcile (cyclomatic 51) REDACTED:119— ApplicationSetReconciler.Reconcile has cyclomatic complexity 51 (threshold 15). Of this number, 49 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
util.SetAppSpecOptions (cyclomatic 49) cmd/util/app.go:188— util.SetAppSpecOptions has cyclomatic complexity 49 (threshold 15). Of this number, 25 points are the body's own statements and 24 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.ServerSideDiff (cyclomatic 48) server/application/application.go:3088— Server.ServerSideDiff has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
syncContext.getSyncTasks (cyclomatic 47) gitops-engine/pkg/sync/sync_context.go:989— syncContext.getSyncTasks has cyclomatic complexity 47 (threshold 15). Of this number, 43 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cache.populatePodInfo (cyclomatic 46) controller/cache/info.go:616— cache.populatePodInfo has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
apiclient.NewClientWithContext (cyclomatic 45) pkg/apiclient/apiclient.go:223— apiclient.NewClientWithContext has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.unset (cyclomatic 44) cmd/argocd/commands/app.go:1067— commands.unset has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.finalizeApplicationDeletion (cyclomatic 44) controller/appcontroller.go:1367— ApplicationController.finalizeApplicationDeletion has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.processRequestedAppOperation (cyclomatic 44) controller/appcontroller.go:1603— ApplicationController.processRequestedAppOperation has cyclomatic complexity 44 (threshold 15). Of this number, 29 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cyclomatic 42) cmd/argocd/commands/project_source_integrity.go:350— commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 1 of the 42 points is its own statement and the rest belongs to one function literal inside it that branches (line 379). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Service.runRepoOperation (cyclomatic 42) REDACTED:354— Service.runRepoOperation has cyclomatic complexity 42 (threshold 15). Of this number, 37 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.processAppRefreshQueueItem (cyclomatic 41) controller/appcontroller.go:2139— ApplicationController.processAppRefreshQueueItem has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dex.GenerateDexConfigYAML (cyclomatic 41) util/dex/config.go:20— dex.GenerateDexConfigYAML has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppProject.ValidateProject (cyclomatic 39) pkg/apis/application/v1alpha1/app_project_types.go:189— AppProject.ValidateProject has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db.CreateRepoCertificate (cyclomatic 39) util/db/certificate.go:145— db.CreateRepoCertificate has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Render.deeplyReplaceWithFilter (cyclomatic 38) REDACTED:93— Render.deeplyReplaceWithFilter has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.waitOnApplicationStatus (cyclomatic 38) cmd/argocd/commands/app.go:2445— commands.waitOnApplicationStatus has cyclomatic complexity 38 (threshold 15). Of this number, 25 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cache.populateIngressInfo (cyclomatic 38) controller/cache/info.go:149— cache.populateIngressInfo has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebhookHandler.shouldRefreshMatrixGenerator (cyclomatic 37) applicationset/webhook/webhook.go:375— WebhookHandler.shouldRefreshMatrixGenerator has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
appStateManager.GetRepoObjs (cyclomatic 37) REDACTED:229— appStateManager.GetRepoObjs has cyclomatic complexity 37 (threshold 15). Of this number, 26 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SCMProviderGenerator.GenerateParams (cyclomatic 35) applicationset/generators/scm_provider.go:146— SCMProviderGenerator.GenerateParams has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Service.runManifestGenAsync (cyclomatic 34) REDACTED:871— Service.runManifestGenAsync has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.PodLogs (cyclomatic 34) server/application/application.go:1900— Server.PodLogs has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.GetManifests (cyclomatic 33) server/application/application.go:505— Server.GetManifests has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 519). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ArgoCDWebhookHandler.HandleEvent (cyclomatic 33) REDACTED:279— ArgoCDWebhookHandler.HandleEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
controller.setApplicationHealth (cyclomatic 32) controller/health.go:25— controller.setApplicationHealth has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.hideSecretData (cyclomatic 32) controller/appcontroller.go:800— ApplicationController.hideSecretData has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.executeHooks (cyclomatic 32) REDACTED:99— ApplicationController.executeHooks has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
repository.helmTemplate (cyclomatic 32) REDACTED:1321— repository.helmTemplate has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.Sync (cyclomatic 32) server/application/application.go:2144— Server.Sync has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
commands.NewApplicationDiffCommand (cyclomatic 31) cmd/argocd/commands/app_diff.go:624— commands.NewApplicationDiffCommand has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 649). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
health.getCorev1PodHealth (cyclomatic 30) gitops-engine/pkg/health/health_pod.go:32— health.getCorev1PodHealth has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.autoSync (cyclomatic 30) controller/appcontroller.go:2982— ApplicationController.autoSync has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Service.UpdateRevisionForPaths (cyclomatic 30) REDACTED:3582— Service.UpdateRevisionForPaths has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
terminalHandler.ServeHTTP (cyclomatic 30) server/application/terminal.go:110— terminalHandler.ServeHTTP has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Manager.UpdateApplicationSetApplicationStatus (cyclomatic 29) applicationset/progressivesync/progressive_sync.go:423— Manager.UpdateApplicationSetApplicationStatus has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.getAppHosts (cyclomatic 29) controller/appcontroller.go:692— ApplicationController.getAppHosts has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ApplicationController.persistAppStatus (cyclomatic 29) controller/appcontroller.go:2847— ApplicationController.persistAppStatus has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cache.populateGatewayAPIRouteInfo (cyclomatic 29) controller/cache/info.go:474— cache.populateGatewayAPIRouteInfo has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
application.mergeLogStreams (cyclomatic 29) server/application/logs.go:69— application.mergeLogStreams has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 107, 81, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Server.Update (cyclomatic 29) server/project/project.go:368— Server.Update has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
store.GetManagedLiveObjs (cyclomatic 28) gitops-engine/pkg/cache/cluster.go:1309— store.GetManagedLiveObjs has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
syncContext.runTasks (cyclomatic 28) gitops-engine/pkg/sync/sync_context.go:1641— syncContext.runTasks has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.applicationEventHandlerFuncs (cyclomatic 28) controller/appcontroller.go:3415— ApplicationController.applicationEventHandlerFuncs has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 3431, 3479, 3417). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
liveStateCache.getCluster (cyclomatic 27) controller/cache/cache.go:504— liveStateCache.getCluster has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 609, 567). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SyncWindows.Matches (cyclomatic 27) pkg/apis/application/v1alpha1/types.go:3380— SyncWindows.Matches has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Service.populateHelmAppDetails (cyclomatic 27) REDACTED:2632— Service.populateHelmAppDetails has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.printAppSummaryTable (cyclomatic 26) cmd/argocd/commands/app.go:655— commands.printAppSummaryTable has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
headless.MaybeStartLocalServer (cyclomatic 26) cmd/argocd/commands/headless/headless.go:180— headless.MaybeStartLocalServer has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Service.handleCommitRequest (cyclomatic 26) commitserver/commit/commit.go:105— Service.handleCommitRequest has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cache.generateGatewayURLs (cyclomatic 26) controller/cache/info.go:366— cache.generateGatewayURLs has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
application.init (cyclomatic 26) pkg/apiclient/application/forwarder_overwrite.go:285— application.init has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 337, 286, 330). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
repository.GenerateManifests (cyclomatic 26) REDACTED:1776— repository.GenerateManifests has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArgoCDServer.Run (cyclomatic 26) REDACTED:598— ArgoCDServer.Run has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
files.untar (cyclomatic 26) REDACTED:100— files.untar has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationSetReconciler.setApplicationSetStatusCondition (cyclomatic 25) REDACTED:486— ApplicationSetReconciler.setApplicationSetStatusCondition has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.getResourceTree (cyclomatic 25) controller/appcontroller.go:560— ApplicationController.getResourceTree has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cache.populateNodeInfo (cyclomatic 25) controller/cache/info.go:28— cache.populateNodeInfo has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
diff.HideSecretData (cyclomatic 24) REDACTED:938— diff.HideSecretData has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DuckTypeGenerator.GenerateParams (cyclomatic 24) REDACTED:61— DuckTypeGenerator.GenerateParams has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PullRequestGenerator.selectServiceProvider (cyclomatic 24) applicationset/generators/pull_request.go:130— PullRequestGenerator.selectServiceProvider has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.NewCommand (cyclomatic 24) REDACTED:57— command.NewCommand has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 101). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewLoginCommand (cyclomatic 24) REDACTED:43— commands.NewLoginCommand has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 78). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Server.GetManifestsWithFiles (cyclomatic 24) server/application/application.go:671— Server.GetManifestsWithFiles has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArgoCDServer.watchSettings (cyclomatic 24) REDACTED:835— ArgoCDServer.watchSettings has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tgz.tgzFile (cyclomatic 24) REDACTED:238— tgz.tgzFile has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
syncContext.applyObject (cyclomatic 23) gitops-engine/pkg/sync/sync_context.go:1431— syncContext.applyObject has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.resolveSourceRevisions (cyclomatic 23) server/application/application.go:2276— Server.resolveSourceRevisions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
exec.RunCommandExt (cyclomatic 23) util/exec/exec.go:184— exec.RunCommandExt has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nativeHelmChart.ExtractChart (cyclomatic 23) REDACTED:197— nativeHelmChart.ExtractChart has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
health.GetHealthCheckFunc (cyclomatic 22) gitops-engine/pkg/health/health.go:141— health.GetHealthCheckFunc has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ApplicationSetReconciler.createOrUpdateInCluster (cyclomatic 22) REDACTED:728— ApplicationSetReconciler.createOrUpdateInCluster has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 746). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationGetCommand (cyclomatic 22) cmd/argocd/commands/app.go:335— commands.NewApplicationGetCommand has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 385). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationManifestsCommand (cyclomatic 22) cmd/argocd/commands/app.go:2888— commands.NewApplicationManifestsCommand has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 2915). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
util.setHelmOpt (cyclomatic 22) cmd/util/app.go:453— util.setHelmOpt has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AppProject.isDestinationMatched (cyclomatic 22) pkg/apis/application/v1alpha1/app_project_types.go:507— AppProject.isDestinationMatched has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cluster.rawRestConfig (cyclomatic 22) pkg/apis/application/v1alpha1/types.go:4394— Cluster.rawRestConfig has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
repository.getResolvedValueFiles (cyclomatic 22) REDACTED:1497— repository.getResolvedValueFiles has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.validateAndNormalizeApp (cyclomatic 22) server/application/application.go:1361— Server.validateAndNormalizeApp has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionManager.Parse (cyclomatic 22) REDACTED:259— SessionManager.Parse has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.parseAccounts (cyclomatic 22) util/settings/accounts.go:226— settings.parseAccounts has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Manager.UpdateApplicationSetApplicationStatusProgress (cyclomatic 21) applicationset/progressivesync/progressive_sync.go:807— Manager.UpdateApplicationSetApplicationStatusProgress has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewCommand (cyclomatic 21) cmd/argocd-server/commands/argocd_server.go:57— commands.NewCommand has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 121). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Server.RunResourceActionV2 (cyclomatic 21) server/application/application.go:2758— Server.RunResourceActionV2 has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db.RemoveRepoCertificates (cyclomatic 21) util/db/certificate.go:329— db.RemoveRepoCertificates has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClientApp.HandleCallback (cyclomatic 21) REDACTED:529— ClientApp.HandleCallback has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClientApp.GetUserInfo (cyclomatic 21) REDACTED:983— ClientApp.GetUserInfo has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sourceintegrity.SyncKeyRingFromDirectory (cyclomatic 21) util/sourceintegrity/gpg.go:574— sourceintegrity.SyncKeyRingFromDirectory has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
legacyEngine.sync (cyclomatic 20) gitops-engine/pkg/cache/legacy_engine.go:75— legacyEngine.sync has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
progressivesync.buildAppDependencyList (cyclomatic 20) applicationset/progressivesync/progressive_sync.go:319— progressivesync.buildAppDependencyList has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webhook.shouldRefreshPRGenerator (cyclomatic 20) applicationset/webhook/webhook.go:311— webhook.shouldRefreshPRGenerator has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewCommand (cyclomatic 20) REDACTED:38— commands.NewCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 58). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewClusterAddCommand (cyclomatic 20) cmd/argocd/commands/cluster.go:86— commands.NewClusterAddCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewRepoAddCommand (cyclomatic 20) cmd/argocd/commands/repo.go:58— commands.NewRepoAddCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationController.cleanupHooks (cyclomatic 20) REDACTED:266— ApplicationController.cleanupHooks has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Hydrator.hydrate (cyclomatic 20) controller/hydrator/hydrator.go:430— Hydrator.hydrate has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
appStateManager.evaluateRevisionChanges (cyclomatic 20) REDACTED:465— appStateManager.evaluateRevisionChanges has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Repository.CopyCredentialsFrom (cyclomatic 20) pkg/apis/application/v1alpha1/repository_types.go:211— Repository.CopyCredentialsFrom has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.Create (cyclomatic 20) server/application/application.go:362— Server.Create has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
kube.SetAppInstanceLabel (cyclomatic 20) util/kube/kube.go:23— kube.SetAppInstanceLabel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.NewExportCommand (cyclomatic 19) cmd/argocd/commands/admin/backup.go:33— admin.NewExportCommand has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.loadClusters (cyclomatic 19) cmd/argocd/commands/admin/cluster.go:81— admin.loadClusters has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
util.setKustomizeOpt (cyclomatic 19) cmd/util/app.go:362— util.setKustomizeOpt has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
controller.NewApplicationController (cyclomatic 19) controller/appcontroller.go:171— controller.NewApplicationController has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
appCollector.collectApps (cyclomatic 19) REDACTED:489— appCollector.collectApps has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reposerver.StartGPGWatcher (cyclomatic 19) reposerver/gpgwatcher.go:18— reposerver.StartGPGWatcher has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 32, 25). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
repository.getHelmRepos (cyclomatic 19) REDACTED:1171— repository.getHelmRepos has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Service.GenerateManifest (cyclomatic 19) REDACTED:667— Service.GenerateManifest has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
server.bug21955WorkaroundInterceptor (cyclomatic 19) REDACTED:1823— server.bug21955WorkaroundInterceptor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
git.DiscoverGitHubAppInstallationID (cyclomatic 19) REDACTED:770— git.DiscoverGitHubAppInstallationID has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nativeHelmChart.GetTags (cyclomatic 19) REDACTED:505— nativeHelmChart.GetTags has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsManager.InitializeSettings (cyclomatic 19) REDACTED:2604— SettingsManager.InitializeSettings has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
kubectlResourceOperations.newApplyOptions (cyclomatic 18) gitops-engine/pkg/utils/kube/resource_ops.go:438— kubectlResourceOperations.newApplyOptions has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Manager.PerformReverseDeletion (cyclomatic 18) applicationset/progressivesync/progressive_sync.go:170— Manager.PerformReverseDeletion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewCommand (cyclomatic 18) REDACTED:54— commands.NewCommand has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.printResources (cyclomatic 18) cmd/argocd/commands/app_resources.go:484— commands.printResources has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.NewRBACCanCommand (cyclomatic 18) cmd/argocd/commands/admin/settings_rbac.go:128— admin.NewRBACCanCommand has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 166). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationController.handleObjectUpdated (cyclomatic 18) controller/appcontroller.go:424— ApplicationController.handleObjectUpdated has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
application.streamApplicationListJSON (cyclomatic 18) pkg/apiclient/application/forwarder_overwrite.go:167— application.streamApplicationListJSON has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SyncWindows.canSyncFrom (cyclomatic 18) pkg/apis/application/v1alpha1/types.go:3601— SyncWindows.canSyncFrom has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
repository.getPotentiallyValidManifestFile (cyclomatic 18) REDACTED:2178— repository.getPotentiallyValidManifestFile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
application.isTheSelectedOne (cyclomatic 18) server/application/application.go:2089— application.isTheSelectedOne has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Server.Create (cyclomatic 18) server/applicationset/applicationset.go:287— Server.Create has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Server.RotateAuth (cyclomatic 18) server/cluster/cluster.go:386— Server.RotateAuth has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.ServeHTTP (cyclomatic 18) REDACTED:51— Handler.ServeHTTP has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
db.ListRepoCertificates (cyclomatic 18) util/db/certificate.go:57— db.ListRepoCertificates has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nativeGitClient.resolveRevisionWithOptions (cyclomatic 18) REDACTED:1285— nativeGitClient.resolveRevisionWithOptions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nativeOCIClient.extract (cyclomatic 18) REDACTED:261— nativeOCIClient.extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
compressedLayerExtracterStore.Push (cyclomatic 18) REDACTED:626— compressedLayerExtracterStore.Push has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sourceintegrity.parseGitCommitVerification (cyclomatic 18) util/sourceintegrity/gpg.go:767— sourceintegrity.parseGitCommitVerification has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tls.generate (cyclomatic 18) REDACTED:289— tls.generate has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
syncContext.terminateHooksPreemptively (cyclomatic 17) gitops-engine/pkg/sync/sync_context.go:814— syncContext.terminateHooksPreemptively has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationSetReconciler.setAppSetApplicationStatus (cyclomatic 17) REDACTED:1165— ApplicationSetReconciler.setAppSetApplicationStatus has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MatrixGenerator.GenerateParams (cyclomatic 17) applicationset/generators/matrix.go:40— MatrixGenerator.GenerateParams has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.oauth2Login (cyclomatic 17) REDACTED:292— commands.oauth2Login has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 337, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
commands.NewLogoutCommand (cyclomatic 17) REDACTED:25— commands.NewLogoutCommand has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewRepoCredsAddCommand (cyclomatic 17) cmd/argocd/commands/repocreds.go:55— commands.NewRepoCredsAddCommand has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 99). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.updateProjects (cyclomatic 17) cmd/argocd/commands/admin/project.go:201— admin.updateProjects has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
controller.isKnownOrphanedResourceExclusion (cyclomatic 17) controller/appcontroller.go:537— controller.isKnownOrphanedResourceExclusion has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationController.persistOperationStateFallback (cyclomatic 17) controller/appcontroller.go:1894— ApplicationController.persistOperationStateFallback has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
client.startGRPCProxy (cyclomatic 17) pkg/apiclient/grpcproxy.go:112— client.startGRPCProxy has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 144). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationSetStatus.SetConditions (cyclomatic 17) pkg/apis/application/v1alpha1/applicationset_types.go:1050— ApplicationSetStatus.SetConditions has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Repository.CopyCredentialsFromRepo (cyclomatic 17) pkg/apis/application/v1alpha1/repository_types.go:157— Repository.CopyCredentialsFromRepo has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.UpdatePassword (cyclomatic 17) server/account/account.go:42— Server.UpdatePassword has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
extension.validateConfigs (cyclomatic 17) server/extension/extension.go:476— extension.validateConfigs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.GetAppDetails (cyclomatic 17) server/repository/repository.go:333— Server.GetAppDetails has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArgoCDServer.getClaims (cyclomatic 17) REDACTED:1685— ArgoCDServer.getClaims has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
argo.ValidateRepo (cyclomatic 17) util/argo/argo.go:391— argo.ValidateRepo has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SSHCreds.Environ (cyclomatic 17) REDACTED:407— SSHCreds.Environ has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
legacyConfig.merge (cyclomatic 17) util/notification/settings/legacy.go:76— legacyConfig.merge has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsManager.appendResourceOverridesFromSplitKeys (cyclomatic 17) REDACTED:1226— SettingsManager.appendResourceOverridesFromSplitKeys has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tls.CreateServerTLSConfig (cyclomatic 17) REDACTED:482— tls.CreateServerTLSConfig has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trace.collectorTLSCredentials (cyclomatic 17) REDACTED:88— trace.collectorTLSCredentials has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
legacyEngine.watchEvents (cyclomatic 16) gitops-engine/pkg/cache/legacy_engine.go:349— legacyEngine.watchEvents has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 351). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
diff.NormalizeSecret (cyclomatic 16) REDACTED:782— diff.NormalizeSecret has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Requirement.Matches (cyclomatic 16) applicationset/utils/selector.go:214— Requirement.Matches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
commands.NewCommand (cyclomatic 16) cmd/argocd-application-controller/commands/argocd_application_controller.go:52— commands.NewCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 111). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationDeleteCommand (cyclomatic 16) cmd/argocd/commands/app.go:1266— commands.NewApplicationDeleteCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 1290). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.newServerSideDiffStrategy (cyclomatic 16) cmd/argocd/commands/app_diff.go:214— commands.newServerSideDiffStrategy has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 222). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationSetCreateCommand (cyclomatic 16) cmd/argocd/commands/applicationset.go:134— commands.NewApplicationSetCreateCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 153). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.printProject (cyclomatic 16) cmd/argocd/commands/project.go:980— commands.printProject has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cyclomatic 16) cmd/argocd/commands/project_source_integrity.go:168— commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Server.Delete (cyclomatic 16) server/application/application.go:1197— Server.Delete has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArgoCDServer.newStaticAssetsHandler (cyclomatic 16) REDACTED:1568— ArgoCDServer.newStaticAssetsHandler has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 1569). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
argo.ValidatePermissions (cyclomatic 16) util/argo/argo.go:744— argo.ValidatePermissions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
git.newAuth (cyclomatic 16) REDACTED:509— git.newAuth has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
kube.PortForward (cyclomatic 16) util/kube/portforwarder.go:42— kube.PortForward has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sourceintegrity.GetInstalledPGPKeys (cyclomatic 16) util/sourceintegrity/gpg.go:441— sourceintegrity.GetInstalledPGPKeys has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webhook.ParsePushEvent (cyclomatic 16) util/webhook/push.go:26— webhook.ParsePushEvent has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
webhook.NewParsers (cyclomatic 16) util/webhook/scm.go:54— webhook.NewParsers has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
No assertions: renders without crashing ui/src/app/shared/components/form/__tests__/compat.test.tsx:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
FixmeComment repeated across 18 files util/workloadidentity/workloadidentity.go:8— The identical FixmeComment appears in 18 files (37 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 37 independent debts. Fix the systemic cause once rather than file-by-file. Text: "//nolint:revive //FIXME(var-naming)". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
appStateManager.CompareAppState (cognitive 164) REDACTED:682— appStateManager.CompareAppState has cognitive complexity 164 (threshold 15). Drivers by points: if/else 67 (123 pts), loops 11 (21 pts), boolean chains 18, match/switch 1 (2 pts) (nesting depth added 67). Of this number, 162 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kustomize.Build (cognitive 163) util/kustomize/kustomize.go:124— kustomize.Build has cognitive complexity 163 (threshold 15). Drivers by points: if/else 52 (129 pts), loops 8 (27 pts), boolean chains 3, match/switch 1 (3 pts), jumps 1 (nesting depth added 98). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
admin.NewImportCommand (cognitive 135) cmd/argocd/commands/admin/backup.go:160— admin.NewImportCommand has cognitive complexity 135 (threshold 15). Drivers by points: if/else 45 (112 pts), boolean chains 8, loops 7 (8 pts), match/switch 3 (7 pts) (nesting depth added 72). None of this is in the body itself: all 135 points belong to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Service.runManifestGenAsync (cognitive 129) REDACTED:871— Service.runManifestGenAsync has cognitive complexity 129 (threshold 15). Drivers by points: if/else 27 (109 pts), loops 4 (16 pts), boolean chains 4 (nesting depth added 94). Of this number, 123 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
commands.NewApplicationSyncCommand (cognitive 125) cmd/argocd/commands/app.go:1711— commands.NewApplicationSyncCommand has cognitive complexity 125 (threshold 15). Drivers by points: if/else 43 (95 pts), boolean chains 17, loops 6 (13 pts) (nesting depth added 59). None of this is in the body itself: all 125 points belong to one function literal inside it that branches (line 1775). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
cache.populateIngressInfo (cognitive 107) controller/cache/info.go:149— cache.populateIngressInfo has cognitive complexity 107 (threshold 15). Drivers by points: if/else 22 (81 pts), loops 6 (17 pts), boolean chains 9 (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
syncContext.Sync (cognitive 99) gitops-engine/pkg/sync/sync_context.go:493— syncContext.Sync has cognitive complexity 99 (threshold 15). Drivers by points: if/else 36 (71 pts), boolean chains 16, loops 4 (6 pts), match/switch 2 (6 pts) (nesting depth added 41). Of this number, 87 points are the body's own statements and 12 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db.CreateRepoCertificate (cognitive 97) util/db/certificate.go:145— db.CreateRepoCertificate has cognitive complexity 97 (threshold 15). Drivers by points: if/else 27 (76 pts), loops 5 (14 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.hideSecretData (cognitive 96) controller/appcontroller.go:800— ApplicationController.hideSecretData has cognitive complexity 96 (threshold 15). Drivers by points: if/else 26 (91 pts), boolean chains 4, loops 1 (nesting depth added 65). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
dex.GenerateDexConfigYAML (cognitive 95) util/dex/config.go:20— dex.GenerateDexConfigYAML has cognitive complexity 95 (threshold 15). Drivers by points: if/else 43 (86 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.ServerSideDiff (cognitive 89) server/application/application.go:3088— Server.ServerSideDiff has cognitive complexity 89 (threshold 15). Drivers by points: if/else 32 (73 pts), boolean chains 8, loops 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.Reconcile (cognitive 88) REDACTED:119— ApplicationSetReconciler.Reconcile has cognitive complexity 88 (threshold 15). Drivers by points: if/else 47 (81 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 36). Of this number, 85 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncContext.getSyncTasks (cognitive 85) gitops-engine/pkg/sync/sync_context.go:989— syncContext.getSyncTasks has cognitive complexity 85 (threshold 15). Drivers by points: if/else 26 (54 pts), loops 15 (21 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 36). Of this number, 80 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Render.deeplyReplaceWithFilter (cognitive 84) REDACTED:93— Render.deeplyReplaceWithFilter has cognitive complexity 84 (threshold 15). Drivers by points: if/else 30 (75 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 48). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Handler.ServeHTTP (cognitive 82) REDACTED:93— Handler.ServeHTTP has cognitive complexity 82 (threshold 15). Drivers by points: if/else 37 (63 pts), boolean chains 14, loops 2 (5 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.unset (cognitive 80) cmd/argocd/commands/app.go:1067— commands.unset has cognitive complexity 80 (threshold 15). Drivers by points: if/else 21 (48 pts), loops 9 (22 pts), boolean chains 10 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.finalizeApplicationDeletion (cognitive 75) controller/appcontroller.go:1367— ApplicationController.finalizeApplicationDeletion has cognitive complexity 75 (threshold 15). Drivers by points: if/else 38 (69 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.processRequestedAppOperation (cognitive 75) controller/appcontroller.go:1603— ApplicationController.processRequestedAppOperation has cognitive complexity 75 (threshold 15). Drivers by points: if/else 34 (61 pts), boolean chains 10, match/switch 2 (3 pts), loops 1 (nesting depth added 28). Of this number, 53 points are the body's own statements and 22 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgoCDWebhookHandler.HandleEvent (cognitive 75) REDACTED:279— ArgoCDWebhookHandler.HandleEvent has cognitive complexity 75 (threshold 15). Drivers by points: if/else 22 (62 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AppProject.ValidateProject (cognitive 74) pkg/apis/application/v1alpha1/app_project_types.go:189— AppProject.ValidateProject has cognitive complexity 74 (threshold 15). Drivers by points: if/else 26 (60 pts), loops 8 (11 pts), boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.SetAppSpecOptions (cognitive 72) cmd/util/app.go:188— util.SetAppSpecOptions has cognitive complexity 72 (threshold 15). Drivers by points: if/else 31 (60 pts), match/switch 4 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 34). Of this number, 37 points are the body's own statements and 35 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Service.runRepoOperation (cognitive 72) REDACTED:354— Service.runRepoOperation has cognitive complexity 72 (threshold 15). Drivers by points: if/else 39 (68 pts), boolean chains 3, match/switch 1 (nesting depth added 29). Of this number, 65 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apiclient.NewClientWithContext (cognitive 67) pkg/apiclient/apiclient.go:223— apiclient.NewClientWithContext has cognitive complexity 67 (threshold 15). Drivers by points: if/else 38 (61 pts), boolean chains 5, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.processAppRefreshQueueItem (cognitive 66) controller/appcontroller.go:2139— ApplicationController.processAppRefreshQueueItem has cognitive complexity 66 (threshold 15). Drivers by points: if/else 37 (56 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 20). Of this number, 63 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.helmTemplate (cognitive 66) REDACTED:1321— repository.helmTemplate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (55 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 33). Of this number, 63 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appStateManager.SyncAppState (cognitive 65) controller/sync.go:160— appStateManager.SyncAppState has cognitive complexity 65 (threshold 15). Drivers by points: if/else 39 (55 pts), boolean chains 7, loops 2, match/switch 1 (nesting depth added 16). Of this number, 57 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.UpdateApplicationSetApplicationStatus (cognitive 63) applicationset/progressivesync/progressive_sync.go:423— Manager.UpdateApplicationSetApplicationStatus has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (46 pts), match/switch 2 (9 pts), boolean chains 6, loops 2 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
store.GetManagedLiveObjs (cognitive 60) gitops-engine/pkg/cache/cluster.go:1309— store.GetManagedLiveObjs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (53 pts), loops 4, boolean chains 3 (nesting depth added 30). Of this number, 20 points are the body's own statements and 40 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cache.populateGatewayAPIRouteInfo (cognitive 60) controller/cache/info.go:474— cache.populateGatewayAPIRouteInfo has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (44 pts), boolean chains 8, loops 4 (8 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyncWindows.Matches (cognitive 59) pkg/apis/application/v1alpha1/types.go:3380— SyncWindows.Matches has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 4 (14 pts), boolean chains 7 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.GetManifests (cognitive 59) server/application/application.go:505— Server.GetManifests has cognitive complexity 59 (threshold 15). Drivers by points: if/else 26 (49 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 25). Of this number, 27 points are the body's own statements and 32 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.UpdateApplicationSetApplicationStatusProgress (cognitive 57) applicationset/progressivesync/progressive_sync.go:807— Manager.UpdateApplicationSetApplicationStatusProgress has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (44 pts), loops 3 (10 pts), boolean chains 3 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cache.populatePodInfo (cognitive 57) controller/cache/info.go:616— cache.populatePodInfo has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 12, loops 7 (8 pts), match/switch 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cognitive 56) cmd/argocd/commands/project_source_integrity.go:350— commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (36 pts), loops 8 (12 pts), boolean chains 8 (nesting depth added 16). None of this is in the body itself: all 56 points belong to one function literal inside it that branches (line 379). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
repository.getResolvedValueFiles (cognitive 54) REDACTED:1497— repository.getResolvedValueFiles has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (48 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 31). Of this number, 53 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.waitOnApplicationStatus (cognitive 53) cmd/argocd/commands/app.go:2445— commands.waitOnApplicationStatus has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 10, loops 2 (3 pts), match/switch 1 (nesting depth added 20). Of this number, 37 points are the body's own statements and 16 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
application.mergeLogStreams (cognitive 53) server/application/logs.go:69— application.mergeLogStreams has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 8 (13 pts), match/switch 4 (9 pts), boolean chains 3, jumps 1 (nesting depth added 27). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 107, 81, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
commands.NewLoginCommand (cognitive 51) REDACTED:43— commands.NewLoginCommand has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 2, match/switch 1 (nesting depth added 28). None of this is in the body itself: all 51 points belong to one function literal inside it that branches (line 78). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
appStateManager.GetRepoObjs (cognitive 51) REDACTED:229— appStateManager.GetRepoObjs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 32 (47 pts), boolean chains 2, loops 2 (nesting depth added 15). Of this number, 29 points are the body's own statements and 22 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reposerver.StartGPGWatcher (cognitive 50) reposerver/gpgwatcher.go:18— reposerver.StartGPGWatcher has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (39 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 32). Most of this is not in the body itself: 2 of the 50 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 32, 25). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
files.untar (cognitive 50) REDACTED:100— files.untar has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SCMProviderGenerator.GenerateParams (cognitive 49) applicationset/generators/scm_provider.go:146— SCMProviderGenerator.GenerateParams has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (45 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
application.init (cognitive 49) pkg/apiclient/application/forwarder_overwrite.go:285— application.init has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 7 (15 pts), boolean chains 1 (nesting depth added 23). None of this is in the body itself: all 49 points belong to 3 function literals inside it that branch (lines 286, 337, 330). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Service.getManifestCacheEntry (cognitive 49) REDACTED:1078— Service.getManifestCacheEntry has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (47 pts), boolean chains 2 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Service.populateHelmAppDetails (cognitive 49) REDACTED:2632— Service.populateHelmAppDetails has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (41 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.createOrUpdateInCluster (cognitive 48) REDACTED:728— ApplicationSetReconciler.createOrUpdateInCluster has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 26). Most of this is not in the body itself: 4 of the 48 points are its own statements and the rest belongs to one function literal inside it that branches (line 746). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
syncContext.runTasks (cognitive 47) gitops-engine/pkg/sync/sync_context.go:1641— syncContext.runTasks has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 19). Of this number, 22 points are the body's own statements and 25 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
progressivesync.buildAppDependencyList (cognitive 47) applicationset/progressivesync/progressive_sync.go:319— progressivesync.buildAppDependencyList has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.getAppHosts (cognitive 47) controller/appcontroller.go:692— ApplicationController.getAppHosts has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 10 (19 pts), boolean chains 5, match/switch 1 (nesting depth added 22). Of this number, 40 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Service.UpdateRevisionForPaths (cognitive 47) REDACTED:3582— Service.UpdateRevisionForPaths has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.PodLogs (cognitive 47) server/application/application.go:1900— Server.PodLogs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 4, match/switch 2 (4 pts), loops 2 (nesting depth added 14). Of this number, 21 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebhookHandler.shouldRefreshMatrixGenerator (cognitive 45) applicationset/webhook/webhook.go:375— WebhookHandler.shouldRefreshMatrixGenerator has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controller.setApplicationHealth (cognitive 45) controller/health.go:25— controller.setApplicationHealth has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 11, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.persistAppStatus (cognitive 45) controller/appcontroller.go:2847— ApplicationController.persistAppStatus has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 5 (nesting depth added 17). Of this number, 41 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.autoSync (cognitive 45) controller/appcontroller.go:2982— ApplicationController.autoSync has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (33 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 16). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.executeHooks (cognitive 45) REDACTED:99— ApplicationController.executeHooks has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 6 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgoCDServer.watchSettings (cognitive 44) REDACTED:835— ArgoCDServer.watchSettings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 4, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kube.SetAppInstanceLabel (cognitive 44) util/kube/kube.go:23— kube.SetAppInstanceLabel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (36 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
health.getCorev1PodHealth (cognitive 43) gitops-engine/pkg/health/health_pod.go:32— health.getCorev1PodHealth has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 8, loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 19). Of this number, 36 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.PerformReverseDeletion (cognitive 43) applicationset/progressivesync/progressive_sync.go:170— Manager.PerformReverseDeletion has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 3 (15 pts), loops 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewLogoutCommand (cognitive 43) REDACTED:25— commands.NewLogoutCommand has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 1 (nesting depth added 23). None of this is in the body itself: all 43 points belong to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
cache.generateGatewayURLs (cognitive 43) controller/cache/info.go:366— cache.generateGatewayURLs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 4 (7 pts), boolean chains 6, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extension.validateConfigs (cognitive 43) server/extension/extension.go:476— extension.validateConfigs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.parseAccounts (cognitive 43) util/settings/accounts.go:226— settings.parseAccounts has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 3 (8 pts), loops 3 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sourceintegrity.parseGitCommitVerification (cognitive 43) util/sourceintegrity/gpg.go:767— sourceintegrity.parseGitCommitVerification has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PullRequestGenerator.selectServiceProvider (cognitive 42) applicationset/generators/pull_request.go:130— PullRequestGenerator.selectServiceProvider has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (42 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.resolveSourceRevisions (cognitive 42) server/application/application.go:2276— Server.resolveSourceRevisions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
nativeHelmChart.ExtractChart (cognitive 42) REDACTED:197— nativeHelmChart.ExtractChart has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Update (cognitive 41) server/project/project.go:368— Server.Update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListGenerator.GenerateParams (cognitive 40) applicationset/generators/list.go:32— ListGenerator.GenerateParams has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (9 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.printAppSummaryTable (cognitive 40) cmd/argocd/commands/app.go:655— commands.printAppSummaryTable has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 7, loops 3 (6 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.GenerateManifests (cognitive 40) REDACTED:1776— repository.GenerateManifests has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 20). Of this number, 37 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tgz.tgzFile (cognitive 40) REDACTED:238— tgz.tgzFile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cache.buildGraph (cognitive 39) gitops-engine/pkg/cache/cluster.go:1225— cache.buildGraph has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 4 (8 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db.RemoveRepoCertificates (cognitive 39) util/db/certificate.go:329— db.RemoveRepoCertificates has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
template.GenerateApplications (cognitive 38) applicationset/controllers/template/template.go:16— template.GenerateApplications has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 3 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Sync (cognitive 38) server/application/application.go:2144— Server.Sync has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
compressedLayerExtracterStore.Push (cognitive 38) REDACTED:626— compressedLayerExtracterStore.Push has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 3 (nesting depth added 20). Of this number, 23 points are the body's own statements and 15 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
diff.HideSecretData (cognitive 37) REDACTED:938— diff.HideSecretData has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.setAppSetApplicationStatus (cognitive 37) REDACTED:1165— ApplicationSetReconciler.setAppSetApplicationStatus has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 22). Of this number, 30 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.generateProjectAllowList (cognitive 37) cmd/argocd/commands/admin/project_allowlist.go:104— admin.generateProjectAllowList has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (13 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Repository.CopyCredentialsFrom (cognitive 37) pkg/apis/application/v1alpha1/repository_types.go:211— Repository.CopyCredentialsFrom has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (37 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewApplicationDiffCommand (cognitive 35) cmd/argocd/commands/app_diff.go:624— commands.NewApplicationDiffCommand has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 8, loops 3 (5 pts), match/switch 1 (nesting depth added 7). None of this is in the body itself: all 35 points belong to one function literal inside it that branches (line 649). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationController.cleanupHooks (cognitive 35) REDACTED:266— ApplicationController.cleanupHooks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
normalizers.normalize (cognitive 35) util/argo/normalizers/knowntypes_normalizer.go:84— normalizers.normalize has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeOCIClient.extract (cognitive 35) REDACTED:261— nativeOCIClient.extract has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clusterSecretEventHandler.queueRelatedAppGenerators (cognitive 34) applicationset/controllers/clustereventhandler.go:52— clusterSecretEventHandler.queueRelatedAppGenerators has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatrixGenerator.GenerateParams (cognitive 34) applicationset/generators/matrix.go:40— MatrixGenerator.GenerateParams has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cluster.rawRestConfig (cognitive 34) pkg/apis/application/v1alpha1/types.go:4394— Cluster.rawRestConfig has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 1 (4 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.getHelmRepos (cognitive 34) REDACTED:1171— repository.getHelmRepos has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Get (cognitive 34) server/application/application.go:804— Server.Get has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 13). Of this number, 27 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeHelmChart.GetTags (cognitive 34) REDACTED:505— nativeHelmChart.GetTags has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 15). Of this number, 32 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.updateIndexes (cognitive 33) gitops-engine/pkg/cache/cluster.go:586— store.updateIndexes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
syncContext.applyObject (cognitive 33) gitops-engine/pkg/sync/sync_context.go:1431— syncContext.applyObject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.setApplicationSetStatusCondition (cognitive 33) REDACTED:486— ApplicationSetReconciler.setApplicationSetStatusCondition has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). Of this number, 29 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.RotateAuth (cognitive 33) server/cluster/cluster.go:386— Server.RotateAuth has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db.ListRepoCertificates (cognitive 33) util/db/certificate.go:57— db.ListRepoCertificates has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
exec.RunCommandExt (cognitive 33) util/exec/exec.go:184— exec.RunCommandExt has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (28 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.loadClusters (cognitive 32) cmd/argocd/commands/admin/cluster.go:81— admin.loadClusters has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controller.NewApplicationController (cognitive 32) controller/appcontroller.go:171— controller.NewApplicationController has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 274). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
liveStateCache.getCluster (cognitive 32) controller/cache/cache.go:504— liveStateCache.getCluster has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 6, loops 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 609, 567). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Server.validateAndNormalizeApp (cognitive 32) server/application/application.go:1361— Server.validateAndNormalizeApp has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kustomize.getImages (cognitive 32) util/kustomize/kustomize.go:534— kustomize.getImages has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 3 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsManager.InitializeSettings (cognitive 32) REDACTED:2604— SettingsManager.InitializeSettings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 2606). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
tls.CreateServerTLSConfig (cognitive 32) REDACTED:482— tls.CreateServerTLSConfig has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff.hide (cognitive 31) REDACTED:1016— diff.hide has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewApplicationSetDeleteCommand (cognitive 31) cmd/argocd/commands/applicationset.go:373— commands.NewApplicationSetDeleteCommand has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 16). None of this is in the body itself: all 31 points belong to one function literal inside it that branches (line 392). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
headless.MaybeStartLocalServer (cognitive 31) cmd/argocd/commands/headless/headless.go:180— headless.MaybeStartLocalServer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ApplicationController.getResourceTree (cognitive 31) controller/appcontroller.go:560— ApplicationController.getResourceTree has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 3, loops 3 (nesting depth added 7). Of this number, 22 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.handleRefreshAnnotation (cognitive 31) controller/appcontroller.go:2726— ApplicationController.handleRefreshAnnotation has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cache.populateNodeInfo (cognitive 31) controller/cache/info.go:28— cache.populateNodeInfo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 4 (7 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cache.populateIstioVirtualServiceInfo (cognitive 31) controller/cache/info.go:262— cache.populateIstioVirtualServiceInfo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Repository.CopyCredentialsFromRepo (cognitive 31) pkg/apis/application/v1alpha1/repository_types.go:157— Repository.CopyCredentialsFromRepo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (31 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.GetManifestsWithFiles (cognitive 31) server/application/application.go:671— Server.GetManifestsWithFiles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.RunResourceActionV2 (cognitive 31) server/application/application.go:2758— Server.RunResourceActionV2 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terminalHandler.ServeHTTP (cognitive 31) server/application/terminal.go:110— terminalHandler.ServeHTTP has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (28 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
repository.isSourceInHistory (cognitive 31) server/repository/repository.go:801— repository.isSourceInHistory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generators.parseFileParams (cognitive 30) applicationset/generators/repo_path_utils.go:162— generators.parseFileParams has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Service.handleCommitRequest (cognitive 30) commitserver/commit/commit.go:105— Service.handleCommitRequest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
sharding.GetClusterSharding (cognitive 30) controller/sharding/sharding.go:458— sharding.GetClusterSharding has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
application.streamApplicationListJSON (cognitive 30) pkg/apiclient/application/forwarder_overwrite.go:167— application.streamApplicationListJSON has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgoCDServer.Run (cognitive 30) REDACTED:598— ArgoCDServer.Run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22 (27 pts), match/switch 2, boolean chains 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
nativeGitClient.resolveRevisionWithOptions (cognitive 30) REDACTED:1285— nativeGitClient.resolveRevisionWithOptions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
legacyEngine.sync (cognitive 29) gitops-engine/pkg/cache/legacy_engine.go:75— legacyEngine.sync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (28 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 159, 83). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
webhook.shouldRefreshPRGenerator (cognitive 29) applicationset/webhook/webhook.go:311— webhook.shouldRefreshPRGenerator has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebhookHandler.shouldRefreshMergeGenerator (cognitive 29) applicationset/webhook/webhook.go:529— WebhookHandler.shouldRefreshMergeGenerator has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.printResources (cognitive 29) cmd/argocd/commands/app_resources.go:484— commands.printResources has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 2 (6 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
commands.NewClusterAddCommand (cognitive 29) cmd/argocd/commands/cluster.go:86— commands.NewClusterAddCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4, match/switch 1 (nesting depth added 10). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewRepoAddCommand (cognitive 29) cmd/argocd/commands/repo.go:58— commands.NewRepoAddCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5 (nesting depth added 6). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationController.handleObjectUpdated (cognitive 29) controller/appcontroller.go:424— ApplicationController.handleObjectUpdated has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
normalizers.NewIgnoreNormalizer (cognitive 29) util/argo/normalizers/diff_normalizer.go:121— normalizers.NewIgnoreNormalizer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
legacyConfig.merge (cognitive 29) util/notification/settings/legacy.go:76— legacyConfig.merge has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AWSCodeCommitProvider.listRepoNames (cognitive 28) applicationset/services/scm_provider/aws_codecommit.go:233— AWSCodeCommitProvider.listRepoNames has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (10 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewCommand (cognitive 28) cmd/argocd-server/commands/argocd_server.go:57— commands.NewCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4, loops 1 (nesting depth added 9). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 121). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.NewExportCommand (cognitive 28) cmd/argocd/commands/admin/backup.go:33— admin.NewExportCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 8). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.runClusterNamespacesCommand (cognitive 28) cmd/argocd/commands/admin/cluster.go:274— admin.runClusterNamespacesCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.updateProjects (cognitive 28) cmd/argocd/commands/admin/project.go:201— admin.updateProjects has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.persistOperationStateFallback (cognitive 28) controller/appcontroller.go:1894— ApplicationController.persistOperationStateFallback has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.applicationEventHandlerFuncs (cognitive 28) controller/appcontroller.go:3415— ApplicationController.applicationEventHandlerFuncs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 8 (nesting depth added 3). None of this is in the body itself: all 28 points belong to 3 function literals inside it that branch (lines 3431, 3479, 3417). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ClientApp.SetGroupsClaimFromEndpoint (cognitive 28) REDACTED:936— ClientApp.SetGroupsClaimFromEndpoint has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientApp.GetUserInfo (cognitive 28) REDACTED:983— ClientApp.GetUserInfo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SessionManager.Parse (cognitive 28) REDACTED:259— SessionManager.Parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 3 (nesting depth added 7). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sourceintegrity.SyncKeyRingFromDirectory (cognitive 28) util/sourceintegrity/gpg.go:574— sourceintegrity.SyncKeyRingFromDirectory has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 3, boolean chains 1 (nesting depth added 8). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgoCDWebhookHandler.HandleRegistryEvent (cognitive 28) util/webhook/registry.go:61— ArgoCDWebhookHandler.HandleRegistryEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.processCrossNamespaceChildren (cognitive 27) gitops-engine/pkg/cache/cluster.go:1094— store.processCrossNamespaceChildren has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
legacyEngine.startMissingWatches (cognitive 27) gitops-engine/pkg/cache/legacy_engine.go:221— legacyEngine.startMissingWatches has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 1, loops 1 (nesting depth added 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 250). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.printApplicationHistoryTable (cognitive 27) cmd/argocd/commands/app.go:2689— commands.printApplicationHistoryTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewApplicationManifestsCommand (cognitive 27) cmd/argocd/commands/app.go:2888— commands.NewApplicationManifestsCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 5 (10 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 9). None of this is in the body itself: all 27 points belong to one function literal inside it that branches (line 2915). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
DefaultPluginHandler.ListAvailablePlugins (cognitive 27) REDACTED:142— DefaultPluginHandler.ListAvailablePlugins has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.needRefreshAppStatus (cognitive 27) controller/appcontroller.go:2477— ApplicationController.needRefreshAppStatus has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyncWindows.canSyncFrom (cognitive 27) pkg/apis/application/v1alpha1/types.go:3601— SyncWindows.canSyncFrom has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VM.ExecuteResourceActionDiscovery (cognitive 27) util/lua/lua.go:412— VM.ExecuteResourceActionDiscovery has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webhook.NewParsers (cognitive 27) util/webhook/scm.go:54— webhook.NewParsers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (27 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
syncContext.terminateHooksPreemptively (cognitive 26) gitops-engine/pkg/sync/sync_context.go:814— syncContext.terminateHooksPreemptively has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.removeFinalizerOnInvalidDestination (cognitive 26) REDACTED:992— ApplicationSetReconciler.removeFinalizerOnInvalidDestination has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DuckTypeGenerator.GenerateParams (cognitive 26) REDACTED:61— DuckTypeGenerator.GenerateParams has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
commands.newServerSideDiffStrategy (cognitive 26) cmd/argocd/commands/app_diff.go:214— commands.newServerSideDiffStrategy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 11). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 222). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewRepoCredsAddCommand (cognitive 26) cmd/argocd/commands/repocreds.go:55— commands.NewRepoCredsAddCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4 (nesting depth added 6). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 99). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
main.generateCommandsDocs (cognitive 26) hack/gen-catalog/main.go:162— main.generateCommandsDocs has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (11 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
repository.getObjsFromYAMLOrJSON (cognitive 26) REDACTED:2084— repository.getObjsFromYAMLOrJSON has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgoCDServer.getClaims (cognitive 26) REDACTED:1685— ArgoCDServer.getClaims has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SSHCreds.Environ (cognitive 26) REDACTED:407— SSHCreds.Environ has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (26 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncTasks.adjustDeps (cognitive 25) gitops-engine/pkg/sync/sync_tasks.go:143— syncTasks.adjustDeps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scm_provider.matchFilter (cognitive 25) applicationset/services/scm_provider/utils.go:52— scm_provider.matchFilter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewApplicationLogsCommand (cognitive 25) cmd/argocd/commands/app.go:519— commands.NewApplicationLogsCommand has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 579). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
util.setHelmOpt (cognitive 25) cmd/util/app.go:453— util.setHelmOpt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Hydrator.ProcessHydrationQueueItem (cognitive 25) controller/hydrator/hydrator.go:196— Hydrator.ProcessHydrationQueueItem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appCollector.collectApps (cognitive 25) REDACTED:489— appCollector.collectApps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
client.startGRPCProxy (cognitive 25) pkg/apiclient/grpcproxy.go:112— client.startGRPCProxy has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 144). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
apiclient.buildTLSClientConfig (cognitive 25) REDACTED:164— apiclient.buildTLSClientConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2 (nesting depth added 12). Of this number, 15 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
repository.findManifests (cognitive 25) REDACTED:2034— repository.findManifests has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.getPotentiallyValidManifestFile (cognitive 25) REDACTED:2178— repository.getPotentiallyValidManifestFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
argo.ValidatePermissions (cognitive 25) util/argo/argo.go:744— argo.ValidatePermissions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsManager.appendResourceOverridesFromSplitKeys (cognitive 25) REDACTED:1226— SettingsManager.appendResourceOverridesFromSplitKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sourceintegrity.GetInstalledPGPKeys (cognitive 25) util/sourceintegrity/gpg.go:441— sourceintegrity.GetInstalledPGPKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
versions.sortVersionLinks (cognitive 25) docs/assets/versions.js:99— versions.sortVersionLinks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 115, 103). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AzureDevOpsProvider.GetBranches (cognitive 24) applicationset/services/scm_provider/azure_devops.go:132— AzureDevOpsProvider.GetBranches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Render.RenderGeneratorParams (cognitive 24) REDACTED:337— Render.RenderGeneratorParams has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 360). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationGetCommand (cognitive 24) cmd/argocd/commands/app.go:335— commands.NewApplicationGetCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, match/switch 2 (nesting depth added 7). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 385). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
sharding.getOrUpdateShardNumberForController (cognitive 24) controller/sharding/sharding.go:357— sharding.getOrUpdateShardNumberForController has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appStateManager.evaluateRevisionChanges (cognitive 24) REDACTED:465— appStateManager.evaluateRevisionChanges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.resolveReferencedSources (cognitive 24) REDACTED:589— repository.resolveReferencedSources has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Get (cognitive 24) server/settings/settings.go:41— Server.Get has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), loops 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
argo.GetRefSources (cognitive 24) util/argo/argo.go:645— argo.GetRefSources has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grpc.ResolveClientIP (cognitive 24) util/grpc/logging.go:211— grpc.ResolveClientIP has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), jumps 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientApp.HandleCallback (cognitive 24) REDACTED:529— ClientApp.HandleCallback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21 (24 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
diff.NormalizeSecret (cognitive 23) REDACTED:782— diff.NormalizeSecret has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergeGenerator.GenerateParams (cognitive 23) applicationset/generators/merge.go:53— MergeGenerator.GenerateParams has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubMetricsTransport.RoundTrip (cognitive 23) applicationset/services/github_metrics.go:136— GitHubMetricsTransport.RoundTrip has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.NewCommand (cognitive 23) REDACTED:57— command.NewCommand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 4. None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 101). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewGenDexConfigCommand (cognitive 23) REDACTED:150— commands.NewGenDexConfigCommand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (4 pts) (nesting depth added 15). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 159). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewCommand (cognitive 23) REDACTED:54— commands.NewCommand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 2 (nesting depth added 7). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.getResourceStates (cognitive 23) cmd/argocd/commands/app.go:2213— commands.getResourceStates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.Run (cognitive 23) controller/appcontroller.go:944— ApplicationController.Run has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 7 (8 pts) (nesting depth added 7). Of this number, 12 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
client.WatchApplicationSetWithRetry (cognitive 23) pkg/apiclient/apiclient.go:1038— client.WatchApplicationSetWithRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (5 pts) (nesting depth added 14). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 1042). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This shape REPEATS in the file: one other method here (client.WatchApplicationWithRetry) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
client.WatchApplicationWithRetry (cognitive 23) pkg/apiclient/apiclient.go:1081— client.WatchApplicationWithRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (5 pts) (nesting depth added 14). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 1085). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This shape REPEATS in the file: one other method here (client.WatchApplicationSetWithRetry) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Server.UpdatePassword (cognitive 23) server/account/account.go:42— Server.UpdatePassword has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
server.bug21955WorkaroundInterceptor (cognitive 23) REDACTED:1823— server.bug21955WorkaroundInterceptor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
discovery.DetectConfigManagementPlugin (cognitive 23) util/app/discovery/discovery.go:91— discovery.DetectConfigManagementPlugin has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeGitClient.getRefsFromCacheOrFetch (cognitive 23) REDACTED:853— nativeGitClient.getRefsFromCacheOrFetch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4 (nesting depth added 9). Of this number, 16 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manifeststream.receiveFile (cognitive 23) util/manifeststream/stream.go:201— manifeststream.receiveFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Enforcer.EnforceErr (cognitive 23) util/rbac/rbac.go:351— Enforcer.EnforceErr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 1 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
commands.NewRunDexCommand (cognitive 22) REDACTED:44— commands.NewRunDexCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 52). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewApplicationSetCreateCommand (cognitive 22) cmd/argocd/commands/applicationset.go:134— commands.NewApplicationSetCreateCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 153). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewClusterRemoveCommand (cognitive 22) cmd/argocd/commands/cluster.go:430— commands.NewClusterRemoveCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (nesting depth added 11). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 437). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.NewVersionCmd (cognitive 22) cmd/argocd/commands/version.go:21— commands.NewVersionCmd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, match/switch 1 (nesting depth added 9). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
client.executeRequest (cognitive 22) pkg/apiclient/grpcproxy.go:56— client.executeRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppProject.isDestinationMatched (cognitive 22) pkg/apis/application/v1alpha1/app_project_types.go:507— AppProject.isDestinationMatched has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (8 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
application.parseLogsStream (cognitive 22) server/application/logs.go:23— application.parseLogsStream has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (8 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.ServeHTTP (cognitive 22) REDACTED:51— Handler.ServeHTTP has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ArgoCDServer.newStaticAssetsHandler (cognitive 22) REDACTED:1568— ArgoCDServer.newStaticAssetsHandler has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 1569). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
path.CheckOutOfBoundsSymlinks (cognitive 22) util/app/path/path.go:54— path.CheckOutOfBoundsSymlinks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
argo.verifyGenerateManifests (cognitive 22) util/argo/argo.go:908— argo.verifyGenerateManifests has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
git.DiscoverGitHubAppInstallationID (cognitive 22) REDACTED:770— git.DiscoverGitHubAppInstallationID has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
nativeGitClient.LsFiles (cognitive 22) REDACTED:746— nativeGitClient.LsFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helm.DependencyBuild (cognitive 22) util/helm/helm.go:80— helm.DependencyBuild has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lua.cleanReturnedObj (cognitive 22) util/lua/lua.go:355— lua.cleanReturnedObj has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (7 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.removeIndexes (cognitive 21) gitops-engine/pkg/cache/cluster.go:1436— store.removeIndexes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
diff.applyPatch (cognitive 21) REDACTED:488— diff.applyPatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (21 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubectlCmd.filterAPIResources (cognitive 21) gitops-engine/pkg/utils/kube/ctl.go:65— KubectlCmd.filterAPIResources has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kubectlResourceOperations.newApplyOptions (cognitive 21) gitops-engine/pkg/utils/kube/resource_ops.go:438— kubectlResourceOperations.newApplyOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewApplicationDeleteCommand (cognitive 21) cmd/argocd/commands/app.go:1266— commands.NewApplicationDeleteCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 1 (nesting depth added 6). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 1290). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.printManifestAsTable (cognitive 21) cmd/argocd/commands/app_resources.go:260— commands.printManifestAsTable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commit.WriteForPaths (cognitive 21) commitserver/commit/hydratorhelper.go:39— commit.WriteForPaths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hydrator.hydrate (cognitive 21) controller/hydrator/hydrator.go:430— Hydrator.hydrate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ApplicationSetStatus.SetConditions (cognitive 21) pkg/apis/application/v1alpha1/applicationset_types.go:1050— ApplicationSetStatus.SetConditions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.fetch (cognitive 21) REDACTED:3155— repository.fetch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.GetAppDetails (cognitive 21) server/repository/repository.go:333— Server.GetAppDetails has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cache.AddCacheFlagsToCmd (cognitive 21) REDACTED:211— cache.AddCacheFlagsToCmd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
nativeGitClient.Checkout (cognitive 21) REDACTED:813— nativeGitClient.Checkout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeGitClient.LsSignatures (cognitive 21) REDACTED:1653— nativeGitClient.LsSignatures has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helm.GetParameters (cognitive 21) util/helm/helm.go:147— helm.GetParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VM.ExecuteResourceAction (cognitive 21) util/lua/lua.go:288— VM.ExecuteResourceAction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionManager.VerifyToken (cognitive 21) REDACTED:586— SessionManager.VerifyToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.updateSettingsFromConfigMap (cognitive 21) REDACTED:1752— settings.updateSettingsFromConfigMap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
webhook.fetchChangesFromBitbucketServer (cognitive 21) REDACTED:777— webhook.fetchChangesFromBitbucketServer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
legacyEngine.watchEvents (cognitive 20) gitops-engine/pkg/cache/legacy_engine.go:349— legacyEngine.watchEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 351). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ApplicationSetReconciler.deleteInCluster (cognitive 20) REDACTED:893— ApplicationSetReconciler.deleteInCluster has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (nesting depth added 7). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 925). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
scm_provider.compileFilters (cognitive 20) applicationset/services/scm_provider/utils.go:13— scm_provider.compileFilters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.printManifests (cognitive 20) cmd/argocd/commands/app_resources.go:220— commands.printManifests has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.reconcileApplications (cognitive 20) cmd/argocd/commands/admin/app.go:361— admin.reconcileApplications has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.NewGenRepoSpecCommand (cognitive 20) cmd/argocd/commands/admin/repo.go:40— admin.NewGenRepoSpecCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
controller.normalizeTargetResources (cognitive 20) controller/sync.go:499— controller.normalizeTargetResources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.statusWithEffectiveReconciledAt (cognitive 20) controller/appcontroller.go:2563— ApplicationController.statusWithEffectiveReconciledAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cache.loadRedisCreds (cognitive 20) REDACTED:139— cache.loadRedisCreds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (20 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmp.receiveFile (cognitive 20) util/cmp/stream.go:194— cmp.receiveFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeGitClient.cleanupOrphanedTempPackfiles (cognitive 20) REDACTED:658— nativeGitClient.cleanupOrphanedTempPackfiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeGitClient.lsRemoteOptimized (cognitive 20) REDACTED:1042— nativeGitClient.lsRemoteOptimized has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.GetLegacyDestinations (cognitive 20) util/notification/settings/legacy.go:191— settings.GetLegacyDestinations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sourceintegrity.describeProblems (cognitive 20) util/sourceintegrity/source_integrity.go:169— sourceintegrity.describeProblems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.processNamespaceHierarchy (cognitive 19) gitops-engine/pkg/cache/cluster.go:1195— store.processNamespaceHierarchy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sync.dedupLiveResources (cognitive 19) gitops-engine/pkg/sync/reconcile.go:33— sync.dedupLiveResources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.getMinRequeueAfter (cognitive 19) REDACTED:640— ApplicationSetReconciler.getMinRequeueAfter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Requirement.Matches (cognitive 19) applicationset/utils/selector.go:214— Requirement.Matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
commands.oauth2Login (cognitive 19) REDACTED:292— commands.oauth2Login has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 337, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cognitive 19) cmd/argocd/commands/project_source_integrity.go:168— commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
settingsOpts.createSettingsManager (cognitive 19) cmd/argocd/commands/admin/settings.go:67— settingsOpts.createSettingsManager has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2, boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
util.setKustomizeOpt (cognitive 19) cmd/util/app.go:362— util.setKustomizeOpt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (17 pts), loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
controller.NormalizeTargetObjects (cognitive 19) REDACTED:574— controller.NormalizeTargetObjects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.processAppOperationQueueItem (cognitive 19) controller/appcontroller.go:1071— ApplicationController.processAppOperationQueueItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
liveStateCache.handleModEvent (cognitive 19) controller/cache/cache.go:869— liveStateCache.handleModEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controller.isAppSyncStatusRefreshed (cognitive 19) notification_controller/controller/controller.go:238— controller.isAppSyncStatusRefreshed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reposerver.NewServer (cognitive 19) reposerver/server.go:49— reposerver.NewServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Service.GetRevisionMetadata (cognitive 19) REDACTED:2861— Service.GetRevisionMetadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Service.GetOciFiles (cognitive 19) REDACTED:3763— Service.GetOciFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
application.isTheSelectedOne (cognitive 19) server/application/application.go:2089— application.isTheSelectedOne has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.ListResourceEvents (cognitive 19) server/application/application.go:923— Server.ListResourceEvents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.NormalizeProjs (cognitive 19) server/project/project.go:558— Server.NormalizeProjs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
argo.validateRepo (cognitive 19) util/argo/argo.go:521— argo.validateRepo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nativeOCIClient.getTags (cognitive 19) REDACTED:431— nativeOCIClient.getTags has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsManager.GetKustomizeSettings (cognitive 19) REDACTED:1350— SettingsManager.GetKustomizeSettings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.parseManifests (cognitive 18) REDACTED:62— settings.parseManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 71). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
store.checkPermission (cognitive 18) gitops-engine/pkg/cache/cluster.go:957— store.checkPermission has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BitbucketServerProvider.ListRepos (cognitive 18) applicationset/services/scm_provider/bitbucket_server.go:61— BitbucketServerProvider.ListRepos has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.compareManifests (cognitive 18) cmd/argocd/commands/app_diff.go:556— commands.compareManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.modifyResourceListCmd (cognitive 18) cmd/argocd/commands/project.go:648— commands.modifyResourceListCmd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 662). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
admin.NewRBACCanCommand (cognitive 18) cmd/argocd/commands/admin/settings_rbac.go:128— admin.NewRBACCanCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (nesting depth added 1). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 166). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
main.main (cognitive 18) cmd/main.go:72— main.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (18 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.ConstructSource (cognitive 18) cmd/util/app.go:706— util.ConstructSource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 5). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 708). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
util.FilterResources (cognitive 18) cmd/util/app.go:922— util.FilterResources has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controller.isKnownOrphanedResourceExclusion (cognitive 18) controller/appcontroller.go:537— controller.isKnownOrphanedResourceExclusion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appStateManager.EvaluateAppRevisionsChanges (cognitive 18) REDACTED:156— appStateManager.EvaluateAppRevisionsChanges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Delete (cognitive 18) server/application/application.go:1197— Server.Delete has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff.diffArrayCached (cognitive 18) util/argo/diff/diff.go:332— diff.diffArrayCached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
git.newAuth (cognitive 18) REDACTED:509— git.newAuth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
git.ExtractOrgFromRepoURL (cognitive 18) REDACTED:901— git.ExtractOrgFromRepoURL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grpc.logRequest (cognitive 18) util/grpc/logging.go:28— grpc.logRequest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cmd.RepoAdd (cognitive 18) REDACTED:166— Cmd.RepoAdd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (18 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
tls.generate (cognitive 18) REDACTED:289— tls.generate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
trace.collectorTLSCredentials (cognitive 18) REDACTED:88— trace.collectorTLSCredentials has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
versions.MaxVersion (cognitive 18) util/versions/tags.go:49— versions.MaxVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webhook.newBitbucketClient (cognitive 18) REDACTED:612— webhook.newBitbucketClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
health.GetHealthCheckFunc (cognitive 17) gitops-engine/pkg/health/health.go:141— health.GetHealthCheckFunc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (5 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
controllers.nestedGeneratorHasClusterGenerator (cognitive 17) applicationset/controllers/clustereventhandler.go:136— controllers.nestedGeneratorHasClusterGenerator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationSetReconciler.migrateStatus (cognitive 17) REDACTED:1076— ApplicationSetReconciler.migrateStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generators.filterPaths (cognitive 17) applicationset/generators/repo_path_utils.go:71— generators.filterPaths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
progressivesync.getAppsToSync (cognitive 17) applicationset/progressivesync/progressive_sync.go:588— progressivesync.getAppsToSync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GithubService.List (cognitive 17) applicationset/services/pull_request/github.go:59— GithubService.List has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.warnOnProblems (cognitive 17) cmd/argocd/commands/project_source_integrity.go:534— commands.warnOnProblems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin.checkPolicy (cognitive 17) cmd/argocd/commands/admin/settings_rbac.go:383— admin.checkPolicy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
application.processAppFields (cognitive 17) pkg/apiclient/application/forwarder_overwrite.go:139— application.processAppFields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
repository.runConfigManagementPluginSidecars (cognitive 17) REDACTED:2469— repository.runConfigManagementPluginSidecars has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Service.gitSourceHasChanges (cognitive 17) REDACTED:3484— Service.gitSourceHasChanges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 pts) (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Server.getAppEnforceRBAC (cognitive 17) server/application/application.go:189— Server.getAppEnforceRBAC has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.Watch (cognitive 17) server/application/application.go:1290— Server.Watch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Server.Create (cognitive 17) server/applicationset/applicationset.go:287— Server.Create has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Server.getCluster (cognitive 17) server/cluster/cluster.go:226— Server.getCluster has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deeplinks.EvaluateDeepLinksResponse (cognitive 17) server/deeplinks/deeplinks.go:103— deeplinks.EvaluateDeepLinksResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RBACPolicyEnforcer.EnforceClaims (cognitive 17) server/rbacpolicy/rbacpolicy.go:59— RBACPolicyEnforcer.EnforceClaims has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
argo.GetGlobalProjects (cognitive 17) util/argo/argo.go:1241— argo.GetGlobalProjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resourceTracking.RemoveAppInstance (cognitive 17) util/argo/resource_tracking.go:181— resourceTracking.RemoveAppInstance has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
lua.strftime (cognitive 17) util/lua/oslib_safe.go:97— lua.strftime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 1 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
oidc.hasUserReadScope (cognitive 17) util/oidc/oidc_azure.go:184— oidc.hasUserReadScope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
providerImpl.Verify (cognitive 17) util/oidc/provider.go:92— providerImpl.Verify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webhook.ParsePushEvent (cognitive 17) util/webhook/push.go:26— webhook.ParsePushEvent has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
gitOpsEngine.Sync (cognitive 16) gitops-engine/pkg/engine/engine.go:70— gitOpsEngine.Sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncContext.removeHookFinalizer (cognitive 16) gitops-engine/pkg/sync/sync_context.go:872— syncContext.removeHookFinalizer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 903, 888). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
syncContext.autoCreateNamespace (cognitive 16) gitops-engine/pkg/sync/sync_context.go:1203— syncContext.autoCreateNamespace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generators.generateRepoSourceFileParams (cognitive 16) applicationset/generators/repo_path_utils.go:325— generators.generateRepoSourceFileParams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (7 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pull_request.compileFilters (cognitive 16) applicationset/services/pull_request/utils.go:12— pull_request.compileFilters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitLabService.List (cognitive 16) applicationset/services/pull_request/gitlab.go:61— GitLabService.List has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AWSCodeCommitProvider.RepoHasPath (cognitive 16) applicationset/services/scm_provider/aws_codecommit.go:127— AWSCodeCommitProvider.RepoHasPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitlabProvider.listBranches (cognitive 16) applicationset/services/scm_provider/gitlab.go:179— GitlabProvider.listBranches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.NewAccountSessionTokenCommand (cognitive 16) cmd/argocd/commands/account.go:455— commands.NewAccountSessionTokenCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 473). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
controller.restoreNonIgnoredFields (cognitive 16) controller/sync.go:654— controller.restoreNonIgnoredFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationController.setOperationState (cognitive 16) controller/appcontroller.go:1817— ApplicationController.setOperationState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ApplicationController.canProcessAppWithDestination (cognitive 16) controller/appcontroller.go:3223— ApplicationController.canProcessAppWithDestination has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.newCommand (cognitive 16) REDACTED:31— main.newCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (nesting depth added 3). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
client.newConn (cognitive 16) pkg/apiclient/apiclient.go:622— client.newConn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplicationTree.GetSummary (cognitive 16) pkg/apis/application/v1alpha1/types.go:2263— ApplicationTree.GetSummary has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
repository.getPotentiallyValidManifests (cognitive 16) REDACTED:2254— repository.getPotentiallyValidManifests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 2268). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Server.Create (cognitive 16) server/application/application.go:362— Server.Create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Server.Watch (cognitive 16) server/applicationset/applicationset.go:80— Server.Watch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Server.updateAppSet (cognitive 16) server/applicationset/applicationset.go:384— Server.updateAppSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extension.parseAndValidateConfig (cognitive 16) server/extension/extension.go:429— extension.parseAndValidateConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.CreateRepository (cognitive 16) server/repository/repository.go:436— Server.CreateRepository has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
argo.ValidateRepo (cognitive 16) util/argo/argo.go:391— argo.ValidateRepo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ignoreNormalizer.Normalize (cognitive 16) util/argo/normalizers/diff_normalizer.go:181— ignoreNormalizer.Normalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resourceTracking.Normalize (cognitive 16) util/argo/resource_tracking.go:251— resourceTracking.Normalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
cert.ParseTLSCertificatesFromStream (cognitive 16) util/cert/cert.go:146— cert.ParseTLSCertificatesFromStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cmp.sendFile (cognitive 16) util/cmp/stream.go:165— cmp.sendFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db.SecretToCluster (cognitive 16) REDACTED:428— db.SecretToCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secretsRepositoryBackend.getRepositorySecret (cognitive 16) util/db/repository_secrets.go:568— secretsRepositoryBackend.getRepositorySecret has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HTTPSCreds.Environ (cognitive 16) REDACTED:269— HTTPSCreds.Environ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cmd.template (cognitive 16) REDACTED:429— Cmd.template has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
retryTransport.RoundTrip (cognitive 16) util/http/http.go:244— retryTransport.RoundTrip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kube.PortForward (cognitive 16) util/kube/portforwarder.go:42— kube.PortForward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
manifeststream.sendFile (cognitive 16) util/manifeststream/stream.go:73— manifeststream.sendFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.secretToCluster (cognitive 16) REDACTED:215— settings.secretToCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tls.getTLSConfigCustomizer (cognitive 16) REDACTED:139— tls.getTLSConfigCustomizer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication· Near-duplicate member family (6 members, 14 shared lines) · ×1
Near-duplicate member family (6 members, 14 shared lines) cmd/argocd/commands/project.go:330— cmd/argocd/commands/project.go:330-371 | cmd/argocd/commands/project.go:374-421 | cmd/argocd/commands/project.go:424-474 | cmd/argocd/commands/project.go:1237-1279 | cmd/argocd/commands/project_role.go:391-445 | cmd/argocd/commands/project_role.go:573-634 — These 6 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Near-duplicate member pair (50 shared lines) cmd/argocd/commands/admin/repo.go:40— cmd/argocd/commands/admin/repo.go:40-196 | cmd/argocd/commands/repo.go:58-284 — These two members are variants of one another: 50 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (29 shared lines) REDACTED:3343— REDACTED:3343-3419 | REDACTED:3421-3482 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) commitserver/commit/hydratorhelper.go:154— commitserver/commit/hydratorhelper.go:154-176 | util/sourceintegrity/gpg.go:115-136 | util/sourceintegrity/gpg.go:172-237 | util/sourceintegrity/gpg.go:239-259 | util/sourceintegrity/gpg.go:360-409 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) cmd/argocd/commands/app_resources.go:290— cmd/argocd/commands/app_resources.go:290-358 | cmd/argocd/commands/app_resources.go:360-436 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) REDACTED:428— REDACTED:428-495 | REDACTED:215-286 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (86 corresponding lines) · ×1
Edited copy of a member (86 corresponding lines) cmd/argocd/commands/app.go:842— cmd/argocd/commands/app.go:842-927 | cmd/argocd/commands/app.go:3248-3334 — These two members are one piece of code written twice and then edited apart: 86 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) server/application/application.go:1290— server/application/application.go:1290-1359 | server/applicationset/applicationset.go:80-140 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) cmd/argocd/commands/projectwindows.go:179— cmd/argocd/commands/projectwindows.go:179-250 | cmd/argocd/commands/projectwindows.go:298-355 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) cmd/argocd/commands/app.go:3076— cmd/argocd/commands/app.go:3076-3135 | cmd/argocd/commands/project.go:1113-1162 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) cmd/argocd/commands/admin/settings.go:388— cmd/argocd/commands/admin/settings.go:388-436 | cmd/argocd/commands/admin/settings.go:438-484 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) util/db/repository_secrets.go:421— util/db/repository_secrets.go:421-461 | util/db/repository_secrets.go:533-566 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (72 corresponding lines) · ×1
Edited copy of a member (72 corresponding lines) cmd/argocd/commands/project_role.go:57— cmd/argocd/commands/project_role.go:57-128 | cmd/argocd/commands/project_role.go:131-220 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) pkg/apis/application/v1alpha1/repository_types.go:157— pkg/apis/application/v1alpha1/repository_types.go:157-208 | pkg/apis/application/v1alpha1/repository_types.go:211-273 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) cmd/argocd/commands/project_role.go:265— cmd/argocd/commands/project_role.go:265-306 | cmd/argocd/commands/project_role.go:668-705 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) cmd/argocd/commands/applicationset.go:327— cmd/argocd/commands/applicationset.go:327-370 | cmd/argocd/commands/cert.go:307-351 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) cmd/argocd/commands/app.go:3137— cmd/argocd/commands/app.go:3137-3181 | cmd/argocd/commands/app_resources.go:532-581 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 36+ corresponding lines) · ×1
Edited copies of one member (3 members, 36+ corresponding lines) cmd/argocd/commands/project.go:187— cmd/argocd/commands/project.go:187-228 | cmd/argocd/commands/project.go:477-516 | cmd/argocd/commands/project.go:519-554 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 41+ corresponding lines) · ×1
Edited copies of one member (4 members, 41+ corresponding lines) cmd/argocd/commands/project.go:232— cmd/argocd/commands/project.go:232-274 | cmd/argocd/commands/project.go:557-598 | cmd/argocd/commands/project.go:789-830 | cmd/argocd/commands/projectwindows.go:57-97 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) cmd/argocd/commands/app.go:2649— cmd/argocd/commands/app.go:2649-2679 | cmd/util/app.go:550-580 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 31+ corresponding lines) · ×1
Edited copies of one member (6 members, 31+ corresponding lines) cmd/argocd/commands/account.go:264— cmd/argocd/commands/account.go:264-294 | cmd/argocd/commands/cluster.go:533-577 | cmd/argocd/commands/gpg.go:43-79 | cmd/argocd/commands/project.go:885-919 | cmd/argocd/commands/projectwindows.go:358-398 | cmd/argocd/commands/repocreds.go:279-319 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) pkg/apiclient/apiclient.go:1038— pkg/apiclient/apiclient.go:1038-1077 | pkg/apiclient/apiclient.go:1081-1121 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) cmd/argocd/commands/gpg.go:164— cmd/argocd/commands/gpg.go:164-192 | cmd/argocd/commands/repo.go:287-330 | cmd/argocd/commands/repocreds.go:223-256 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) applicationset/services/pull_request/github.go:24— applicationset/services/pull_request/github.go:24-57 | applicationset/services/scm_provider/github.go:23-50 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 22+ corresponding lines) · ×1
Edited copies of one member (5 members, 22+ corresponding lines) gitops-engine/pkg/utils/kube/ctl.go:188— gitops-engine/pkg/utils/kube/ctl.go:188-209 | gitops-engine/pkg/utils/kube/ctl.go:212-233 | gitops-engine/pkg/utils/kube/ctl.go:236-257 | gitops-engine/pkg/utils/kube/ctl.go:260-286 | gitops-engine/pkg/utils/kube/resource_ops.go:367-395 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 20+ corresponding lines) · ×1
Edited copies of one member (4 members, 20+ corresponding lines) applicationset/services/scm_provider/bitbucket_cloud.go:69— applicationset/services/scm_provider/bitbucket_cloud.go:69-92 | applicationset/services/scm_provider/bitbucket_server.go:137-156 | applicationset/services/scm_provider/github.go:52-71 | applicationset/services/scm_provider/gitlab.go:68-87 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) util/clusterauth/clusterauth.go:92— util/clusterauth/clusterauth.go:92-104 | util/clusterauth/clusterauth.go:106-118 | util/clusterauth/clusterauth.go:120-137 | util/clusterauth/clusterauth.go:139-156 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) server/repository/repository.go:604— server/repository/repository.go:604-621 | server/repository/repository.go:624-640 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) cmd/argocd/commands/cert.go:29— cmd/argocd/commands/cert.go:29-62 | cmd/argocd/commands/cluster.go:51-83 | cmd/argocd/commands/gpg.go:25-40 | cmd/argocd/commands/repo.go:27-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) applicationset/services/repo_service.go:77— applicationset/services/repo_service.go:77-99 | applicationset/services/repo_service.go:101-122 | applicationset/services/repo_service.go:124-141 | applicationset/services/repo_service.go:143-160 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) util/env/env.go:46— util/env/env.go:46-66 | util/env/env.go:71-91 | util/env/env.go:96-116 | util/env/env.go:123-148 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) server/certificate/certificate.go:31— server/certificate/certificate.go:31-44 | server/certificate/certificate.go:47-57 | server/certificate/certificate.go:60-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) gitops-engine/pkg/cache/cluster.go:344— gitops-engine/pkg/cache/cluster.go:344-355 | gitops-engine/pkg/cache/cluster.go:368-379 | gitops-engine/pkg/cache/cluster.go:392-403 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) util/kube/kube.go:101— util/kube/kube.go:101-113 | util/kube/kube.go:116-125 | util/kube/kube.go:128-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) cmd/argocd/commands/project.go:730— cmd/argocd/commands/project.go:730-741 | cmd/argocd/commands/project.go:744-755 | cmd/argocd/commands/project.go:758-769 | cmd/argocd/commands/project.go:772-786 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) server/application/application.go:2647— server/application/application.go:2647-2655 | server/applicationset/applicationset.go:612-620 | server/project/project.go:524-532 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) applicationset/services/pull_request/bitbucket_server.go:24— applicationset/services/pull_request/bitbucket_server.go:24-35 | applicationset/services/pull_request/bitbucket_server.go:37-45 | applicationset/services/scm_provider/bitbucket_server.go:24-35 | applicationset/services/scm_provider/bitbucket_server.go:37-45 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) util/db/repository.go:58— util/db/repository.go:58-71 | util/db/repository.go:73-85 | util/db/repository.go:207-217 | util/db/repository.go:219-231 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) REDACTED:105— REDACTED:105-111 | hack/gen-resources/generators/project_generator.go:43-49 | hack/gen-resources/generators/repo_generator.go:118-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) gitops-engine/pkg/utils/kube/kube.go:98— gitops-engine/pkg/utils/kube/kube.go:98-101 | gitops-engine/pkg/utils/kube/kubemeta/kube.go:109-112 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (64 lines × 2) REDACTED:429— REDACTED:429-492 | REDACTED:216-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (52–53 lines × 2) REDACTED:270— REDACTED:270-322 | REDACTED:557-608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (46 lines × 2) pkg/apis/application/v1alpha1/repository_types.go:158— pkg/apis/application/v1alpha1/repository_types.go:158-203 | pkg/apis/application/v1alpha1/repository_types.go:212-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/apis/application/v1alpha1/repository_types.go:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35 lines × 2) util/db/repository_secrets.go:368— util/db/repository_secrets.go:368-402 | util/db/repository_secrets.go:494-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 2) cmd/argocd/commands/app.go:2654— cmd/argocd/commands/app.go:2654-2679 | cmd/util/app.go:555-580 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:2654` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) gitops-engine/pkg/utils/kube/ctl.go:289— gitops-engine/pkg/utils/kube/ctl.go:289-313 | gitops-engine/pkg/utils/kube/ctl.go:320-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/utils/kube/ctl.go:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) applicationset/services/pull_request/github.go:26— applicationset/services/pull_request/github.go:26-49 | applicationset/services/scm_provider/github.go:25-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19–21 lines × 3) REDACTED:116— REDACTED:116-136 | REDACTED:279-297 | REDACTED:316-336 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:338` calls `GetInsecureSkipVerify` and `REDACTED:298` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) cmd/argocd/commands/app_resources.go:317— cmd/argocd/commands/app_resources.go:317-336 | cmd/argocd/commands/app_resources.go:386-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app_resources.go:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15–18 lines × 2) cmd/argocd/commands/app.go:2948— cmd/argocd/commands/app.go:2948-2965 | cmd/argocd/commands/app_diff.go:680-694 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:2948` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/app_diff.go:679` calls `getRefreshType` and `cmd/argocd/commands/app.go:2947` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 2) server/application/application.go:1712— server/application/application.go:1712-1729 | server/application/application.go:1773-1790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 3) cmd/argocd/commands/projectwindows.go:64— cmd/argocd/commands/projectwindows.go:64-79 | cmd/argocd/commands/projectwindows.go:264-279 | cmd/argocd/commands/projectwindows.go:317-332 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15–16 lines × 3) controller/appcontroller.go:1083— controller/appcontroller.go:1083-1098 | controller/appcontroller.go:2153-2167 | controller/appcontroller.go:2409-2423 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:1083` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–14 lines × 2) controller/cache/info.go:242— controller/cache/info.go:242-253 | controller/cache/info.go:450-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/cache/info.go:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 3) cmd/argocd/commands/app.go:3201— cmd/argocd/commands/app.go:3201-3213 | cmd/argocd/commands/app.go:3274-3285 | cmd/argocd/commands/app.go:3349-3360 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11–13 lines × 3) server/repository/repository.go:243— server/repository/repository.go:243-255 | server/repository/repository.go:264-276 | server/repository/repository.go:414-424 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12–13 lines × 2) cmd/argocd/commands/admin/cluster.go:379— cmd/argocd/commands/admin/cluster.go:379-390 | cmd/argocd/commands/admin/cluster.go:432-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) cmd/argocd/commands/app.go:445— cmd/argocd/commands/app.go:445-456 | cmd/argocd/commands/app.go:884-895 | cmd/argocd/commands/app.go:3287-3298 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–12 lines × 2) controller/appcontroller.go:1833— controller/appcontroller.go:1833-1841 | controller/appcontroller.go:1951-1962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:1833` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 10) cmd/argocd/commands/project.go:242— cmd/argocd/commands/project.go:242-252 | cmd/argocd/commands/project.go:486-495 | cmd/argocd/commands/project.go:528-537 | cmd/argocd/commands/project.go:566-575 | cmd/argocd/commands/project.go:798-807 | cmd/argocd/commands/project_role.go:234-243 | cmd/argocd/commands/project_role.go:271-280 | cmd/argocd/commands/project_role.go:335-344 | cmd/argocd/commands/project_role.go:403-413 | cmd/argocd/commands/project_role.go:588-597 — there are 10 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cmd/argocd/commands/project_role.go:282` calls `NewPrompt` and `cmd/argocd/commands/project.go:254` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 7) cmd/argocd/commands/app.go:3055— cmd/argocd/commands/app.go:3055-3063 | cmd/argocd/commands/app.go:3082-3091 | cmd/argocd/commands/app.go:3153-3161 | cmd/argocd/commands/app_actions.go:79-87 | cmd/argocd/commands/app_resources.go:73-83 | cmd/argocd/commands/app_resources.go:320-329 | cmd/argocd/commands/app_resources.go:389-398 — there are 7 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (17 lines × 3) gitops-engine/pkg/utils/kube/ctl.go:190— gitops-engine/pkg/utils/kube/ctl.go:190-206 | gitops-engine/pkg/utils/kube/ctl.go:214-230 | gitops-engine/pkg/utils/kube/ctl.go:238-254 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8–10 lines × 28) cmd/argocd/commands/account.go:426— cmd/argocd/commands/account.go:426-433 | cmd/argocd/commands/project.go:196-203 | cmd/argocd/commands/project.go:241-248 | cmd/argocd/commands/project.go:297-304 | cmd/argocd/commands/project.go:338-345 | cmd/argocd/commands/project.go:386-393 | cmd/argocd/commands/project.go:436-443 | cmd/argocd/commands/project.go:485-492 | cmd/argocd/commands/project.go:527-534 | cmd/argocd/commands/project.go:565-572 | cmd/argocd/commands/project.go:797-804 | cmd/argocd/commands/project.go:1080-1087 | cmd/argocd/commands/project.go:1121-1128 | cmd/argocd/commands/project.go:1193-1200 | cmd/argocd/commands/project.go:1245-1252 | cmd/argocd/commands/project_role.go:233-240 | cmd/argocd/commands/project_role.go:270-277 | cmd/argocd/commands/project_role.go:334-341 | cmd/argocd/commands/project_role.go:402-409 | cmd/argocd/commands/project_role.go:480-487 | cmd/argocd/commands/project_role.go:542-549 | cmd/argocd/commands/project_role.go:587-594 | cmd/argocd/commands/projectwindows.go:63-71 | cmd/argocd/commands/projectwindows.go:216-223 | cmd/argocd/commands/projectwindows.go:263-271 | cmd/argocd/commands/projectwindows.go:316-324 | cmd/argocd/commands/projectwindows.go:372-379 | cmd/argocd/commands/repo.go:449-458 — there are 28 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 28 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:426` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/project.go:191` calls `Examples` and `cmd/argocd/commands/project_role.go:268` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 10) cmd/argocd/commands/project.go:245— cmd/argocd/commands/project.go:245-254 | cmd/argocd/commands/project.go:489-497 | cmd/argocd/commands/project.go:531-539 | cmd/argocd/commands/project.go:569-577 | cmd/argocd/commands/project.go:801-809 | cmd/argocd/commands/project_role.go:105-113 | cmd/argocd/commands/project_role.go:180-188 | cmd/argocd/commands/project_role.go:237-245 | cmd/argocd/commands/project_role.go:406-415 | cmd/argocd/commands/project_role.go:591-599 — there are 10 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project.go:245` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9–10 lines × 2) server/application/application.go:1057— server/application/application.go:1057-1066 | server/applicationset/applicationset.go:398-406 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–9 lines × 5) cmd/argocd/commands/project.go:161— cmd/argocd/commands/project.go:161-169 | cmd/argocd/commands/project.go:1125-1132 | cmd/argocd/commands/project_role.go:546-554 | cmd/argocd/commands/projectwindows.go:220-228 | cmd/argocd/commands/projectwindows.go:376-384 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project.go:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 5) commitserver/commit/hydratorhelper.go:160— commitserver/commit/hydratorhelper.go:160-168 | util/sourceintegrity/gpg.go:126-134 | util/sourceintegrity/gpg.go:222-230 | util/sourceintegrity/gpg.go:249-257 | util/sourceintegrity/gpg.go:373-381 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `util/sourceintegrity/gpg.go:372` calls `Remove`, `Name` and `util/sourceintegrity/gpg.go:220` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 3) cmd/argocd/commands/account.go:91— cmd/argocd/commands/account.go:91-98 | cmd/argocd/commands/app.go:3194-3201 | cmd/argocd/commands/app.go:3341-3349 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) server/application/application.go:723— server/application/application.go:723-731 | server/application/application.go:868-875 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–8 lines × 14) cmd/argocd/commands/project.go:248— cmd/argocd/commands/project.go:248-255 | cmd/argocd/commands/project.go:346-352 | cmd/argocd/commands/project.go:394-400 | cmd/argocd/commands/project.go:444-450 | cmd/argocd/commands/project.go:492-498 | cmd/argocd/commands/project.go:534-540 | cmd/argocd/commands/project.go:572-578 | cmd/argocd/commands/project.go:804-810 | cmd/argocd/commands/project.go:1254-1260 | cmd/argocd/commands/project_role.go:108-114 | cmd/argocd/commands/project_role.go:183-189 | cmd/argocd/commands/project_role.go:240-246 | cmd/argocd/commands/project_role.go:409-416 | cmd/argocd/commands/project_role.go:594-600 — there are 14 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 5) cmd/argocd/commands/app.go:579— cmd/argocd/commands/app.go:579-586 | cmd/argocd/commands/applicationset.go:90-97 | cmd/argocd/commands/applicationset.go:153-160 | cmd/argocd/commands/applicationset.go:262-269 | cmd/argocd/commands/applicationset.go:392-399 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:579` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) cmd/argocd/commands/projectwindows.go:62— cmd/argocd/commands/projectwindows.go:62-69 | cmd/argocd/commands/repo.go:117-124 | cmd/argocd/commands/repo.go:448-455 | cmd/argocd/commands/repocreds.go:98-105 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/projectwindows.go:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–8 lines × 2) cmd/argocd/commands/app_resources.go:80— cmd/argocd/commands/app_resources.go:80-87 | cmd/argocd/commands/app_resources.go:562-567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app_resources.go:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (4–8 lines × 3) REDACTED:3367— REDACTED:3367-3374 | REDACTED:3439-3446 | REDACTED:3513-3516 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3367` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 11) cmd/argocd/commands/account.go:171— cmd/argocd/commands/account.go:171-177 | cmd/argocd/commands/account.go:227-233 | cmd/argocd/commands/app.go:869-875 | cmd/argocd/commands/app.go:2753-2759 | cmd/argocd/commands/app.go:3054-3060 | cmd/argocd/commands/app.go:3081-3087 | cmd/argocd/commands/app.go:3152-3158 | cmd/argocd/commands/cluster.go:586-592 | cmd/argocd/commands/project_role.go:641-647 | cmd/argocd/commands/project_role.go:672-678 | cmd/argocd/commands/relogin.go:36-42 — there are 11 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 11 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/account.go:164` calls `Examples` and `cmd/argocd/commands/app.go:2752` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 9) cmd/argocd/commands/app.go:870— cmd/argocd/commands/app.go:870-876 | cmd/argocd/commands/app.go:3055-3061 | cmd/argocd/commands/app.go:3082-3089 | cmd/argocd/commands/app.go:3153-3159 | cmd/argocd/commands/app_actions.go:79-85 | cmd/argocd/commands/app_actions.go:173-179 | cmd/argocd/commands/app_resources.go:73-80 | cmd/argocd/commands/app_resources.go:320-326 | cmd/argocd/commands/app_resources.go:389-395 — there are 9 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/app.go:852` calls `Examples` and `cmd/argocd/commands/app.go:3053` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 8) cmd/argocd/commands/app.go:579— cmd/argocd/commands/app.go:579-585 | cmd/argocd/commands/applicationset.go:90-96 | cmd/argocd/commands/applicationset.go:153-159 | cmd/argocd/commands/applicationset.go:262-268 | cmd/argocd/commands/applicationset.go:392-398 | cmd/argocd/commands/project.go:157-163 | cmd/argocd/commands/project.go:841-847 | cmd/argocd/commands/repocreds.go:231-237 — there are 8 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:579` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 32) cmd/argocd/commands/account.go:91— cmd/argocd/commands/account.go:91-97 | cmd/argocd/commands/account.go:426-432 | cmd/argocd/commands/app.go:3194-3199 | cmd/argocd/commands/app.go:3341-3347 | cmd/argocd/commands/app_resources.go:555-560 | cmd/argocd/commands/project.go:196-202 | cmd/argocd/commands/project.go:241-247 | cmd/argocd/commands/project.go:297-303 | cmd/argocd/commands/project.go:338-344 | cmd/argocd/commands/project.go:386-392 | cmd/argocd/commands/project.go:436-442 | cmd/argocd/commands/project.go:485-491 | cmd/argocd/commands/project.go:527-533 | cmd/argocd/commands/project.go:565-571 | cmd/argocd/commands/project.go:797-803 | cmd/argocd/commands/project.go:1080-1086 | cmd/argocd/commands/project.go:1121-1127 | cmd/argocd/commands/project.go:1193-1199 | cmd/argocd/commands/project.go:1245-1251 | cmd/argocd/commands/project_role.go:233-239 | cmd/argocd/commands/project_role.go:270-276 | cmd/argocd/commands/project_role.go:334-340 | cmd/argocd/commands/project_role.go:402-408 | cmd/argocd/commands/project_role.go:480-486 | cmd/argocd/commands/project_role.go:542-548 | cmd/argocd/commands/project_role.go:587-593 | cmd/argocd/commands/projectwindows.go:63-69 | cmd/argocd/commands/projectwindows.go:216-222 | cmd/argocd/commands/projectwindows.go:263-269 | cmd/argocd/commands/projectwindows.go:316-322 | cmd/argocd/commands/projectwindows.go:372-378 | cmd/argocd/commands/repo.go:449-455 — there are 32 copies across 7 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 32 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/app_resources.go:542` calls `Examples` and `cmd/argocd/commands/app.go:3340` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 18) cmd/argocd/commands/account.go:171— cmd/argocd/commands/account.go:171-177 | cmd/argocd/commands/account.go:227-233 | cmd/argocd/commands/app.go:869-875 | cmd/argocd/commands/app_resources.go:555-560 | cmd/argocd/commands/project.go:297-303 | cmd/argocd/commands/project.go:338-344 | cmd/argocd/commands/project.go:386-392 | cmd/argocd/commands/project.go:436-442 | cmd/argocd/commands/project.go:485-491 | cmd/argocd/commands/project.go:527-533 | cmd/argocd/commands/project.go:565-571 | cmd/argocd/commands/project.go:797-803 | cmd/argocd/commands/project.go:1080-1086 | cmd/argocd/commands/project.go:1121-1127 | cmd/argocd/commands/project.go:1193-1199 | cmd/argocd/commands/project.go:1245-1251 | cmd/argocd/commands/project_role.go:233-239 | cmd/argocd/commands/project_role.go:542-548 — there are 18 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 18 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cmd/argocd/commands/project.go:306` calls `buildApplicationDestination` and `cmd/argocd/commands/project.go:494` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 5) cmd/argocd/commands/app.go:2809— cmd/argocd/commands/app.go:2809-2814 | cmd/argocd/commands/cluster.go:356-362 | cmd/argocd/commands/cluster.go:437-443 | cmd/argocd/commands/repo.go:305-311 | cmd/argocd/commands/repocreds.go:231-237 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:2809` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/repocreds.go:227` calls `Examples` and `cmd/argocd/commands/app.go:2808` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–6 lines × 4) controller/appcontroller.go:504— controller/appcontroller.go:504-509 | controller/appcontroller.go:561-566 | controller/appcontroller.go:693-698 | REDACTED:453-456 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:504` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6 lines × 3) controller/appcontroller.go:1108— controller/appcontroller.go:1108-1113 | controller/appcontroller.go:1638-1643 | controller/appcontroller.go:2987-2992 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/appcontroller.go:1108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (5 lines × 5) cmd/argocd/commands/project.go:211— cmd/argocd/commands/project.go:211-215 | cmd/argocd/commands/project.go:307-311 | cmd/argocd/commands/project.go:494-498 | cmd/argocd/commands/project.go:536-540 | cmd/argocd/commands/project.go:1214-1218 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `cmd/argocd/commands/project.go:306` calls `buildApplicationDestination` and `cmd/argocd/commands/project.go:493` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 14) cmd/argocd/commands/account.go:84— cmd/argocd/commands/account.go:84-96 | cmd/argocd/commands/account.go:421-431 | cmd/argocd/commands/app.go:969-989 | cmd/argocd/commands/app.go:3147-3157 | cmd/argocd/commands/app.go:3192-3198 | cmd/argocd/commands/app.go:3257-3267 | cmd/argocd/commands/cluster.go:270-277 | cmd/argocd/commands/cluster.go:584-591 | cmd/argocd/commands/project_role.go:269-275 | cmd/argocd/commands/project_role.go:577-592 | cmd/argocd/commands/projectwindows.go:196-221 | cmd/argocd/commands/projectwindows.go:257-268 | cmd/argocd/commands/projectwindows.go:312-321 | cmd/argocd/commands/projectwindows.go:363-377 — there are 14 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–22 lines × 2) REDACTED:512— REDACTED:512-533 | REDACTED:549-564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:512` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: github.com/argoproj/argo-cd/gitops-engine/v3 — github.com/argoproj/argo-cd/gitops-engine/v3: abstractness 0.20, instability 0.00, distance 0.80 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Duplicated predicate cmd/argocd-application-controller/commands/argocd_application_controller.go:161— `!repoServerPlaintext && repoServerStrictTLS && tlsConfig.Certificates == nil` appears character-identically in 2 files — cmd/argocd-application-controller/commands/argocd_application_controller.go, cmd/argocd-server/commands/argocd_server.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:129— `!tlsConfig.DisableTLS && tlsConfig.StrictValidation && tlsConfig.Certificates == nil` appears character-identically in 2 files — REDACTED, cmd/argocd/commands/admin/notifications.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/admin/repo.go:123— `(repoOpts.TlsClientCertPath != "" && repoOpts.TlsClientCertKeyPath == "") || (repoOpts.TlsClientCertPath == "" && repoOpts.TlsClientCertKeyP…` appears character-identically in 2 files — cmd/argocd/commands/admin/repo.go, cmd/argocd/commands/repo.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:976— `apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsServerTimeout(err) || apierrors.IsTooManyRequests(err) || utilnet.…` appears character-identically in 2 files — REDACTED, util/kube/failureretrywrapper.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate util/webhook/registry.go:85— `app.Namespace == a.ns || glob.MatchStringInList(a.appNs, app.Namespace, glob.REGEXP)` appears character-identically in 2 files — util/webhook/registry.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:711— `app.Spec.SyncPolicy != nil && app.Spec.SyncPolicy.IsAutomatedSyncEnabled()` appears character-identically in 2 files — cmd/argocd/commands/app.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:1488— `app.Spec.SyncPolicy == nil || !app.Spec.SyncPolicy.IsAutomatedSyncEnabled()` appears character-identically in 2 files — cmd/argocd/commands/app.go, controller/appcontroller.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate controller/appcontroller.go:3071— `app.Status.OperationState != nil && app.Status.OperationState.Operation.Sync != nil` appears character-identically in 2 files — controller/appcontroller.go, pkg/apiclient/application/forwarder_overwrite.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:2222— `app.Status.OperationState != nil && app.Status.OperationState.SyncResult != nil` appears character-identically in 2 files — cmd/argocd/commands/app.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/admin/cluster.go:619— `clusterOpts.InCluster && clusterOpts.ClusterEndpoint != ""` appears character-identically in 2 files — cmd/argocd/commands/admin/cluster.go, cmd/argocd/commands/cluster.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:594— `err != nil && !apierrors.IsNotFound(err)` appears character-identically in 5 files — REDACTED, cmd/argocd/commands/admin/backup.go, REDACTED, gitops-engine/pkg/sync/sync_context.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:1463— `err != nil && !errors.Is(err, fs.ErrNotExist)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/util/app.go:615— `err != nil || (parsedURL.Scheme != "http" && parsedURL.Scheme != "https")` appears character-identically in 3 files — cmd/util/app.go, cmd/util/applicationset.go, cmd/util/project.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:1300— `isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd())` appears character-identically in 3 files — cmd/argocd/commands/app.go, cmd/argocd/commands/applicationset.go, cmd/argocd/commands/cluster.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate applicationset/services/internal/github_app/client.go:25— `len(httpClient) > 0 && httpClient[0] != nil && httpClient[0].Transport != nil` appears character-identically in 2 files — applicationset/services/internal/github_app/client.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:1302— `promptFlag.Changed && promptFlag.Value.String() == "true"` appears character-identically in 2 files — cmd/argocd/commands/app.go, cmd/argocd/commands/applicationset.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/app.go:268— `reflect.DeepEqual(appRes.Spec, appReq.Spec) && reflect.DeepEqual(appRes.Labels, appReq.Labels) && reflect.DeepEqual(appRes.Annotations, appR…` appears character-identically in 2 files — cmd/argocd/commands/app.go, cmd/argocd/commands/applicationset.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate commitserver/commit/credentialtypehelper.go:16— `repo.GithubAppPrivateKey != "" && repo.GithubAppId != 0` appears character-identically in 2 files — commitserver/commit/credentialtypehelper.go, pkg/apis/application/v1alpha1/repository_types.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/admin/repo.go:154— `repoOpts.Repo.Type == "helm" && repoOpts.Repo.Name == ""` appears character-identically in 2 files — cmd/argocd/commands/admin/repo.go, cmd/argocd/commands/repo.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd/commands/admin/repo.go:160— `repoOpts.Repo.Username != "" && repoOpts.Repo.Password == ""` appears character-identically in 2 files — cmd/argocd/commands/admin/repo.go, cmd/argocd/commands/repo.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate controller/appcontroller.go:816— `res.Kind == kube.SecretKind && res.Group == ""` appears character-identically in 2 files — controller/appcontroller.go, server/application/application.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:62— `resp != nil && resp.StatusCode == http.StatusNotFound` appears character-identically in 6 files — REDACTED, applicationset/services/pull_request/github.go, applicationset/services/pull_request/gitlab.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/argocd-application-controller/commands/argocd_application_controller.go:157— `tlsConfig.StrictValidation || repoServerStrictTLS` appears character-identically in 2 files — cmd/argocd-application-controller/commands/argocd_application_controller.go, cmd/argocd-server/commands/argocd_server.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ui/src/app/applications/components/application-details/application-resource-list.tsx:160— `!!managedByURL && !isValidManagedByURL(managedByURL)` appears character-identically in 2 files — ui/src/app/applications/components/application-details/application-resource-list.tsx, ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ui/src/app/shared/components/editable-panel/editable-panel.tsx:188— `!isSaving && formApiRef.current?.submitForm(null)` appears character-identically in 2 files — ui/src/app/shared/components/editable-panel/editable-panel.tsx, ui/src/app/shared/components/editable-panel/editable-section.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file applicationset/services/scm_provider/aws_codecommit.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmd/argocd/commands/admin/admin.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/bitbucket_server.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file util/oidc/oidc_azure.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/azure_devops.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmd/argocd/commands/completion.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/gitlab.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file controller/sharding/consistent/consistent.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/controllers/clustereventhandler.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/rbacpolicy/rbacpolicy.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/bitbucket_cloud.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/utils.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmd/argocd/commands/admin/project_allowlist.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/scm_provider/github.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmpserver/server.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmd/argocd-cmp-server/commands/argocd_cmp_server.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/pull_request/bitbucket_server.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file util/password/password.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file cmd/argocd/commands/context.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file util/versions/tags.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file hack/gen-resources/util/sizedwaitgroup.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file applicationset/services/internal/http/client.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
No seccomp profile REDACTED:3— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:31— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:36— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile manifests/ha/base/controller-deployment/argocd-application-controller-statefulset.yaml:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile manifests/ha/base/overlays/argocd-application-controller-statefulset.yaml:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile manifests/ha/base/overlays/argocd-repo-server-deployment.yaml:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile manifests/ha/base/overlays/argocd-server-deployment.yaml:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
Silent fallback default on error util/argo/resource_tracking.go:72— `GetAppName` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error util/cert/cert.go:348— `GetCertBundlePathForRepository` turns a non-nil `err` into `return "", nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error util/git/git.go:86— `NormalizeGitURL` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Mock-dominated test: only reports a refresh as successful when the refetch succeeds ui/src/app/settings/components/repos-list/repos-list.test.tsx:125— This test sets up 3 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: notifies when removing a certificate fails ui/src/app/settings/components/certs-list/certs-list.test.tsx:73— This test sets up 3 test doubles (for example `jest.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: REDACTED, gitops-engine/pkg/utils/kube/kubemeta/kube.go, gitops-engine/pkg/utils/kube/kubemeta/internal/benchfixtures/fixtures.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 7 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (12 single-owned of 303 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 303 of the 490 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) (+1 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: util/manifeststream/stream.go, util/tgzstream/stream.go, util/kustomize/gitwrapper.go, util/kustomize/helmwrapper.go, util/webhook/push.go, util/webhook/harbor.go, applicationset/utils/template_functions.go, util/cache/twolevelclient.go (+1 more).
No ADRs found Procfile:1— No ADRs found. The recognised ADR directories in this tree were read — `applicationset/examples/design-doc`, `applicationset/examples/design-doc/proposal`, `docs/proposals` — and none of their files is a decision record (a README, index or template page does not count). What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `Procfile` makes this repository a deployable product (line 1).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (100998 LoC, 1337 module-visible types across 265 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D30 · Dependency Vulnerabilities· Stale vulnerability suppression · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 34 of 303 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 303 of the 490 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: applicationset/services/scm_provider/aws_codecommit.go, REDACTED, cmd/argocd/commands/admin/admin.go, applicationset/services/scm_provider/bitbucket_server.go, util/oidc/oidc_azure.go, applicationset/services/scm_provider/azure_devops.go, cmd/argocd/commands/completion.go, applicationset/services/scm_provider/gitlab.go (and 26 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No runtime threat detection — No runtime threat-detection engine (Tetragon TracingPolicy / Falco) is committed. These observe process, file and network activity in-kernel and can alert or kill on malicious behaviour a static scan cannot catch.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `hack/get-previous-release`.
No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 8/10 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Silent fallback default in catch docs/assets/versions.js:42— `getStableDocsUrlForCurrentPage` swallows every exception into `return 'https://argo-cd.readthedocs.io/en/stable/'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Outdated: github.com/Masterminds/semver/v3 — `github.com/Masterminds/semver/v3` is required at v3.4.0 in REDACTED, but v3.5.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/Masterminds/semver/v3@v3.5.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2 — `github.com/aws/aws-sdk-go-v2` is required at v1.47.8 in REDACTED, but v1.48.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2@v1.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/config — `github.com/aws/aws-sdk-go-v2/config` is required at v1.33.17 in REDACTED, but v1.33.18 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/config@v1.33.18 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/credentials — `github.com/aws/aws-sdk-go-v2/credentials` is required at v1.20.17 in REDACTED, but v1.21.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/credentials@v1.21.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/codecommit — `github.com/aws/aws-sdk-go-v2/service/codecommit` is required at v1.44.6 in REDACTED, but v1.44.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/codecommit@v1.44.7 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi — `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi` is required at v1.41.11 in REDACTED, but v1.42.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi@v1.42.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/sts — `github.com/aws/aws-sdk-go-v2/service/sts` is required at v1.51.9 in REDACTED, but v1.52.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/sts@v1.52.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-git/go-git/v5 — `github.com/go-git/go-git/v5` is required at v5.19.2 in REDACTED, but v5.19.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-git/go-git/v5@v5.19.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-logr/logr — `github.com/go-logr/logr` is required at v1.4.3 in REDACTED, but v1.4.4 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-logr/logr@v1.4.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-openapi/runtime/server-middleware — `github.com/go-openapi/runtime/server-middleware` is required at v0.33.3 in REDACTED, but v0.33.4 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-openapi/runtime/server-middleware@v0.33.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/google/gnostic-models — `github.com/google/gnostic-models` is required at v0.7.0 in REDACTED, but v0.7.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/google/gnostic-models@v0.7.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/klauspost/compress — `github.com/klauspost/compress` is required at v1.19.0 in REDACTED, but v1.20.4 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/klauspost/compress@v1.20.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/spf13/pflag — `github.com/spf13/pflag` is required at v1.0.10 in REDACTED, but v1.1.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/spf13/pflag@v1.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.9.0 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/otel — `go.opentelemetry.io/otel` is required at v1.44.0 in REDACTED, but v1.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/otel@v1.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.58.0 in REDACTED, but v0.59.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/crypto@v0.59.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/mod — `golang.org/x/mod` is required at v0.21.0 in REDACTED, but v0.43.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/mod@v0.43.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sync — `golang.org/x/sync` is required at v0.22.0 in REDACTED, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sync@v0.25.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/term — `golang.org/x/term` is required at v0.47.0 in REDACTED, but v0.48.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/term@v0.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: google.golang.org/protobuf — `google.golang.org/protobuf` is required at v1.36.12-0.20260120151049-f2248ac996af in REDACTED, but v1.36.12 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get google.golang.org/protobuf@v1.36.12 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: k8s.io/kubernetes — `k8s.io/kubernetes` is required at v1.37.0 in REDACTED, but v1.37.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get k8s.io/kubernetes@v1.37.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: k8s.io/streaming — `k8s.io/streaming` is required at v0.37.0 in REDACTED, but v0.37.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get k8s.io/streaming@v0.37.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: sigs.k8s.io/kustomize/api — `sigs.k8s.io/kustomize/api` is required at v0.21.2 in REDACTED, but v0.21.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get sigs.k8s.io/kustomize/api@v0.21.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Skipped (documented): (unnamed test) ui/src/app/applications/components/pod-terminal-viewer/pod-terminal-viewer.test.tsx:35— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `controller/appcontroller.go`, `server/application/application.go` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
Run 01a1d530-5630-7dc6-a311-c8c9e0873014 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 113 · Warnings: 1661 · Recommendations: 257 · Info: 25 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 13:54 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.