Public report of argoproj/argo-cd, published 24 October 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 report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 24 October 2026, 05:05 UTC · Survey ID cd_2fa6f07deecc43e0ae80df067e96da4e

argoproj/argo-cd

Measured 24 October 2026, 04:46 UTC, at code version 1fd5e6e

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 56out of 100 At risk Down 1 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: 110,926 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Accessibility, 43

Findings by how serious they are

111 critical 1486 serious 265 minor

19 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 04:46 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 Watchdog. It is open to any tool that implements it, and today Watchdog 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. Watchdog works 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 ▸

71of 74 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
1813of 1862 findings point to an exact file and line, so you can open each one in the code. The other 49 concern the repository as a whole, such as missing documentation.
74dimensions across 7 lenses, read from 110,926 lines of product code in 4 projects.
Chapters

Executive summary

argoproj/argo-cd scores 56 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Accessibility, which scores 43 and is rated Weak. Its Keyboard semantics dimension scores 1.2 out of 10, and until that reaches 4, Accessibility can't be rated higher than Adequate. The first actions are to make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href and to enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI, and if Accessibility rose to 70, the score would rise from 56 to about 66.

111 findings are critical: 35 in Forms & labels, 27 in IaC & Container Security, 21 in Keyboard semantics, 12 in Static Analysis (SAST), nine in Dependency Vulnerabilities, six in Secrets (history) and one in Text alternatives.

Watchdog couldn't measure 19 dimensions in this code, among them Code Coverage, Test Reliability and License Compliance, so they are left out of the score. The product code is 110,926 lines, which would take an estimated 2.1 person-years, around €310,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 for The 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.
Accessibility 43 · counts for 46%Security and Compliance 64 · counts for 25%Production Readiness 65 · counts for 14%Maturity 72 · counts for 8%Performance 77 · counts for 4%Architecture 77 · counts for 2%Code Health 78 · counts for 1%

If Accessibility rose from 43 to 70, the lowest score rated Strong, the score would rise from 56 to about 66.

Code composition: what the lines of code are
Product code 37%Tests 63%
New since the last survey: 38 findings

These 38 critical or serious findings weren't in the previous survey, on 10 October 2026.

Watchdog compares 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: 159 findings

These 159 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · main.main (cyclomatic 17) cmd/main.go
  • Cyclomatic Complexity · ApplicationController.setOperationState (cyclomatic 17) controller/appcontroller.go
  • Cyclomatic Complexity · nativeGitClient.getRefs (cyclomatic 17) REDACTED
  • Cognitive Complexity · nativeGitClient.getRefs (cognitive 23) REDACTED
  • Cognitive Complexity · nativeGitClient.lsRemote (cognitive 21) REDACTED
  • Cognitive Complexity · diff.removeWebhookMutation (cognitive 16) REDACTED
  • 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
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: cmd/argocd/commands/admin/cluster.go cmd/argocd/commands/admin/cluster.go
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: cmd/argocd-server/commands/argocd_server.go cmd/argocd-server/commands/argocd_server.go
  • Churn × Complexity Hotspots · Hotspot: util/webhook/registry.go util/webhook/registry.go
  • Churn × Complexity Hotspots · Repeated repair: applicationset/utils/createOrUpdate.go applicationset/utils/createOrUpdate.go
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: GO-2026-6599 REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) util/grpc/logging.go
  • Exception handling · Swallowed exception (caught, then discarded) util/grpc/logging.go
  • Exception handling · Swallowed exception (caught, then discarded) util/jwt/jwt.go
  • Exception handling · Swallowed exception (caught, then discarded) util/localconfig/localconfig.go
  • Exception handling · Swallowed exception (caught, then discarded) util/log/logrus.go
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Forms & labels · <select> without a programmatic label ui/src/app/applications/components/pod-logs-viewer/since-seconds-selector.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
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/applications-list/view-type-switcher.tsx
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/applications/components/filter/filter.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/filter/filter.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/pod-logs-viewer/pod-logs-highlight-button.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/pod-logs-viewer/pod-logs-highlight-button.tsx
  • Keyboard semantics · Click handler on a non-interactive <span> ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/applications/components/pod-terminal-viewer/pod-terminal-viewer.tsx
  • Keyboard semantics · Anchor without href ui/src/app/applications/components/resource-details/appset-resource-details.tsx
  • Keyboard semantics · Click handler on a non-interactive <li> ui/src/app/applications/components/utils.tsx
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/resources/components/resources-list/resources-list.tsx
  • Keyboard semantics · Click handler on a non-interactive <i> ui/src/app/resources/components/resources-list/resources-list.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/resources/components/resources-list/resources-table.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/resources/components/resources-list/resources-table.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/resources/components/resources-list/resources-table.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/resources/components/resources-list/resources-table.tsx
  • Keyboard semantics · Click handler on a non-interactive <div> ui/src/app/resources/components/resources-list/resources-table.tsx
Rebuild cost: about €310,000 · Estimate
Cost to rebuild€100,000 to €510,000, for 1,698 to 5,386 hours of work, about 2.1 person-years for 1 to 4 engineers
Difficulty of the problemStandard, 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 56. 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.
SizeLarge: 110,926 lines of product code

How the estimate is made: Watchdog prices 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.
Raises the score by about 7 points · Medium effort · Keyboard semantics
2
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Raises the score by about 3 points · Medium effort · A11y enforcement
3
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 2 points · Medium effort · Forms & labels

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 €310,000 to build again, about 2.1 person-years of work. Its weakest lens is Accessibility, at 43 (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 7 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 Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 3,447,464 lines over the last 90 days, which is about 13,981,382 lines a year. At that pace, the extra work comes to an estimated 1381 to 8286.2 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 Watchdog's 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; 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 — a layering smell or cycle. A clean layered graph has none.

arch github.com/argoproj/argo-cd/get-previous-release get-previous-release github.com/argoproj/argo-cd/gitops-engine/v3 v3 github.com/argoproj/argo-cd/v3 v3 github.com/argoproj/argo-cd/v3->github.com/argoproj/argo-cd/gitops-engine/v3

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.

408 modules, with 522 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; 368 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.
uses →1 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health2 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube3 github.com/argoproj/argo-cd/v3/util/cache4 github.com/argoproj/argo-cd/v3/util/git5 github.com/argoproj/argo-cd/v3/util/io6 github.com/argoproj/argo-cd/v3/util/rbac7 ui.src.app.shared.context8 ui.src.app.shared.models9 ui.src.app.shared.services.view-preferences-service10 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache11 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common12 github.com/argoproj/argo-cd/v3/reposerver/apiclient13 github.com/argoproj/argo-cd/v3/reposerver/cache14 ui.src.app.applications.components.applications-list.applications-filter15 ui.src.app.resources.components.resources-list16 ui.src.app.shared.services17 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync18 github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha119 ui.src.app.applications.components.applications-list20 github.com/argoproj/argo-cd/v3/reposerver/repository21 github.com/argoproj/argo-cd/v3/server/cache22 github.com/argoproj/argo-cd/v3/util/argo/normalizers23 github.com/argoproj/argo-cd/v3/util/db24 github.com/argoproj/argo-cd/v3/cmd/argocd/commands25 github.com/argoproj/argo-cd/v3/controller/metrics26 github.com/argoproj/argo-cd/v3/util/webhook27 github.com/argoproj/argo-cd/v3/util/settings28 github.com/argoproj/argo-cd/v3/applicationset/utils29 github.com/argoproj/argo-cd/v3/util/argo30 github.com/argoproj/argo-cd/v3/util/notification/argocd31 github.com/argoproj/argo-cd/v3/util/session32 github.com/argoproj/argo-cd/v3/applicationset/generators33 github.com/argoproj/argo-cd/v3/controller/cache34 github.com/argoproj/argo-cd/v3/server/application35 github.com/argoproj/argo-cd/v3/server/extension36 github.com/argoproj/argo-cd/v3/server/project37 github.com/argoproj/argo-cd/v3/applicationset/controllers38 github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin39 github.com/argoproj/argo-cd/v3/controller40 github.com/argoproj/argo-cd/v3/server
1 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health
2 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube
3 github.com/argoproj/argo-cd/v3/util/cache
4 github.com/argoproj/argo-cd/v3/util/git
5 github.com/argoproj/argo-cd/v3/util/io
6 github.com/argoproj/argo-cd/v3/util/rbac
7 ui.src.app.shared.context
8 ui.src.app.shared.models
9 ui.src.app.shared.services.view-preferences-service
10 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache26
11 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common1
12 github.com/argoproj/argo-cd/v3/reposerver/apiclient2
13 github.com/argoproj/argo-cd/v3/reposerver/cache3115
14 ui.src.app.applications.components.applications-list.applications-filter2
15 ui.src.app.resources.components.resources-list152
16 ui.src.app.shared.services11
17 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync2818
18 github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha121261
19 ui.src.app.applications.components.applications-list452
20 github.com/argoproj/argo-cd/v3/reposerver/repository32320
21 github.com/argoproj/argo-cd/v3/server/cache24
22 github.com/argoproj/argo-cd/v3/util/argo/normalizers2
23 github.com/argoproj/argo-cd/v3/util/db151
24 github.com/argoproj/argo-cd/v3/cmd/argocd/commands13251
25 github.com/argoproj/argo-cd/v3/controller/metrics1271
26 github.com/argoproj/argo-cd/v3/util/webhook25222
27 github.com/argoproj/argo-cd/v3/util/settings111
28 github.com/argoproj/argo-cd/v3/applicationset/utils1511
29 github.com/argoproj/argo-cd/v3/util/argo2112611
30 github.com/argoproj/argo-cd/v3/util/notification/argocd121
31 github.com/argoproj/argo-cd/v3/util/session2
32 github.com/argoproj/argo-cd/v3/applicationset/generators5221
33 github.com/argoproj/argo-cd/v3/controller/cache1381322222
34 github.com/argoproj/argo-cd/v3/server/application3122923213
35 github.com/argoproj/argo-cd/v3/server/extension9262
36 github.com/argoproj/argo-cd/v3/server/project32212
37 github.com/argoproj/argo-cd/v3/applicationset/controllers91111
38 github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin111311131
39 github.com/argoproj/argo-cd/v3/controller29212151345353
40 github.com/argoproj/argo-cd/v3/server111152211
Uses a module listed above itPart of a loopThe module itself
1 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/health2 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube3 github.com/argoproj/argo-cd/v3/util/cache4 github.com/argoproj/argo-cd/v3/util/git5 github.com/argoproj/argo-cd/v3/util/io6 github.com/argoproj/argo-cd/v3/util/rbac7 ui.src.app.shared.context8 ui.src.app.shared.models9 ui.src.app.shared.services.view-preferences-service10 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache11 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common12 github.com/argoproj/argo-cd/v3/reposerver/apiclient13 github.com/argoproj/argo-cd/v3/reposerver/cache14 ui.src.app.applications.components.applications-list.applications-filter15 ui.src.app.resources.components.resources-list16 ui.src.app.shared.services17 github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync18 github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha119 ui.src.app.applications.components.applications-list20 github.com/argoproj/argo-cd/v3/reposerver/repository21 github.com/argoproj/argo-cd/v3/server/cache22 github.com/argoproj/argo-cd/v3/util/argo/normalizers23 github.com/argoproj/argo-cd/v3/util/db24 github.com/argoproj/argo-cd/v3/cmd/argocd/commands25 github.com/argoproj/argo-cd/v3/controller/metrics26 github.com/argoproj/argo-cd/v3/util/webhook27 github.com/argoproj/argo-cd/v3/util/settings28 github.com/argoproj/argo-cd/v3/applicationset/utils29 github.com/argoproj/argo-cd/v3/util/argo30 github.com/argoproj/argo-cd/v3/util/notification/argocd31 github.com/argoproj/argo-cd/v3/util/session32 github.com/argoproj/argo-cd/v3/applicationset/generators33 github.com/argoproj/argo-cd/v3/controller/cache34 github.com/argoproj/argo-cd/v3/server/application35 github.com/argoproj/argo-cd/v3/server/extension36 github.com/argoproj/argo-cd/v3/server/project37 github.com/argoproj/argo-cd/v3/applicationset/controllers38 github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin39 github.com/argoproj/argo-cd/v3/controller40 github.com/argoproj/argo-cd/v3/servergithub.com/argoproj/argo-cd/gitops-engine/v3/pkg/health1github.com/argoproj/argo-cd/gitops-engine/v3/pkg/utils/kube2github.com/argoproj/argo-cd/v3/util/cache3github.com/argoproj/argo-cd/v3/util/git4github.com/argoproj/argo-cd/v3/util/io5github.com/argoproj/argo-cd/v3/util/rbac6ui.src.app.shared.context7ui.src.app.shared.models8ui.src.app.shared.services.view-preferences-service9github.com/argoproj/argo-cd/gitops-engine/v3/pkg/cache10github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync/common11github.com/argoproj/argo-cd/v3/reposerver/apiclient12github.com/argoproj/argo-cd/v3/reposerver/cache13ui.src.app.applications.components.applications-list.applications-filter14ui.src.app.resources.components.resources-list15ui.src.app.shared.services16github.com/argoproj/argo-cd/gitops-engine/v3/pkg/sync17github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha118ui.src.app.applications.components.applications-list19github.com/argoproj/argo-cd/v3/reposerver/repository20github.com/argoproj/argo-cd/v3/server/cache21github.com/argoproj/argo-cd/v3/util/argo/normalizers22github.com/argoproj/argo-cd/v3/util/db23github.com/argoproj/argo-cd/v3/cmd/argocd/commands24github.com/argoproj/argo-cd/v3/controller/metrics25github.com/argoproj/argo-cd/v3/util/webhook26github.com/argoproj/argo-cd/v3/util/settings27github.com/argoproj/argo-cd/v3/applicationset/utils28github.com/argoproj/argo-cd/v3/util/argo29github.com/argoproj/argo-cd/v3/util/notification/argocd30github.com/argoproj/argo-cd/v3/util/session31github.com/argoproj/argo-cd/v3/applicationset/generators32github.com/argoproj/argo-cd/v3/controller/cache33github.com/argoproj/argo-cd/v3/server/application34github.com/argoproj/argo-cd/v3/server/extension35github.com/argoproj/argo-cd/v3/server/project36github.com/argoproj/argo-cd/v3/applicationset/controllers37github.com/argoproj/argo-cd/v3/cmd/argocd/commands/admin38github.com/argoproj/argo-cd/v3/controller39github.com/argoproj/argo-cd/v3/server402612311521521128182126145232320242151132511271252221111511211261112125221138132222231229232139262322129111111131113129212151345353111152211+368 more modules (most-connected shown)

At a glance — Code Health · 78% · Adequate · gated by D2 ·

At a glance — Architecture · 77% · Adequate · gated by D26 ·

At a glance — Maturity · 72% · Strong ·

At a glance — Readiness · 65% · Adequate · gated by P7 ·

At a glance — Security · 64% · Adequate · gated by D29, D30, D31 ·

At a glance — Accessibility · 43% · Weak · gated by AC4 ·

At a glance — Performance · 77% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A02:2025 — Security Misconfiguration509High / Critical
A05:2025 — Injection106High / Critical
A03:2025 — Software Supply Chain Failures23High / Critical
A07:2025 — Authentication Failures7High / Critical

Roadmap

First, ensure all custom controls are fully keyboard-operable and anchors have valid hrefs to fix widespread interaction issues. Next, enforce accessibility standards across the codebase by adding programmatic labels to every form control and button, while also providing text alternatives for all media elements. To sustain these improvements, integrate automated accessibility checks into the development toolchain and CI pipeline. Finally, resolve the stale dependency warnings to maintain a secure and stable codebase.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+6.9 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+3.1 ptsMediumA11y enforcement
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.2 ptsMediumForms & labels
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.+1.9 ptsMediumText alternatives
Resolve the 11 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene.+1.7 ptsMediumDependency Hygiene
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED.+0.8 ptsLowSecrets (history)
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.+1.5 ptsMediumOutbound HTTP resilience
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.7 ptsLowADR Quality

File quality

Per-file score 0–10 — a quality signature. Of 313 files carrying findings, judged against the Production bar: 5% slop · 69% mixed · 26% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.0SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED0.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED0.6SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED0.8SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.7SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED1.7SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED2.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic 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 — 111

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 — 1486

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 — 265

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 19

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

Watchdog 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. 71 of 74 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 74 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D15D16D17D19D20D21D23D26D28D29D30D31D34D35D36D37D40D41D42D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX2AX3AX4AX6M1M2M3M4P1P2P3P4P5P6P7PF1PF2X1X12X13X14X15X16X18X19X2X21X22X23X25X26X28X29X3X30

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
  1. 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, 1813 of 1862 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16c3b-1aa2-7db3-bee1-a7164578c8de.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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 — Watchdog 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. Commit the lcov/Cobertura report it produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 473 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 435 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 — Watchdog 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 — Watchdog 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.
  • D22 Internal API Consistency — not measured this run — Watchdog 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.
  • D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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`, `pkg/client/clientset/versioned/typed/application/v1alpha1/application.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/applicationset.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/appproject.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/fake/fake_application.go`, … (+10 more) 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 — Watchdog measured this, but not all of it. What it 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. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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.
  • AXR1 Runtime accessibility — not measured this run — Watchdog 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 REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog 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 — Watchdog 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.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog 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 — Watchdog measured this, but not all of it. What it 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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X4 Structured logging — not measured this run — Watchdog 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 — Watchdog 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

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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").
  • 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • 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.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity4.8 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.8 / 10 · rule-coverage 100% · ceiling Prevented

175 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was appStateManager.CompareAppState at 94.

Server.Get (cyclomatic 22) · ×2server/application/application.go:792
appStateManager.CompareAppState (cyclomatic 94)REDACTED:682
commands.NewApplicationSyncCommand (cyclomatic 69)cmd/argocd/commands/app.go:1711
admin.NewImportCommand (cyclomatic 65)cmd/argocd/commands/admin/backup.go:160
kustomize.Build (cyclomatic 62)util/kustomize/kustomize.go:124

+ 169 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. 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.8 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

344 method(s) exceeded the cognitive complexity threshold of 15; the worst was appStateManager.CompareAppState at 164.

appStateManager.CompareAppState (cognitive 164)REDACTED:682
kustomize.Build (cognitive 163)util/kustomize/kustomize.go:124
admin.NewImportCommand (cognitive 135)cmd/argocd/commands/admin/backup.go:160
commands.NewApplicationSyncCommand (cognitive 123)cmd/argocd/commands/app.go:1711
Service.runManifestGenAsync (cognitive 117)REDACTED:851

+ 339 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. 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.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 7.9 / 10 · rule-coverage 100% · ceiling Prevented

101 god class(es) detected.

FileTooLong: REDACTED · ×27REDACTED
FunctionTooLong: commands.NewApplicationSyncCommand · ×23cmd/argocd/commands/app.go:1711
MethodTooLong: appStateManager.CompareAppState · ×20REDACTED:682
ClassTooLong: Server · ×13server/application/application.go:91
TooManyMethods: ApplicationController · ×11controller/appcontroller.go:120

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. 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).
  2. Resolve the 23 FunctionTooLong finding(s) in God Classes — start with app.go (5), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (23 warning-level).
  3. 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).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.0 / 10Stronggated by 221 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Verified

215 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (9 lines × 2) · ×18applicationset/generators/pull_request.go:167
Duplicated block (8 lines × 2) · ×18REDACTED:1097
Duplicated block (7 lines × 2) · ×18REDACTED:581
Duplicated block (10 lines × 2) · ×13applicationset/generators/pull_request.go:143
Duplicated block (5 lines × 2) · ×13REDACTED:140

+ 68 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 18 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 (18 warning-level).
  2. Resolve the 18 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 18 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 (18 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 7.3 / 10 · rule-coverage 100% · ceiling Prevented

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

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 2 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

2 of 185 classes have LCOM4 above 3.

Low cohesion: Application (LCOM4 10) · ×2pkg/apis/application/v1alpha1/types.go:70

What to do

  1. 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).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution8.3 / 10Strong✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.3 / 10 · rule-coverage 100% · ceiling Documented

4046 test methods: 3515 unit, 0 integration, 0 BDD, 531 e2e. The JavaScript/TypeScript suite contributes 473 `it`/`test` case(s) across 50 test file(s) declaring at least one; its tier split is read from package names and paths only. The Go suite contributes 3573 test case(s) across 419 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 14 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

What to do

  1. Improve Test Distribution — currently 8.3/10. — 4046 test methods: 3515 unit, 0 integration, 0 BDD, 531 e2e. The JavaScript/TypeScript suite contributes 473 `it`/`test` case(s) across 50 test file(s) declaring at least one; its tier split is read from package names and paths only. The Go suite contributes 3573 test case(s) across 419 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 14 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 1 serious 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 1 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 473 tests. Measured on the JavaScript/TypeScript suite only — at least 435 test source file(s) (.go) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: renders without crashingui/src/app/shared/components/form/__tests__/compat.test.tsx:32

What to do

  1. 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).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene6.9 6.3 / 10Adequate✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 91% · ceiling Verified

22 outdated, 0 author-deprecated direct Go module(s), 11 pinning or checksum defect(s). 138 of 138 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 · ×22

What to do

  1. 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.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 25 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: controller/appcontroller.go (17×44=748); REDACTED (5×94=470); REDACTED (13×33=429)

Hotspot: controller/appcontroller.go · ×25controller/appcontroller.go:1353

What to do

  1. Resolve the 25 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED (2), REDACTED (2). — 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.

D16 · Bus Factor9.7 / 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.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is util/manifeststream/stream.go. Counted over 299 of the 486 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.

D17 · Explicit Debt9.8 / 10Stronggated by 78 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

114 deducted task-comment markers across 110926 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 · ×66applicationset/controllers/clustereventhandler.go:118
FixmeComment · ×9REDACTED:265
HackComment · ×2test/e2e/repo_management_test.go:63
FixmeComment repeated across 18 filesapplicationset/generators/scm_utils.go:3

What to do

  1. Resolve the 66 TodoComment finding(s) in Explicit Debt — start with gpg.go (8), REDACTED (5), project.go (4). — One of this dimension's main actionable groups (66 warning-level).
  2. Resolve the 9 FixmeComment finding(s) in Explicit Debt — start with REDACTED, commit.go, hydrator_dependencies.go. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 2 HackComment finding(s) in Explicit Debt — start with repo_management_test.go, provider.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.

D19 · Documentation QualityStrong◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

The repository's root README gives releases, code quality badges (Integration tests, codecov, CII best practices, OpenSSF scorecard), social media presence, and a strong overview of Argo CD as a declarative GitOps continuous delivery tool with an accompanying Why Argo CD section. The gitops-engine/README.md is focused on the gitops-engine directory, providing usage and core features for that tier; manifests/README.md gives installation and high-availability manifests with a useful note about CRDs not being included in REDACTED; renovate-presets/README.md explains shared presets and notes future reorganization; github/workflows/README.md lists reusable workflows with inputs tables; examples/known-hosts/README.md describes the known_hosts customization directory. The documents are well-structured, complete for their tiers, and each has a strong overview section. The repository's README files are mostly directory-specific (e.g. examples/k8s-rbac/argocd-server-applications/, test/fixture/certs/) and contain usage notes rather than a cohesive project overview; the architecture/design docs are well written but do not replace the per-directory documentation. The READMEs document what each directory is for, how to use it (e.g. kustomize build + apply), and give some guidance on handling security concerns (ClusterRoleBinding) and regeneration of test certificates.

What to do

  1. Improve Documentation Quality — currently 8.0/10. — The repository's root README gives releases, code quality badges (Integration tests, codecov, CII best practices, OpenSSF scorecard), social media presence, and a strong overview of Argo CD as a declarative GitOps continuous delivery tool with an accompanying Why Argo CD section. The gitops-engine/README.md is focused on the gitops-engine directory, providing usage and core features for that tier; manifests/README.md gives installation and high-availability manifests with a useful note about CRDs not being included in REDACTED; renovate-presets/README.md explains shared presets and notes future reorganization; github/workflows/README.md lists reusable workflows with inputs tables; examples/known-hosts/README.md describes the known_hosts customization directory. The documents are well-structured, complete for their tiers, and each has a strong overview section. The repository's README files are mostly directory-specific (e.g. examples/k8s-rbac/argocd-server-applications/, test/fixture/certs/) and contain usage notes rather than a cohesive project overview; the architecture/design docs are well written but do not replace the per-directory documentation. The READMEs document what each directory is for, how to use it (e.g. kustomize build + apply), and give some guidance on handling security concerns (ClusterRoleBinding) and regeneration of test certificates.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — 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.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D23 · Boundary Type-Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

No domain types leak across context boundaries (2 contexts).

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 4 build units (Go, Python) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. 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.

D28 · Secrets (history)4.0 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.0 / 10 · rule-coverage 100% · ceiling Documented

6 finding(s): 0 critical, 6 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  2. 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.

D29 · Static Analysis (SAST)0.1 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.1 / 10 · rule-coverage 100% · ceiling Documented

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 49 file(s) — `REDACTED` (lines 136–169), `applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook/templates/deployment.yaml`, `applicationset/services/scm_provider/azure_devops/git/mocks/Client.go`, `controller/appcontroller.go` (lines 2871–2872, line 3023), `hack/admonitions-to-alerts.sh` (line 59), … (+44 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

  1. 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).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. 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.

D30 · Dependency Vulnerabilities2.6 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.6 / 10 · rule-coverage 100% · ceiling Documented

20 finding(s): 0 critical, 9 high, 9 medium, 1 low. 1 advisory suppression(s) declared in REDACTED, 1 stale.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 9 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 8 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED (4). — One of this dimension's main actionable groups (8 warning-level).
  3. 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.

D31 · IaC & Container Security0.0 / 10Critical✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

509 finding(s): 15 critical, 12 high, 362 medium, 120 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. 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).
  2. 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).
  3. 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.

D34 · Knowledge Freshness9.0 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

32 of 299 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 299 of the 486 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×32applicationset/services/scm_provider/aws_codecommit.go:1
Orphaned files with no living knowledge

What to do

  1. Resolve the 32 Orphaned file finding(s) in Knowledge Freshness — start with bitbucket_server.go (2), REDACTED (2), aws_codecommit.go. — One of this dimension's main actionable groups (32 recommendation-level).
  2. 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.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. 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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D40 · Network Egress Confinement10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Kubernetes workloads are covered by a network policy that restricts egress.

✓ On the Gold path — maintain.

Detailed fixes: d40_recommendation.md.

D41 · Kernel & Syscall Confinement7.8 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Documented

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

  1. 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.

D42 · Runtime Threat Enforcement8.0 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

1/2 runtime-enforcement controls present (threat detection, admission control).

No runtime threat detection

What to do

  1. 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.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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. Scored 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. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious. 1 advisory suppression(s) declared in REDACTED, 1 stale.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 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.

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:38

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.
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:353, 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 — and neither does anything it renders (a name prop is the form-submission key, not a label) — 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:55
  • 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. (×4) — 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:141, …
  • 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:209, ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:216, …
  • 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. (×3) — ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:145, ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:171, 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.
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.
AC4 · Keyboard semantics1.2 / 10Critical✓ Tool-verified

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.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety7.1 / 10Strong✓ Tool-verified

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
  • `.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.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 186 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.3 / 10Exemplary✓ Tool-verified

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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX2 · Stateful singletons5.4 / 10Adequate✓ Tool-verified

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.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

M1 · Documentation (README)5.8 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

  • 484 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

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.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 3 project(s) that lack one — worth up to 0.7 pts.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/operator-manual/declarative-setup.md documents the environment variable `IAM_CLUSTER_ROLE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operator-manual/declarative-setup.md:909
  • docs/operator-manual/declarative-setup.md documents the environment variable `ARGO_CD_MANAGEMENT_IAM_ROLE_NAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operator-manual/declarative-setup.md:909
  • docs/operator-manual/tls.md documents the setting `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_256_GCM_SHA384`, but no code or configuration file names `TLS_RSA_WITH_AES_256_GCM_SHA384`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operator-manual/tls.md:60
  • test/remote/README.md names `test/remote/manifests/e2e_repositories.yaml`, but no file or folder `test/remote/manifests/e2e_repositories.yaml` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — test/remote/README.md:67
  • docs/operator-manual/applicationset/Controlling-Resource-Modification.md changes into `applicationset/manifests`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/operator-manual/applicationset/Controlling-Resource-Modification.md:280

What to do

  • Reconcile the README with reality: docs/operator-manual/declarative-setup.md documents the environment variable `IAM_CLUSTER_ROLE`, but no code, script or configuration file names it; docs/operator-manual/declarative-setup.md documents the environment variable `ARGO_CD_MANAGEMENT_IAM_ROLE_NAME`, but no code, script or configuration file names it; docs/operator-manual/tls.md documents the setting `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_256_GCM_SHA384`, but no code or configuration file names `TLS_RSA_WITH_AES_256_GCM_SHA384`; test/remote/README.md names `test/remote/manifests/e2e_repositories.yaml`, but no file or folder `test/remote/manifests/e2e_repositories.yaml` exists; docs/operator-manual/applicationset/Controlling-Resource-Modification.md changes into `applicationset/manifests`, but no such folder exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P2 · Observability9.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, 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.
P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

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.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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.
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.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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.
PF1 · Benchmark discipline9.5 / 10Exemplary✓ Tool-verified

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.

PF2 · Allocation hygiene6.4 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 88 use(s) across 123,990 production line(s) (~0.7/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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.

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.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation8.8 / 10Strong✓ Tool-verified

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.
  • `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
  • `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

What to do

  • Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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.

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.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling7.7 / 10Strong✓ Tool-verified

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) — applicationset/services/scm_provider/aws_codecommit.go:244, commitserver/commit/commit.go:79, controller/clusterinfoupdater.go:140, …
  • `if err := settings.ValidateExternalURL(urlPart); 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. — controller/cache/info.go:55
  • `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:306
  • `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 = 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:1174
  • `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/application/application.go:1285, server/applicationset/applicationset.go:98
  • `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

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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.

LensScoreRatingImpact
Code Health78%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture77%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity72%StrongSolid.
Readiness65%Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security64%Adequate — gated by D29, D30, D31Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility43%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance77%StrongStrongest area.
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 — 25 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 — 41 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
  • 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 — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped 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
  • D14 License Compliance — Not scored — this repository's 39 shipped npm package(s) were resolved from its committed lockfile, but registry.npmjs.org could not be asked for the licence of 3 of them (TaskCanceledException), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • 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.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 15 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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): 2 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
  • 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 — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • 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.
  • 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
  • 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.
  • 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
  • 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
  • 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 — 111 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:321 — 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:511 — 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:584 — 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:835 — 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:922 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D31 · IaC & Container Security · Critical IaC · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
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:353 — 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:1053 — 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:1068 — 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:214 — 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:54 — 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:256 — 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:273 — 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:91 — 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.
D30 · Dependency Vulnerabilities · High CVE · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
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:209 — 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:216 — 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:216 — 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:326 — 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:659 — 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:667 — 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:141 — 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.
D28 · Secrets (history) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
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.
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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative ui/src/app/shared/components/badge-panel/badge-panel.tsx:38 — 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.
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <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.
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:525 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 1486 finding(s)
D31 · IaC & Container Security · Medium IaC · ×362
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 337 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×66
  • TodoComment applicationset/controllers/clustereventhandler.go:118 — // TODO: only queue the AppGenerator if the labels match this cluster — 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 applicationset/generators/oci.go:85 — // TODO: propagate a real context once Generator.GenerateParams accepts ctx. — 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 applicationset/generators/git.go:87 — // TODO: propagate a real context once Generator.GenerateParams accepts ctx. — 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 applicationset/generators/oci.go:91 — // TODO(oci-signing): Add cosign/sigstore verification 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.
  • TodoComment applicationset/utils/createOrUpdate.go:30 — // TODO: if we decide it's important, it should be safe to start comparing the format. — 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 cmd/argocd/commands/project.go:186 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment cmd/argocd/commands/project.go:231 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment cmd/util/project_test.go:57 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment cmd/util/project.go:190 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment pkg/apis/application/v1alpha1/types.go:1741 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment pkg/apis/application/v1alpha1/types.go:2868 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment pkg/apis/application/v1alpha1/types.go:2897 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment REDACTED:545 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment REDACTED:1029 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment REDACTED:2828 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment REDACTED:2894 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment server/application/application.go:1706 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/source_integrity.go:140 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/source_integrity.go:172 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:658 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:677 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:686 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:689 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:707 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • TodoComment util/sourceintegrity/gpg.go:724 — // TODO: Remove deprecated https://github.com/argoproj/argo-cd/issues/27695
  • + 41 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×40
  • Swallowed exception (caught, then discarded) applicationset/services/scm_provider/aws_codecommit.go:244 — `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) commitserver/commit/commit.go:79 — `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) controller/clusterinfoupdater.go:140 — `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) controller/appcontroller.go:3162 — `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) controller/appcontroller.go:3174 — `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) controller/appcontroller.go:3287 — `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) controller/cache/info.go:55 — `if err := settings.ValidateExternalURL(urlPart); 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) controller/cache/info.go:319 — `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) controller/cache/info.go:622 — `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) controller/cache/info.go:775 — `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) controller/cache/cache.go:431 — `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) notification_controller/controller/controller.go:211 — `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) pkg/apiclient/grpcproxy.go:97 — `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) pkg/apiclient/application/forwarder_overwrite.go:306 — `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.
  • Swallowed exception (caught, then discarded) pkg/apis/application/v1alpha1/values.go:81 — `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.
  • Swallowed exception (caught, then discarded) pkg/apis/application/v1alpha1/values.go:85 — `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) pkg/apis/application/v1alpha1/types.go:4298 — `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) pkg/apis/application/v1alpha1/types.go:4510 — `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:1174 — `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.
  • Swallowed exception (caught, then discarded) REDACTED:1514 — `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:1519 — `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) server/application/application.go:1285 — `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.
  • Swallowed exception (caught, then discarded) server/applicationset/applicationset.go:98 — `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.
  • Swallowed exception (caught, then discarded) server/deeplinks/deeplinks.go:70 — `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.
  • Swallowed exception (caught, then discarded) server/rbacpolicy/rbacpolicy.go:61 — `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.
  • + 15 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×27
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2382 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1882 over it, 4.76× 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 — 2297 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1797 over it, 4.59× 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 — 2156 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: ApplicationController (60 blocks, 120-3445). The bar is 500 significant lines; this is 1656 over it, 4.31× 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 — 2139 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1639 over it, 4.28× 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 — 2086 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: Server (60 blocks, 91-3255). The bar is 500 significant lines; this is 1586 over it, 4.17× 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 — 1320 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 820 over it, 2.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: REDACTED REDACTED — FileTooLong — 1266 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 766 over it, 2.53× 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 — 1122 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: syncContext (36 blocks, 364-1831). The bar is 500 significant lines; this is 622 over it, 2.24× 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: cache/cluster.go gitops-engine/pkg/cache/cluster.go — FileTooLong — 1098 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: clusterCache (53 blocks, 237-1918). The bar is 500 significant lines; this is 598 over it, 2.20× 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 — 898 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: appStateManager (8 blocks, 133-1400). The bar is 500 significant lines; this is 398 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: argo/argo.go util/argo/argo.go — FileTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 397 over it, 1.79× 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 — 867 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: ApplicationSetReconciler (16 blocks, 90-1254). The bar is 500 significant lines; this is 367 over it, 1.73× 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: apiclient/apiclient.go pkg/apiclient/apiclient.go — FileTooLong — 755 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 255 over it, 1.51× 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 — 739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 239 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: REDACTED REDACTED — FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: ClientApp (17 blocks, 75-1146). The bar is 500 significant lines; this is 212 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: util/app.go cmd/util/app.go — FileTooLong — 710 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 210 over it, 1.42× 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 — 612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 112 over it, 1.22× 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 — 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: Manager (12 blocks, 71-1039). The bar is 500 significant lines; this is 90 over it, 1.18× 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 — 541 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 41 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: 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 — 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05× 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.
  • + 2 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×25
  • Hotspot: controller/appcontroller.go controller/appcontroller.go:1353 — controller/appcontroller.go changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ApplicationController.finalizeApplicationDeletion at line 1353. 10 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: REDACTED REDACTED:682 — REDACTED changed 5 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 3 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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:279 — REDACTED changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in ArgoCDWebhookHandler.HandleEvent at line 279. 5 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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:851 — REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Service.runManifestGenAsync at line 851. 7 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: server/application/application.go server/application/application.go:3016 — server/application/application.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Server.ServerSideDiff at line 3016. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02:00' --full-history --no-merges -- server/application/application.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:4286 — pkg/apis/application/v1alpha1/types.go changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Cluster.rawRestConfig at line 4286. 3 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: applicationset/progressivesync/progressive_sync.go applicationset/progressivesync/progressive_sync.go:423 — applicationset/progressivesync/progressive_sync.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Manager.UpdateApplicationSetApplicationStatus at line 423. 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02:00' --full-history --no-merges -- applicationset/progressivesync/progressive_sync.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:815 — REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ArgoCDServer.watchSettings at line 815. 3 of those changes were fix/bug commits, and the other 6 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in ApplicationSetReconciler.Reconcile at line 119. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: util/kustomize/kustomize.go util/kustomize/kustomize.go:124 — util/kustomize/kustomize.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in kustomize.Build at line 124. 3 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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:1752 — REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in settings.updateSettingsFromConfigMap at line 1752. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in apiclient.NewClientWithContext at line 223. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: gitops-engine/pkg/cache/cluster.go gitops-engine/pkg/cache/cluster.go:878 — gitops-engine/pkg/cache/cluster.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in clusterCache.watchEvents at line 878. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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:19 — util/dex/config.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in dex.GenerateDexConfigYAML at line 19. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: REDACTED REDACTED:478 — 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 478. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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:404 — REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SSHCreds.Environ at line 404. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: server/settings/settings.go server/settings/settings.go:41 — server/settings/settings.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Server.Get at line 41. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02:00' --full-history --no-merges -- server/settings/settings.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 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: REDACTED REDACTED:54 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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: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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 00:46:33 +02:00' --until='2026-10-24 00:46:33 +02: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.
D3 · God Classes · FunctionTooLong · ×23
  • FunctionTooLong: commands.NewApplicationSyncCommand cmd/argocd/commands/app.go:1711 — FunctionTooLong — NewApplicationSyncCommand runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× 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-server/commands/argocd_server.go:57 — FunctionTooLong — NewCommand runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× 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: commands.NewCommand cmd/argocd-application-controller/commands/argocd_application_controller.go:52 — FunctionTooLong — NewCommand runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.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: 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 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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:19 — FunctionTooLong — GenerateDexConfigYAML runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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: 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:675 — 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: controller.NewApplicationController controller/appcontroller.go:166 — FunctionTooLong — NewApplicationController runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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:2395 — FunctionTooLong — waitOnApplicationStatus 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.
  • 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:2836 — 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:589 — 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.
D3 · God Classes · MethodTooLong · ×20
  • 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:2119 — MethodTooLong — processAppRefreshQueueItem runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× 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:3016 — 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:348 — MethodTooLong — runRepoOperation runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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:1589 — 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: Handler.ServeHTTP REDACTED:92 — MethodTooLong — ServeHTTP 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:1353 — 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:977 — 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: Service.runManifestGenAsync REDACTED:851 — MethodTooLong — runManifestGenAsync 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.PodLogs server/application/application.go:1871 — 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: ArgoCDServer.Run REDACTED:591 — MethodTooLong — Run runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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:493 — 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:290 — 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:575 — 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:676 — 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:936 — 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:957 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×18
  • 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:126 — cmd/argocd-application-controller/commands/argocd_application_controller.go:126-134 | cmd/argocd-server/commands/argocd_server.go:139-147 — 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:136` calls `SetCacheSize` and `cmd/argocd-application-controller/commands/argocd_application_controller.go:123` 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:561 — cmd/argocd/commands/admin/cluster.go:561-569 | 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:561` 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) cmd/argocd/commands/project_role.go:642 — cmd/argocd/commands/project_role.go:642-650 | cmd/argocd/commands/project_role.go:673-681 — 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/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) 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×18
  • Duplicated block (8 lines × 2) REDACTED:1097 — REDACTED:1097-1104 | REDACTED:1143-1150 — 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) 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:2770 — cmd/argocd/commands/app.go:2770-2777 | cmd/argocd/commands/app.go:2890-2898 — 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) REDACTED:172 — REDACTED:172-179 | cmd/argocd/commands/relogin.go:85-92 — 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 (8 lines × 2) controller/sharding/cache.go:296 — controller/sharding/cache.go:296-303 | 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:296` 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) REDACTED:3714 — REDACTED:3714-3721 | REDACTED:3800-3807 — 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:1008 — server/application/application.go:1008-1015 | 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:1008` 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:1714 — server/application/application.go:1714-1721 | server/application/application.go:1744-1751 — 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) util/kube/kube.go:145 — util/kube/kube.go:145-152 | util/kube/kube.go:169-176 — 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 (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:1070 — REDACTED:1070-1077 | REDACTED:1085-1092 — 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:1066` calls `now`, `Unix` and `REDACTED:1084` 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:426 — REDACTED:426-433 | REDACTED:496-503 — 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: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.
  • 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:1261 — REDACTED:1261-1268 | REDACTED:1272-1279 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×18
  • Duplicated block (7 lines × 2) REDACTED:581 — REDACTED:581-587 | REDACTED:1227-1233 — 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) cmd/argocd-application-controller/commands/argocd_application_controller.go:150 — cmd/argocd-application-controller/commands/argocd_application_controller.go:150-158 | 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:150` 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/admin/settings.go:535 — cmd/argocd/commands/admin/settings.go:535-541 | cmd/argocd/commands/admin/settings.go:600-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.
  • Duplicated block (7 lines × 2) cmd/argocd/commands/app.go:984 — cmd/argocd/commands/app.go:984-990 | cmd/argocd/commands/app.go:3210-3216 — 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:1093 — controller/appcontroller.go:1093-1099 | controller/appcontroller.go:2828-2834 — 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:1093` 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:971 — REDACTED:971-977 | REDACTED:1046-1052 — 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:971` 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:410 — server/application/application.go:410-417 | 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:2192 — server/application/application.go:2192-2198 | server/application/application.go:2340-2346 — 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:2238 — server/application/application.go:2238-2244 | server/application/application.go:2263-2269 — 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:2238` 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) server/application/application.go:1315 — server/application/application.go:1315-1321 | 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:1315` 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:248-254 — 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:256` 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.
D3 · God Classes · ClassTooLong · ×13
  • ClassTooLong: Server server/application/application.go:91 — ClassTooLong — 1831 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods, 60 blocks, lines 91-3255. The bar is 400 significant lines; this is 1431 over it, 4.58× 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: ApplicationController controller/appcontroller.go:120 — ClassTooLong — 1789 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods, 60 blocks, lines 120-3445. The bar is 400 significant lines; this is 1389 over it, 4.47× 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 — 1231 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods, 36 blocks, lines 93-3851. The bar is 400 significant lines; this is 831 over it, 3.08× 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: clusterCache gitops-engine/pkg/cache/cluster.go:237 — ClassTooLong — 903 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods, 53 blocks, lines 237-1918. The bar is 400 significant lines; this is 503 over it, 2.26× 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 — 845 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods, 36 blocks, lines 364-1831. The bar is 400 significant lines; this is 445 over it, 2.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: nativeGitClient REDACTED:205 — ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods, 51 blocks, lines 205-2295. 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 — 666 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods, 16 blocks, lines 90-1254. The bar is 400 significant lines; this is 266 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.
  • ClassTooLong: appStateManager REDACTED:133 — ClassTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods, 8 blocks, lines 133-1400. 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:189 — ClassTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods, 24 blocks, lines 189-1848. The bar is 400 significant lines; this is 241 over it, 1.60× 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 — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods, 17 blocks, lines 75-1146. The bar is 400 significant lines; this is 77 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-1115. 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×13
  • 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/admin/cluster.go:236 — cmd/argocd/commands/admin/cluster.go:236-246 | cmd/argocd/commands/admin/cluster.go:531-540 — 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:236` 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 (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:582 — cmd/util/app.go:582-591 | 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:582` 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/cluster.go:764 — gitops-engine/pkg/cache/cluster.go:764-773 | gitops-engine/pkg/cache/cluster.go:1284-1293 — 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:764` 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/cluster.go:1294` calls `Lock` and `gitops-engine/pkg/cache/cluster.go:774` 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:1575 — server/application/application.go:1575-1584 | server/application/application.go:1618-1627 — 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:509 — REDACTED:509-524 | REDACTED:546-555 — 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:936 — REDACTED:936-948 | REDACTED:952-961 — 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:936` 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:405 — REDACTED:405-414 | REDACTED:525-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.
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×13
  • Duplicated block (5 lines × 2) REDACTED:140 — REDACTED:140-144 | REDACTED:208-212 — 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:214` 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/admin/cluster.go:231 — cmd/argocd/commands/admin/cluster.go:231-235 | cmd/argocd/commands/admin/cluster.go:526-530 — 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.
  • 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/cluster.go:851 — gitops-engine/pkg/cache/cluster.go:851-855 | gitops-engine/pkg/cache/cluster.go:1266-1270 — 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:851` 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:1853 — server/application/application.go:1853-1857 | server/application/application.go:3082-3086 — 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:1853` 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) cmd/argocd/commands/admin/backup.go:233 — cmd/argocd/commands/admin/backup.go:233-238 | cmd/argocd/commands/admin/backup.go:241-245 — 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:233` 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) controller/appcontroller.go:1948 — controller/appcontroller.go:1948-1953 | controller/appcontroller.go:1984-1988 — 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:1948` 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:1954` calls `isOperationStatePayloadTooLargeError` and `controller/appcontroller.go:1989` 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:262 — util/exec/exec.go:262-266 | util/exec/exec.go:273-277 — 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.
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.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/davecgh/go-spew` and has not moved this requirement in 8.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/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.7 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.7 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.7 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.7 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 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 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.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/robfig/cron/v3` 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/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.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×11
  • TooManyMethods: ApplicationController controller/appcontroller.go:120 — TooManyMethods — 79 methods, declared across 3 files: controller/appcontroller.go (60), controller/hydrator_dependencies.go (13), REDACTED (6). The bar is 30 methods; this is 49 over it, 2.63× 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:91 — 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: clusterCache gitops-engine/pkg/cache/cluster.go:237 — TooManyMethods — 53 methods, declared across 2 files: cache/cluster.go (52), cache/references.go (1). The bar is 30 methods; this is 23 over it, 1.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: nativeGitClient REDACTED:205 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×11
  • 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:426 — applicationset/webhook/webhook.go:426-437 | applicationset/webhook/webhook.go:482-493 — 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:101-112 — 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:3728 — REDACTED:3728-3739 | REDACTED:3814-3825 — 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:3728` 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:1017 — server/application/application.go:1017-1028 | 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:1017` 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:1088 — REDACTED:1088-1099 | REDACTED:1199-1210 — 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:1088` 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:111 — cmd/argocd-application-controller/commands/argocd_application_controller.go:111-122 | 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:123` 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • 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:1278 — server/application/application.go:1278-1288 | 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:1277` 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/app.go:1186 — cmd/argocd/commands/app.go:1186-1196 | cmd/util/app.go:879-889 — 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:187 — cmd/argocd/commands/admin/settings_rbac.go:187-197 | cmd/argocd/commands/admin/settings_rbac.go:280-290 — 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:187` 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×10
  • 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.
D17 · Explicit Debt · FixmeComment · ×9
  • 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.
  • 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 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/appcontroller.go:2608 — // 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/hydrator.go:440 — // 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 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 REDACTED:2758 — // 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 util/exec/exec_norace_test.go:34 — // FIXME: there's a race in RunCommand that causes the test to fail when -race is enabled. The race is in the timeout — 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: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.
D30 · Dependency Vulnerabilities · Medium CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • 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:3310 — REDACTED:3310-3315 | REDACTED:3382-3387 — 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:3310` 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) REDACTED:525 — REDACTED:525-530 | REDACTED:556-561 — 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:525` 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/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.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFields · ×7
  • TooManyFields: AppOptions cmd/util/app.go:30 — TooManyFields — 72 stored fields. The bar is 30 stored fields; this is 42 over it, 2.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: 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: clusterCache gitops-engine/pkg/cache/cluster.go:237 — TooManyFields — 38 stored fields beside 53 methods. The bar is 30 stored fields; this is 8 over it, 1.27× 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 — 37 stored fields beside 79 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: ArgoCDServerOpts REDACTED:230 — TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× 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.
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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • 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) cmd/argocd/commands/admin/backup.go:73 — cmd/argocd/commands/admin/backup.go:73-86 | cmd/argocd/commands/admin/backup.go:209-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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/backup.go:73` 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) controller/appcontroller.go:816 — controller/appcontroller.go:816-829 | server/application/application.go:3200-3213 — 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:816` 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:580 — gitops-engine/pkg/cache/cluster.go:580-593 | gitops-engine/pkg/cache/cluster.go:596-609 — 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:580` 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:515 — server/application/application.go:515-528 | server/application/application.go:689-702 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×6
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×5
  • 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:2863 — cmd/argocd/commands/app.go:2863-2881 | 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:2863` 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/app_resources.go:318 — cmd/argocd/commands/app_resources.go:318-336 | cmd/argocd/commands/app_resources.go:387-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:318` 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 (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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) REDACTED:1100 — REDACTED:1100-1115 | REDACTED:1229-1244 — 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:1100` 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:197-212 — 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/cluster.go:205 — cmd/argocd/commands/admin/cluster.go:205-220 | cmd/argocd/commands/admin/cluster.go:501-516 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×5
  • 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:404 — cmd/argocd/commands/admin/cluster.go:404-418 | cmd/argocd/commands/admin/cluster.go:462-476 — 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:404` 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:419` calls `Flags`, `BoolVar`, `IntVar` and `cmd/argocd/commands/admin/cluster.go:477` 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:3337 — REDACTED:3337-3351 | REDACTED:3409-3423 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×4
  • 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:3127 — controller/appcontroller.go:3127-3137 | controller/appcontroller.go:3411-3422 — 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:3411` 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:419 — REDACTED:419-430 | REDACTED:461-471 — 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:419` 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 · Duplicated block (7 lines × 3) · ×4
  • 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) 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.
AC2 · Forms & labels · <Autocomplete> field component without a label · ×3
  • <Autocomplete> field component without a label ui/src/app/applications/components/application-summary/edit-notification-subscriptions.tsx:145 — 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/application-summary/edit-notification-subscriptions.tsx:171 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • 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:976 — REDACTED:976-992 | REDACTED:993-1009 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • 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/ctl.go:187 — gitops-engine/pkg/utils/kube/ctl.go:187-197 | gitops-engine/pkg/utils/kube/ctl.go:211-221 | gitops-engine/pkg/utils/kube/ctl.go:235-245 — 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. 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • 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) server/application/application.go:1031 — server/application/application.go:1031-1041 | server/applicationset/applicationset.go:397-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. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1031` 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 × 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) controller/appcontroller.go:1094 — controller/appcontroller.go:1094-1099 | controller/appcontroller.go:1624-1629 | controller/appcontroller.go:2829-2834 — 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:1094` 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) server/project/project.go:343 — server/project/project.go:343-348 | server/project/project.go:506-511 | server/project/project.go:536-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. Read the line range as the matched WINDOW rather than a finished unit: at `server/project/project.go:343` 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 (6 lines × 3) gitops-engine/pkg/utils/kube/ctl.go:198 — gitops-engine/pkg/utils/kube/ctl.go:198-203 | gitops-engine/pkg/utils/kube/ctl.go:222-227 | gitops-engine/pkg/utils/kube/ctl.go:246-251 — 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.
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 — and neither does anything it renders (a name prop is the form-submission key, not a label) — 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:55 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — 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.
D1 · Cyclomatic Complexity · Server.Get (cyclomatic 22) · ×2
  • Server.Get (cyclomatic 22) server/application/application.go:792 — 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.
D17 · Explicit Debt · HackComment · ×2
  • 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.
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
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:489 — controller/appcontroller.go:489-520 | controller/appcontroller.go:546-676 | controller/appcontroller.go:678-784 | 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:404-515 | 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 · Duplicated block (30 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) cmd/argocd/commands/app.go:3143 — cmd/argocd/commands/app.go:3143-3155 | cmd/argocd/commands/app.go:3290-3303 — 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:3143` 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.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) cmd/argocd/commands/app.go:3043 — cmd/argocd/commands/app.go:3043-3055 | 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:3043` 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) gitops-engine/pkg/cache/cluster.go:1715 — gitops-engine/pkg/cache/cluster.go:1715-1722 | gitops-engine/pkg/cache/cluster.go:1730-1736 — 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:1715` 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • 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:3145-3153 | cmd/argocd/commands/app.go:3293-3301 — 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:413-419 | 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • 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 5) gitops-engine/pkg/utils/kube/kubetest/mock.go:28 — MockKubectlCmd's methods fall into 5 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 5 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: 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, …)`.
  • 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, …)`.
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.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 186 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
AX2 · Stateful singletons · Stateful package · ×1
  • 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.
D1 · Cyclomatic Complexity · appStateManager.CompareAppState (cyclomatic 94) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewApplicationSyncCommand (cyclomatic 69) · ×1
  • 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.
D1 · Cyclomatic Complexity · admin.NewImportCommand (cyclomatic 65) · ×1
  • 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.
D1 · Cyclomatic Complexity · kustomize.Build (cyclomatic 62) · ×1
  • 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.
D1 · Cyclomatic Complexity · syncContext.Sync (cyclomatic 60) · ×1
  • 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.
D1 · Cyclomatic Complexity · util.ConstructSource (cyclomatic 56) · ×1
  • util.ConstructSource (cyclomatic 56) cmd/util/app.go:675 — 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 677). 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.
D1 · Cyclomatic Complexity · ApplicationSetReconciler.Reconcile (cyclomatic 51) · ×1
  • 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.
D1 · Cyclomatic Complexity · appStateManager.SyncAppState (cyclomatic 51) · ×1
  • appStateManager.SyncAppState (cyclomatic 51) controller/sync.go:160 — appStateManager.SyncAppState has cyclomatic complexity 51 (threshold 15). Of this number, 44 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.
D1 · Cyclomatic Complexity · Handler.ServeHTTP (cyclomatic 51) · ×1
  • Handler.ServeHTTP (cyclomatic 51) REDACTED:92 — Handler.ServeHTTP has cyclomatic complexity 51 (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.
D1 · Cyclomatic Complexity · Server.ServerSideDiff (cyclomatic 48) · ×1
  • Server.ServerSideDiff (cyclomatic 48) server/application/application.go:3016 — 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.
D1 · Cyclomatic Complexity · syncContext.getSyncTasks (cyclomatic 47) · ×1
  • syncContext.getSyncTasks (cyclomatic 47) gitops-engine/pkg/sync/sync_context.go:977 — 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.
D1 · Cyclomatic Complexity · cache.populatePodInfo (cyclomatic 46) · ×1
  • cache.populatePodInfo (cyclomatic 46) controller/cache/info.go:619 — 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.
D1 · Cyclomatic Complexity · commands.unset (cyclomatic 44) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.finalizeApplicationDeletion (cyclomatic 44) · ×1
  • ApplicationController.finalizeApplicationDeletion (cyclomatic 44) controller/appcontroller.go:1353 — 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.
D1 · Cyclomatic Complexity · ApplicationController.processRequestedAppOperation (cyclomatic 44) · ×1
  • ApplicationController.processRequestedAppOperation (cyclomatic 44) controller/appcontroller.go:1589 — 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.
D1 · Cyclomatic Complexity · apiclient.NewClientWithContext (cyclomatic 44) · ×1
  • apiclient.NewClientWithContext (cyclomatic 44) pkg/apiclient/apiclient.go:223 — apiclient.NewClientWithContext 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.
D1 · Cyclomatic Complexity · commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · Service.runRepoOperation (cyclomatic 42) · ×1
  • Service.runRepoOperation (cyclomatic 42) REDACTED:348 — 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.
D1 · Cyclomatic Complexity · ApplicationController.processAppRefreshQueueItem (cyclomatic 41) · ×1
  • ApplicationController.processAppRefreshQueueItem (cyclomatic 41) controller/appcontroller.go:2119 — 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.
D1 · Cyclomatic Complexity · util.SetAppSpecOptions (cyclomatic 39) · ×1
  • util.SetAppSpecOptions (cyclomatic 39) cmd/util/app.go:180 — util.SetAppSpecOptions has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 208). 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.
D1 · Cyclomatic Complexity · cache.populateIngressInfo (cyclomatic 39) · ×1
  • cache.populateIngressInfo (cyclomatic 39) controller/cache/info.go:149 — cache.populateIngressInfo 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.
D1 · Cyclomatic Complexity · AppProject.ValidateProject (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · db.CreateRepoCertificate (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · dex.GenerateDexConfigYAML (cyclomatic 39) · ×1
  • dex.GenerateDexConfigYAML (cyclomatic 39) util/dex/config.go:19 — dex.GenerateDexConfigYAML 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.
D1 · Cyclomatic Complexity · Render.deeplyReplaceWithFilter (cyclomatic 38) · ×1
  • 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.
D1 · Cyclomatic Complexity · WebhookHandler.shouldRefreshMatrixGenerator (cyclomatic 37) · ×1
  • WebhookHandler.shouldRefreshMatrixGenerator (cyclomatic 37) applicationset/webhook/webhook.go:372 — 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.
D1 · Cyclomatic Complexity · commands.waitOnApplicationStatus (cyclomatic 37) · ×1
  • commands.waitOnApplicationStatus (cyclomatic 37) cmd/argocd/commands/app.go:2395 — commands.waitOnApplicationStatus has cyclomatic complexity 37 (threshold 15). Of this number, 24 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.
D1 · Cyclomatic Complexity · appStateManager.GetRepoObjs (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · SCMProviderGenerator.GenerateParams (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.PodLogs (cyclomatic 34) · ×1
  • Server.PodLogs (cyclomatic 34) server/application/application.go:1871 — 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.
D1 · Cyclomatic Complexity · Server.GetManifests (cyclomatic 33) · ×1
  • Server.GetManifests (cyclomatic 33) server/application/application.go:493 — 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 507). 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.
D1 · Cyclomatic Complexity · ArgoCDWebhookHandler.HandleEvent (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · controller.setApplicationHealth (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.hideSecretData (cyclomatic 32) · ×1
  • ApplicationController.hideSecretData (cyclomatic 32) controller/appcontroller.go:786 — 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.
D1 · Cyclomatic Complexity · ApplicationController.executeHooks (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · repository.helmTemplate (cyclomatic 32) · ×1
  • repository.helmTemplate (cyclomatic 32) REDACTED:1287 — 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.
D1 · Cyclomatic Complexity · commands.NewApplicationDiffCommand (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · Service.runManifestGenAsync (cyclomatic 31) · ×1
  • Service.runManifestGenAsync (cyclomatic 31) REDACTED:851 — Service.runManifestGenAsync has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.
D1 · Cyclomatic Complexity · health.getCorev1PodHealth (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.autoSync (cyclomatic 30) · ×1
  • ApplicationController.autoSync (cyclomatic 30) controller/appcontroller.go:2824 — 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.
D1 · Cyclomatic Complexity · Service.UpdateRevisionForPaths (cyclomatic 30) · ×1
  • Service.UpdateRevisionForPaths (cyclomatic 30) REDACTED:3524 — 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.
D1 · Cyclomatic Complexity · terminalHandler.ServeHTTP (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · Manager.UpdateApplicationSetApplicationStatus (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.getAppHosts (cyclomatic 29) · ×1
  • ApplicationController.getAppHosts (cyclomatic 29) controller/appcontroller.go:678 — 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.
D1 · Cyclomatic Complexity · cache.populateGatewayAPIRouteInfo (cyclomatic 29) · ×1
  • cache.populateGatewayAPIRouteInfo (cyclomatic 29) controller/cache/info.go:477 — 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.
D1 · Cyclomatic Complexity · application.mergeLogStreams (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.Update (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · clusterCache.GetManagedLiveObjs (cyclomatic 28) · ×1
  • clusterCache.GetManagedLiveObjs (cyclomatic 28) gitops-engine/pkg/cache/cluster.go:1646 — clusterCache.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.
D1 · Cyclomatic Complexity · syncContext.runTasks (cyclomatic 28) · ×1
  • syncContext.runTasks (cyclomatic 28) gitops-engine/pkg/sync/sync_context.go:1629 — 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.
D1 · Cyclomatic Complexity · Server.Sync (cyclomatic 28) · ×1
  • Server.Sync (cyclomatic 28) server/application/application.go:2100 — Server.Sync has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · ApplicationSetReconciler.setApplicationSetStatusCondition (cyclomatic 27) · ×1
  • ApplicationSetReconciler.setApplicationSetStatusCondition (cyclomatic 27) REDACTED:486 — ApplicationSetReconciler.setApplicationSetStatusCondition has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
D1 · Cyclomatic Complexity · liveStateCache.getCluster (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · SyncWindows.Matches (cyclomatic 27) · ×1
  • SyncWindows.Matches (cyclomatic 27) pkg/apis/application/v1alpha1/types.go:3266 — 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.
D1 · Cyclomatic Complexity · clusterCache.watchEvents (cyclomatic 26) · ×1
  • clusterCache.watchEvents (cyclomatic 26) gitops-engine/pkg/cache/cluster.go:878 — clusterCache.watchEvents 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 one function literal inside it that branches (line 879). 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.
D1 · Cyclomatic Complexity · commands.printAppSummaryTable (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · headless.MaybeStartLocalServer (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · Service.handleCommitRequest (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.applicationEventHandlerFuncs (cyclomatic 26) · ×1
  • ApplicationController.applicationEventHandlerFuncs (cyclomatic 26) controller/appcontroller.go:3255 — ApplicationController.applicationEventHandlerFuncs 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 3271, 3314, 3257). 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.
D1 · Cyclomatic Complexity · cache.generateGatewayURLs (cyclomatic 26) · ×1
  • cache.generateGatewayURLs (cyclomatic 26) controller/cache/info.go:369 — 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.
D1 · Cyclomatic Complexity · repository.GenerateManifests (cyclomatic 26) · ×1
  • repository.GenerateManifests (cyclomatic 26) REDACTED:1742 — 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.
D1 · Cyclomatic Complexity · Service.populateHelmAppDetails (cyclomatic 26) · ×1
  • Service.populateHelmAppDetails (cyclomatic 26) REDACTED:2598 — Service.populateHelmAppDetails 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.
D1 · Cyclomatic Complexity · files.untar (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.getResourceTree (cyclomatic 25) · ×1
  • ApplicationController.getResourceTree (cyclomatic 25) controller/appcontroller.go:546 — 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.
D1 · Cyclomatic Complexity · cache.populateNodeInfo (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · diff.HideSecretData (cyclomatic 24) · ×1
  • diff.HideSecretData (cyclomatic 24) REDACTED:935 — 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.
D1 · Cyclomatic Complexity · DuckTypeGenerator.GenerateParams (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · PullRequestGenerator.selectServiceProvider (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · command.NewCommand (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewLoginCommand (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · application.init (cyclomatic 24) · ×1
  • application.init (cyclomatic 24) pkg/apiclient/application/forwarder_overwrite.go:284 — application.init 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 3 function literals inside it that branch (lines 325, 285, 318). 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.
D1 · Cyclomatic Complexity · Server.GetManifestsWithFiles (cyclomatic 24) · ×1
  • Server.GetManifestsWithFiles (cyclomatic 24) server/application/application.go:659 — 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.
D1 · Cyclomatic Complexity · ArgoCDServer.watchSettings (cyclomatic 24) · ×1
  • ArgoCDServer.watchSettings (cyclomatic 24) REDACTED:815 — 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.
D1 · Cyclomatic Complexity · tgz.tgzFile (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · syncContext.applyObject (cyclomatic 23) · ×1
  • syncContext.applyObject (cyclomatic 23) gitops-engine/pkg/sync/sync_context.go:1419 — 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.
D1 · Cyclomatic Complexity · Server.resolveSourceRevisions (cyclomatic 23) · ×1
  • Server.resolveSourceRevisions (cyclomatic 23) server/application/application.go:2216 — 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.
D1 · Cyclomatic Complexity · nativeHelmChart.ExtractChart (cyclomatic 23) · ×1
  • nativeHelmChart.ExtractChart (cyclomatic 23) REDACTED:191 — 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.
D1 · Cyclomatic Complexity · health.GetHealthCheckFunc (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationSetReconciler.createOrUpdateInCluster (cyclomatic 22) · ×1
  • ApplicationSetReconciler.createOrUpdateInCluster (cyclomatic 22) REDACTED:735 — 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 753). 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.
D1 · Cyclomatic Complexity · commands.NewApplicationGetCommand (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewApplicationManifestsCommand (cyclomatic 22) · ×1
  • commands.NewApplicationManifestsCommand (cyclomatic 22) cmd/argocd/commands/app.go:2836 — 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 2863). 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.
D1 · Cyclomatic Complexity · util.setHelmOpt (cyclomatic 22) · ×1
  • util.setHelmOpt (cyclomatic 22) cmd/util/app.go:422 — 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.
D1 · Cyclomatic Complexity · Cluster.rawRestConfig (cyclomatic 22) · ×1
  • Cluster.rawRestConfig (cyclomatic 22) pkg/apis/application/v1alpha1/types.go:4286 — 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.
D1 · Cyclomatic Complexity · repository.getResolvedValueFiles (cyclomatic 22) · ×1
  • repository.getResolvedValueFiles (cyclomatic 22) REDACTED:1463 — 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.
D1 · Cyclomatic Complexity · ArgoCDServer.Run (cyclomatic 22) · ×1
  • ArgoCDServer.Run (cyclomatic 22) REDACTED:591 — ArgoCDServer.Run has cyclomatic complexity 22 (threshold 15). Of this number, 14 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.
D1 · Cyclomatic Complexity · SessionManager.Parse (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · settings.parseAccounts (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · Manager.UpdateApplicationSetApplicationStatusProgress (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewCommand (cyclomatic 21) · ×1
  • 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 119). 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.
D1 · Cyclomatic Complexity · appStateManager.evaluateRevisionChanges (cyclomatic 21) · ×1
  • appStateManager.evaluateRevisionChanges (cyclomatic 21) REDACTED:465 — appStateManager.evaluateRevisionChanges 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.
D1 · Cyclomatic Complexity · Server.RunResourceActionV2 (cyclomatic 21) · ×1
  • Server.RunResourceActionV2 (cyclomatic 21) server/application/application.go:2686 — 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.
D1 · Cyclomatic Complexity · db.RemoveRepoCertificates (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · exec.RunCommandExt (cyclomatic 21) · ×1
  • exec.RunCommandExt (cyclomatic 21) util/exec/exec.go:184 — exec.RunCommandExt 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.
D1 · Cyclomatic Complexity · ClientApp.HandleCallback (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClientApp.GetUserInfo (cyclomatic 21) · ×1
  • ClientApp.GetUserInfo (cyclomatic 21) REDACTED:983 — ClientApp.GetUserInfo 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.
D1 · Cyclomatic Complexity · sourceintegrity.SyncKeyRingFromDirectory (cyclomatic 21) · ×1
  • sourceintegrity.SyncKeyRingFromDirectory (cyclomatic 21) util/sourceintegrity/gpg.go:572 — 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.
D1 · Cyclomatic Complexity · clusterCache.sync (cyclomatic 20) · ×1
  • clusterCache.sync (cyclomatic 20) gitops-engine/pkg/cache/cluster.go:1172 — clusterCache.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.
D1 · Cyclomatic Complexity · progressivesync.buildAppDependencyList (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewCommand (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewClusterAddCommand (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewRepoAddCommand (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationController.cleanupHooks (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Hydrator.hydrate (cyclomatic 20) · ×1
  • Hydrator.hydrate (cyclomatic 20) controller/hydrator/hydrator.go:431 — 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.
D1 · Cyclomatic Complexity · Repository.CopyCredentialsFrom (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.Create (cyclomatic 20) · ×1
  • Server.Create (cyclomatic 20) server/application/application.go:350 — 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.
D1 · Cyclomatic Complexity · Server.validateAndNormalizeApp (cyclomatic 20) · ×1
  • Server.validateAndNormalizeApp (cyclomatic 20) server/application/application.go:1337 — Server.validateAndNormalizeApp 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.
D1 · Cyclomatic Complexity · kube.SetAppInstanceLabel (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · webhook.shouldRefreshPRGenerator (cyclomatic 19) · ×1
  • webhook.shouldRefreshPRGenerator (cyclomatic 19) applicationset/webhook/webhook.go:309 — webhook.shouldRefreshPRGenerator 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.
D1 · Cyclomatic Complexity · admin.NewExportCommand (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · admin.loadClusters (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · util.setKustomizeOpt (cyclomatic 19) · ×1
  • util.setKustomizeOpt (cyclomatic 19) cmd/util/app.go:331 — 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.
D1 · Cyclomatic Complexity · appCollector.collectApps (cyclomatic 19) · ×1
  • appCollector.collectApps (cyclomatic 19) REDACTED:478 — 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.
D1 · Cyclomatic Complexity · reposerver.StartGPGWatcher (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · repository.getHelmRepos (cyclomatic 19) · ×1
  • repository.getHelmRepos (cyclomatic 19) REDACTED:1137 — 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.
D1 · Cyclomatic Complexity · Service.GenerateManifest (cyclomatic 19) · ×1
  • Service.GenerateManifest (cyclomatic 19) REDACTED:647 — 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.
D1 · Cyclomatic Complexity · server.bug21955WorkaroundInterceptor (cyclomatic 19) · ×1
  • server.bug21955WorkaroundInterceptor (cyclomatic 19) REDACTED:1781 — 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.
D1 · Cyclomatic Complexity · git.DiscoverGitHubAppInstallationID (cyclomatic 19) · ×1
  • git.DiscoverGitHubAppInstallationID (cyclomatic 19) REDACTED:766 — 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.
D1 · Cyclomatic Complexity · nativeHelmChart.GetTags (cyclomatic 19) · ×1
  • nativeHelmChart.GetTags (cyclomatic 19) REDACTED:496 — 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.
D1 · Cyclomatic Complexity · SettingsManager.InitializeSettings (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · kubectlResourceOperations.newApplyOptions (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Manager.PerformReverseDeletion (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.printResources (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · admin.NewRBACCanCommand (cyclomatic 18) · ×1
  • admin.NewRBACCanCommand (cyclomatic 18) cmd/argocd/commands/admin/settings_rbac.go:127 — 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 165). 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.
D1 · Cyclomatic Complexity · controller.NewApplicationController (cyclomatic 18) · ×1
  • controller.NewApplicationController (cyclomatic 18) controller/appcontroller.go:166 — controller.NewApplicationController has cyclomatic complexity 18 (threshold 15). Of this number, 9 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.
D1 · Cyclomatic Complexity · ApplicationController.handleObjectUpdated (cyclomatic 18) · ×1
  • ApplicationController.handleObjectUpdated (cyclomatic 18) controller/appcontroller.go:410 — 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.
D1 · Cyclomatic Complexity · application.streamApplicationListJSON (cyclomatic 18) · ×1
  • application.streamApplicationListJSON (cyclomatic 18) pkg/apiclient/application/forwarder_overwrite.go:166 — 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.
D1 · Cyclomatic Complexity · SyncWindows.canSyncFrom (cyclomatic 18) · ×1
  • SyncWindows.canSyncFrom (cyclomatic 18) pkg/apis/application/v1alpha1/types.go:3487 — 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.
D1 · Cyclomatic Complexity · repository.getPotentiallyValidManifestFile (cyclomatic 18) · ×1
  • repository.getPotentiallyValidManifestFile (cyclomatic 18) REDACTED:2144 — 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.
D1 · Cyclomatic Complexity · application.isTheSelectedOne (cyclomatic 18) · ×1
  • application.isTheSelectedOne (cyclomatic 18) server/application/application.go:2060 — 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.
D1 · Cyclomatic Complexity · Server.Create (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.RotateAuth (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Handler.ServeHTTP (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · db.ListRepoCertificates (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · nativeOCIClient.extract (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · compressedLayerExtracterStore.Push (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · sourceintegrity.parseGitCommitVerification (cyclomatic 18) · ×1
  • sourceintegrity.parseGitCommitVerification (cyclomatic 18) util/sourceintegrity/gpg.go:765 — 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.
D1 · Cyclomatic Complexity · tls.generate (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · syncContext.terminateHooksPreemptively (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationSetReconciler.setAppSetApplicationStatus (cyclomatic 17) · ×1
  • ApplicationSetReconciler.setAppSetApplicationStatus (cyclomatic 17) REDACTED:1172 — 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.
D1 · Cyclomatic Complexity · MatrixGenerator.GenerateParams (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.oauth2Login (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewLogoutCommand (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewRepoCredsAddCommand (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · admin.updateProjects (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · controller.isKnownOrphanedResourceExclusion (cyclomatic 17) · ×1
  • controller.isKnownOrphanedResourceExclusion (cyclomatic 17) controller/appcontroller.go:523 — 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.
D1 · Cyclomatic Complexity · ApplicationController.persistOperationStateFallback (cyclomatic 17) · ×1
  • ApplicationController.persistOperationStateFallback (cyclomatic 17) controller/appcontroller.go:1880 — 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.
D1 · Cyclomatic Complexity · client.startGRPCProxy (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · ApplicationSetStatus.SetConditions (cyclomatic 17) · ×1
  • ApplicationSetStatus.SetConditions (cyclomatic 17) pkg/apis/application/v1alpha1/applicationset_types.go:1042 — 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.
D1 · Cyclomatic Complexity · Repository.CopyCredentialsFromRepo (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.UpdatePassword (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · extension.validateConfigs (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.GetAppDetails (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · ArgoCDServer.getClaims (cyclomatic 17) · ×1
  • ArgoCDServer.getClaims (cyclomatic 17) REDACTED:1643 — 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.
D1 · Cyclomatic Complexity · argo.ValidateRepo (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · SSHCreds.Environ (cyclomatic 17) · ×1
  • SSHCreds.Environ (cyclomatic 17) REDACTED:404 — 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.
D1 · Cyclomatic Complexity · legacyConfig.merge (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · SettingsManager.appendResourceOverridesFromSplitKeys (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · tls.CreateServerTLSConfig (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · trace.collectorTLSCredentials (cyclomatic 17) · ×1
  • trace.collectorTLSCredentials (cyclomatic 17) REDACTED:35 — 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.
D1 · Cyclomatic Complexity · diff.NormalizeSecret (cyclomatic 16) · ×1
  • diff.NormalizeSecret (cyclomatic 16) REDACTED:779 — 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.
D1 · Cyclomatic Complexity · Requirement.Matches (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewApplicationDeleteCommand (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.newServerSideDiffStrategy (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewApplicationSetCreateCommand (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.printProject (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Server.Delete (cyclomatic 16) · ×1
  • Server.Delete (cyclomatic 16) server/application/application.go:1173 — 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.
D1 · Cyclomatic Complexity · ArgoCDServer.newStaticAssetsHandler (cyclomatic 16) · ×1
  • ArgoCDServer.newStaticAssetsHandler (cyclomatic 16) REDACTED:1526 — 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 1527). 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.
D1 · Cyclomatic Complexity · argo.ValidatePermissions (cyclomatic 16) · ×1
  • argo.ValidatePermissions (cyclomatic 16) util/argo/argo.go:734 — 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.
D1 · Cyclomatic Complexity · git.newAuth (cyclomatic 16) · ×1
  • git.newAuth (cyclomatic 16) REDACTED:512 — 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.
D1 · Cyclomatic Complexity · kube.PortForward (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · sourceintegrity.GetInstalledPGPKeys (cyclomatic 16) · ×1
  • sourceintegrity.GetInstalledPGPKeys (cyclomatic 16) util/sourceintegrity/gpg.go:439 — 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.
D1 · Cyclomatic Complexity · webhook.ParsePushEvent (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · webhook.NewParsers (cyclomatic 16) · ×1
  • 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.
D10 · Test Quality · No assertions · ×1
  • 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
D17 · Explicit Debt · FixmeComment repeated across 18 files · ×1
  • FixmeComment repeated across 18 files applicationset/generators/scm_utils.go:3 — 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.)
D2 · Cognitive Complexity · appStateManager.CompareAppState (cognitive 164) · ×1
  • 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.
D2 · Cognitive Complexity · kustomize.Build (cognitive 163) · ×1
  • 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.
D2 · Cognitive Complexity · admin.NewImportCommand (cognitive 135) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewApplicationSyncCommand (cognitive 123) · ×1
  • commands.NewApplicationSyncCommand (cognitive 123) cmd/argocd/commands/app.go:1711 — commands.NewApplicationSyncCommand has cognitive complexity 123 (threshold 15). Drivers by points: if/else 41 (91 pts), boolean chains 17, loops 6 (13 pts), match/switch 1 (2 pts) (nesting depth added 58). None of this is in the body itself: all 123 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.
D2 · Cognitive Complexity · Service.runManifestGenAsync (cognitive 117) · ×1
  • Service.runManifestGenAsync (cognitive 117) REDACTED:851 — Service.runManifestGenAsync has cognitive complexity 117 (threshold 15). Drivers by points: if/else 24 (98 pts), loops 4 (16 pts), boolean chains 3 (nesting depth added 86). Of this number, 111 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.
D2 · Cognitive Complexity · cache.populateIngressInfo (cognitive 116) · ×1
  • cache.populateIngressInfo (cognitive 116) controller/cache/info.go:149 — cache.populateIngressInfo has cognitive complexity 116 (threshold 15). Drivers by points: if/else 22 (82 pts), loops 7 (25 pts), boolean chains 9 (nesting depth added 78). 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.
D2 · Cognitive Complexity · syncContext.Sync (cognitive 99) · ×1
  • 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.
D2 · Cognitive Complexity · db.CreateRepoCertificate (cognitive 97) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.hideSecretData (cognitive 96) · ×1
  • ApplicationController.hideSecretData (cognitive 96) controller/appcontroller.go:786 — 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.
D2 · Cognitive Complexity · Server.ServerSideDiff (cognitive 89) · ×1
  • Server.ServerSideDiff (cognitive 89) server/application/application.go:3016 — 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.
D2 · Cognitive Complexity · dex.GenerateDexConfigYAML (cognitive 89) · ×1
  • dex.GenerateDexConfigYAML (cognitive 89) util/dex/config.go:19 — dex.GenerateDexConfigYAML has cognitive complexity 89 (threshold 15). Drivers by points: if/else 41 (81 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 43). 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.Reconcile (cognitive 88) · ×1
  • 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.
D2 · Cognitive Complexity · syncContext.getSyncTasks (cognitive 85) · ×1
  • syncContext.getSyncTasks (cognitive 85) gitops-engine/pkg/sync/sync_context.go:977 — 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.
D2 · Cognitive Complexity · Render.deeplyReplaceWithFilter (cognitive 84) · ×1
  • 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.
D2 · Cognitive Complexity · commands.unset (cognitive 80) · ×1
  • 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.
D2 · Cognitive Complexity · Handler.ServeHTTP (cognitive 80) · ×1
  • Handler.ServeHTTP (cognitive 80) REDACTED:92 — Handler.ServeHTTP has cognitive complexity 80 (threshold 15). Drivers by points: if/else 36 (61 pts), boolean chains 14, loops 2 (5 pts) (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.
D2 · Cognitive Complexity · ApplicationController.finalizeApplicationDeletion (cognitive 75) · ×1
  • ApplicationController.finalizeApplicationDeletion (cognitive 75) controller/appcontroller.go:1353 — 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.
D2 · Cognitive Complexity · ApplicationController.processRequestedAppOperation (cognitive 75) · ×1
  • ApplicationController.processRequestedAppOperation (cognitive 75) controller/appcontroller.go:1589 — 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.
D2 · Cognitive Complexity · ArgoCDWebhookHandler.HandleEvent (cognitive 75) · ×1
  • 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.
D2 · Cognitive Complexity · AppProject.ValidateProject (cognitive 74) · ×1
  • 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.
D2 · Cognitive Complexity · Service.runRepoOperation (cognitive 72) · ×1
  • Service.runRepoOperation (cognitive 72) REDACTED:348 — 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.
D2 · Cognitive Complexity · ApplicationController.processAppRefreshQueueItem (cognitive 66) · ×1
  • ApplicationController.processAppRefreshQueueItem (cognitive 66) controller/appcontroller.go:2119 — 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.
D2 · Cognitive Complexity · apiclient.NewClientWithContext (cognitive 66) · ×1
  • apiclient.NewClientWithContext (cognitive 66) pkg/apiclient/apiclient.go:223 — apiclient.NewClientWithContext has cognitive complexity 66 (threshold 15). Drivers by points: if/else 37 (60 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.
D2 · Cognitive Complexity · repository.helmTemplate (cognitive 66) · ×1
  • repository.helmTemplate (cognitive 66) REDACTED:1287 — 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.
D2 · Cognitive Complexity · appStateManager.SyncAppState (cognitive 64) · ×1
  • appStateManager.SyncAppState (cognitive 64) controller/sync.go:160 — appStateManager.SyncAppState has cognitive complexity 64 (threshold 15). Drivers by points: if/else 39 (55 pts), boolean chains 6, loops 2, match/switch 1 (nesting depth added 16). Of this number, 56 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.
D2 · Cognitive Complexity · clusterCache.watchEvents (cognitive 63) · ×1
  • clusterCache.watchEvents (cognitive 63) gitops-engine/pkg/cache/cluster.go:878 — clusterCache.watchEvents has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (48 pts), loops 3 (12 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 40). None of this is in the body itself: all 63 points belong to one function literal inside it that branches (line 879). 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.
D2 · Cognitive Complexity · Manager.UpdateApplicationSetApplicationStatus (cognitive 63) · ×1
  • 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.
D2 · Cognitive Complexity · clusterCache.GetManagedLiveObjs (cognitive 60) · ×1
  • clusterCache.GetManagedLiveObjs (cognitive 60) gitops-engine/pkg/cache/cluster.go:1646 — clusterCache.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.
D2 · Cognitive Complexity · cache.populateGatewayAPIRouteInfo (cognitive 60) · ×1
  • cache.populateGatewayAPIRouteInfo (cognitive 60) controller/cache/info.go:477 — 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.
D2 · Cognitive Complexity · SyncWindows.Matches (cognitive 59) · ×1
  • SyncWindows.Matches (cognitive 59) pkg/apis/application/v1alpha1/types.go:3266 — 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.
D2 · Cognitive Complexity · Server.GetManifests (cognitive 59) · ×1
  • Server.GetManifests (cognitive 59) server/application/application.go:493 — 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.
D2 · Cognitive Complexity · util.SetAppSpecOptions (cognitive 58) · ×1
  • util.SetAppSpecOptions (cognitive 58) cmd/util/app.go:180 — util.SetAppSpecOptions has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (47 pts), match/switch 4 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 28). Of this number, 23 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.
D2 · Cognitive Complexity · Manager.UpdateApplicationSetApplicationStatusProgress (cognitive 57) · ×1
  • 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.
D2 · Cognitive Complexity · cache.populatePodInfo (cognitive 57) · ×1
  • cache.populatePodInfo (cognitive 57) controller/cache/info.go:619 — 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.
D2 · Cognitive Complexity · commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cognitive 56) · ×1
  • 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.
D2 · Cognitive Complexity · repository.getResolvedValueFiles (cognitive 54) · ×1
  • repository.getResolvedValueFiles (cognitive 54) REDACTED:1463 — 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.
D2 · Cognitive Complexity · application.mergeLogStreams (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewLoginCommand (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · appStateManager.GetRepoObjs (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · commands.waitOnApplicationStatus (cognitive 50) · ×1
  • commands.waitOnApplicationStatus (cognitive 50) cmd/argocd/commands/app.go:2395 — commands.waitOnApplicationStatus has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 10, loops 2 (3 pts), match/switch 1 (nesting depth added 18). Of this number, 34 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.
D2 · Cognitive Complexity · reposerver.StartGPGWatcher (cognitive 50) · ×1
  • 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.
D2 · Cognitive Complexity · files.untar (cognitive 50) · ×1
  • 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.
D2 · Cognitive Complexity · SCMProviderGenerator.GenerateParams (cognitive 49) · ×1
  • 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.
D2 · Cognitive Complexity · Service.getManifestCacheEntry (cognitive 49) · ×1
  • Service.getManifestCacheEntry (cognitive 49) REDACTED:1044 — 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.createOrUpdateInCluster (cognitive 48) · ×1
  • ApplicationSetReconciler.createOrUpdateInCluster (cognitive 48) REDACTED:735 — 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 753). 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.
D2 · Cognitive Complexity · syncContext.runTasks (cognitive 47) · ×1
  • syncContext.runTasks (cognitive 47) gitops-engine/pkg/sync/sync_context.go:1629 — 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.
D2 · Cognitive Complexity · progressivesync.buildAppDependencyList (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.getAppHosts (cognitive 47) · ×1
  • ApplicationController.getAppHosts (cognitive 47) controller/appcontroller.go:678 — 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.
D2 · Cognitive Complexity · Service.UpdateRevisionForPaths (cognitive 47) · ×1
  • Service.UpdateRevisionForPaths (cognitive 47) REDACTED:3524 — 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.
D2 · Cognitive Complexity · Server.PodLogs (cognitive 47) · ×1
  • Server.PodLogs (cognitive 47) server/application/application.go:1871 — 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.
D2 · Cognitive Complexity · WebhookHandler.shouldRefreshMatrixGenerator (cognitive 45) · ×1
  • WebhookHandler.shouldRefreshMatrixGenerator (cognitive 45) applicationset/webhook/webhook.go:372 — 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.
D2 · Cognitive Complexity · controller.setApplicationHealth (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.autoSync (cognitive 45) · ×1
  • ApplicationController.autoSync (cognitive 45) controller/appcontroller.go:2824 — 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.
D2 · Cognitive Complexity · ApplicationController.executeHooks (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · application.init (cognitive 45) · ×1
  • application.init (cognitive 45) pkg/apiclient/application/forwarder_overwrite.go:284 — application.init has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 7 (15 pts), boolean chains 1 (nesting depth added 21). None of this is in the body itself: all 45 points belong to 3 function literals inside it that branch (lines 325, 285, 318). 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.
D2 · Cognitive Complexity · Service.populateHelmAppDetails (cognitive 45) · ×1
  • Service.populateHelmAppDetails (cognitive 45) REDACTED:2598 — Service.populateHelmAppDetails has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (37 pts), loops 4 (6 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.
D2 · Cognitive Complexity · ArgoCDServer.watchSettings (cognitive 44) · ×1
  • ArgoCDServer.watchSettings (cognitive 44) REDACTED:815 — 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.
D2 · Cognitive Complexity · kube.SetAppInstanceLabel (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · health.getCorev1PodHealth (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · Manager.PerformReverseDeletion (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewLogoutCommand (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · cache.generateGatewayURLs (cognitive 43) · ×1
  • cache.generateGatewayURLs (cognitive 43) controller/cache/info.go:369 — 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.
D2 · Cognitive Complexity · extension.validateConfigs (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · settings.parseAccounts (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · sourceintegrity.parseGitCommitVerification (cognitive 43) · ×1
  • sourceintegrity.parseGitCommitVerification (cognitive 43) util/sourceintegrity/gpg.go:765 — 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.
D2 · Cognitive Complexity · PullRequestGenerator.selectServiceProvider (cognitive 42) · ×1
  • 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.
D2 · Cognitive Complexity · Server.resolveSourceRevisions (cognitive 42) · ×1
  • Server.resolveSourceRevisions (cognitive 42) server/application/application.go:2216 — 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.
D2 · Cognitive Complexity · nativeHelmChart.ExtractChart (cognitive 42) · ×1
  • nativeHelmChart.ExtractChart (cognitive 42) REDACTED:191 — 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.
D2 · Cognitive Complexity · Server.Update (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · ListGenerator.GenerateParams (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · commands.printAppSummaryTable (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · repository.GenerateManifests (cognitive 40) · ×1
  • repository.GenerateManifests (cognitive 40) REDACTED:1742 — 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.
D2 · Cognitive Complexity · tgz.tgzFile (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · cache.buildGraph (cognitive 39) · ×1
  • cache.buildGraph (cognitive 39) gitops-engine/pkg/cache/cluster.go:1562 — 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.
D2 · Cognitive Complexity · db.RemoveRepoCertificates (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · template.GenerateApplications (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · compressedLayerExtracterStore.Push (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · diff.HideSecretData (cognitive 37) · ×1
  • diff.HideSecretData (cognitive 37) REDACTED:935 — 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.setAppSetApplicationStatus (cognitive 37) · ×1
  • ApplicationSetReconciler.setAppSetApplicationStatus (cognitive 37) REDACTED:1172 — 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.
D2 · Cognitive Complexity · admin.generateProjectAllowList (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · Repository.CopyCredentialsFrom (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.setApplicationSetStatusCondition (cognitive 36) · ×1
  • ApplicationSetReconciler.setApplicationSetStatusCondition (cognitive 36) REDACTED:486 — ApplicationSetReconciler.setApplicationSetStatusCondition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 15). Of this number, 32 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.
D2 · Cognitive Complexity · commands.NewApplicationDiffCommand (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.cleanupHooks (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · normalizers.normalize (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · nativeOCIClient.extract (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · clusterSecretEventHandler.queueRelatedAppGenerators (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · MatrixGenerator.GenerateParams (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · Cluster.rawRestConfig (cognitive 34) · ×1
  • Cluster.rawRestConfig (cognitive 34) pkg/apis/application/v1alpha1/types.go:4286 — 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.
D2 · Cognitive Complexity · repository.getHelmRepos (cognitive 34) · ×1
  • repository.getHelmRepos (cognitive 34) REDACTED:1137 — 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.
D2 · Cognitive Complexity · Server.Get (cognitive 34) · ×1
  • Server.Get (cognitive 34) server/application/application.go:792 — 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.
D2 · Cognitive Complexity · nativeHelmChart.GetTags (cognitive 34) · ×1
  • nativeHelmChart.GetTags (cognitive 34) REDACTED:496 — 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.
D2 · Cognitive Complexity · clusterCache.setNode (cognitive 33) · ×1
  • clusterCache.setNode (cognitive 33) gitops-engine/pkg/cache/cluster.go:557 — clusterCache.setNode 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.
D2 · Cognitive Complexity · syncContext.applyObject (cognitive 33) · ×1
  • syncContext.applyObject (cognitive 33) gitops-engine/pkg/sync/sync_context.go:1419 — 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.
D2 · Cognitive Complexity · Server.RotateAuth (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · db.ListRepoCertificates (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · clusterCache.onNodeRemoved (cognitive 32) · ×1
  • clusterCache.onNodeRemoved (cognitive 32) gitops-engine/pkg/cache/cluster.go:1861 — clusterCache.onNodeRemoved has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 21). 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.
D2 · Cognitive Complexity · admin.loadClusters (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · liveStateCache.getCluster (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · Server.Sync (cognitive 32) · ×1
  • Server.Sync (cognitive 32) server/application/application.go:2100 — Server.Sync has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 3, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · kustomize.getImages (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · SettingsManager.InitializeSettings (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · tls.CreateServerTLSConfig (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · diff.hide (cognitive 31) · ×1
  • diff.hide (cognitive 31) REDACTED:1013 — 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.
D2 · Cognitive Complexity · commands.NewApplicationSetDeleteCommand (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · headless.MaybeStartLocalServer (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · controller.NewApplicationController (cognitive 31) · ×1
  • controller.NewApplicationController (cognitive 31) controller/appcontroller.go:166 — controller.NewApplicationController has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 260). 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.
D2 · Cognitive Complexity · ApplicationController.getResourceTree (cognitive 31) · ×1
  • ApplicationController.getResourceTree (cognitive 31) controller/appcontroller.go:546 — 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.
D2 · Cognitive Complexity · ApplicationController.handleRefreshAnnotation (cognitive 31) · ×1
  • ApplicationController.handleRefreshAnnotation (cognitive 31) controller/appcontroller.go:2603 — 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.
D2 · Cognitive Complexity · cache.populateNodeInfo (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · cache.populateIstioVirtualServiceInfo (cognitive 31) · ×1
  • cache.populateIstioVirtualServiceInfo (cognitive 31) controller/cache/info.go:265 — 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.
D2 · Cognitive Complexity · Repository.CopyCredentialsFromRepo (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · Server.GetManifestsWithFiles (cognitive 31) · ×1
  • Server.GetManifestsWithFiles (cognitive 31) server/application/application.go:659 — 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.
D2 · Cognitive Complexity · Server.RunResourceActionV2 (cognitive 31) · ×1
  • Server.RunResourceActionV2 (cognitive 31) server/application/application.go:2686 — 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.
D2 · Cognitive Complexity · terminalHandler.ServeHTTP (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · repository.isSourceInHistory (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · generators.parseFileParams (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewGenDexConfigCommand (cognitive 30) · ×1
  • commands.NewGenDexConfigCommand (cognitive 30) REDACTED:150 — commands.NewGenDexConfigCommand has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (10 pts) (nesting depth added 21). None of this is in the body itself: all 30 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.
D2 · Cognitive Complexity · Service.handleCommitRequest (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · sharding.GetClusterSharding (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · application.streamApplicationListJSON (cognitive 30) · ×1
  • application.streamApplicationListJSON (cognitive 30) pkg/apiclient/application/forwarder_overwrite.go:166 — 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.
D2 · Cognitive Complexity · exec.RunCommandExt (cognitive 30) · ×1
  • exec.RunCommandExt (cognitive 30) util/exec/exec.go:184 — exec.RunCommandExt has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 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.
D2 · Cognitive Complexity · clusterCache.sync (cognitive 29) · ×1
  • clusterCache.sync (cognitive 29) gitops-engine/pkg/cache/cluster.go:1172 — clusterCache.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 1255, 1179). 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.
D2 · Cognitive Complexity · WebhookHandler.shouldRefreshMergeGenerator (cognitive 29) · ×1
  • WebhookHandler.shouldRefreshMergeGenerator (cognitive 29) applicationset/webhook/webhook.go:526 — 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.
D2 · Cognitive Complexity · commands.printResources (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewClusterAddCommand (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewRepoAddCommand (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.handleObjectUpdated (cognitive 29) · ×1
  • ApplicationController.handleObjectUpdated (cognitive 29) controller/appcontroller.go:410 — 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.
D2 · Cognitive Complexity · normalizers.NewIgnoreNormalizer (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · legacyConfig.merge (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · AWSCodeCommitProvider.listRepoNames (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · webhook.shouldRefreshPRGenerator (cognitive 28) · ×1
  • webhook.shouldRefreshPRGenerator (cognitive 28) applicationset/webhook/webhook.go:309 — webhook.shouldRefreshPRGenerator has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · commands.NewCommand (cognitive 28) · ×1
  • 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 119). 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.
D2 · Cognitive Complexity · admin.NewExportCommand (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · admin.runClusterNamespacesCommand (cognitive 28) · ×1
  • admin.runClusterNamespacesCommand (cognitive 28) cmd/argocd/commands/admin/cluster.go:275 — 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.
D2 · Cognitive Complexity · admin.updateProjects (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.persistOperationStateFallback (cognitive 28) · ×1
  • ApplicationController.persistOperationStateFallback (cognitive 28) controller/appcontroller.go:1880 — 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.
D2 · Cognitive Complexity · Server.validateAndNormalizeApp (cognitive 28) · ×1
  • Server.validateAndNormalizeApp (cognitive 28) server/application/application.go:1337 — Server.validateAndNormalizeApp has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 2, loops 1 (2 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.
D2 · Cognitive Complexity · ClientApp.SetGroupsClaimFromEndpoint (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · SessionManager.Parse (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · sourceintegrity.SyncKeyRingFromDirectory (cognitive 28) · ×1
  • sourceintegrity.SyncKeyRingFromDirectory (cognitive 28) util/sourceintegrity/gpg.go:572 — 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.
D2 · Cognitive Complexity · ArgoCDWebhookHandler.HandleRegistryEvent (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · clusterCache.startMissingWatches (cognitive 27) · ×1
  • clusterCache.startMissingWatches (cognitive 27) gitops-engine/pkg/cache/cluster.go:733 — clusterCache.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 761). 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.
D2 · Cognitive Complexity · clusterCache.processCrossNamespaceChildren (cognitive 27) · ×1
  • clusterCache.processCrossNamespaceChildren (cognitive 27) gitops-engine/pkg/cache/cluster.go:1431 — clusterCache.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.
D2 · Cognitive Complexity · commands.printApplicationHistoryTable (cognitive 27) · ×1
  • commands.printApplicationHistoryTable (cognitive 27) cmd/argocd/commands/app.go:2637 — 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.
D2 · Cognitive Complexity · commands.NewApplicationManifestsCommand (cognitive 27) · ×1
  • commands.NewApplicationManifestsCommand (cognitive 27) cmd/argocd/commands/app.go:2836 — 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 2863). 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.
D2 · Cognitive Complexity · DefaultPluginHandler.ListAvailablePlugins (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · SyncWindows.canSyncFrom (cognitive 27) · ×1
  • SyncWindows.canSyncFrom (cognitive 27) pkg/apis/application/v1alpha1/types.go:3487 — 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.
D2 · Cognitive Complexity · VM.ExecuteResourceActionDiscovery (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · ClientApp.GetUserInfo (cognitive 27) · ×1
  • ClientApp.GetUserInfo (cognitive 27) REDACTED:983 — ClientApp.GetUserInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (24 pts), match/switch 2, 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.
D2 · Cognitive Complexity · webhook.NewParsers (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · syncContext.terminateHooksPreemptively (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.removeFinalizerOnInvalidDestination (cognitive 26) · ×1
  • ApplicationSetReconciler.removeFinalizerOnInvalidDestination (cognitive 26) REDACTED:999 — 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.
D2 · Cognitive Complexity · DuckTypeGenerator.GenerateParams (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · commands.newServerSideDiffStrategy (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewRepoCredsAddCommand (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · main.generateCommandsDocs (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · repository.getObjsFromYAMLOrJSON (cognitive 26) · ×1
  • repository.getObjsFromYAMLOrJSON (cognitive 26) REDACTED:2050 — 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.
D2 · Cognitive Complexity · ArgoCDServer.getClaims (cognitive 26) · ×1
  • ArgoCDServer.getClaims (cognitive 26) REDACTED:1643 — 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.
D2 · Cognitive Complexity · SSHCreds.Environ (cognitive 26) · ×1
  • SSHCreds.Environ (cognitive 26) REDACTED:404 — 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.
D2 · Cognitive Complexity · syncTasks.adjustDeps (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · scm_provider.matchFilter (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewApplicationLogsCommand (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · util.setHelmOpt (cognitive 25) · ×1
  • util.setHelmOpt (cognitive 25) cmd/util/app.go:422 — 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.
D2 · Cognitive Complexity · ApplicationController.persistAppStatus (cognitive 25) · ×1
  • ApplicationController.persistAppStatus (cognitive 25) controller/appcontroller.go:2724 — ApplicationController.persistAppStatus has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (25 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.
D2 · Cognitive Complexity · ApplicationController.applicationEventHandlerFuncs (cognitive 25) · ×1
  • ApplicationController.applicationEventHandlerFuncs (cognitive 25) controller/appcontroller.go:3255 — ApplicationController.applicationEventHandlerFuncs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8 (nesting depth added 2). None of this is in the body itself: all 25 points belong to 3 function literals inside it that branch (lines 3271, 3314, 3257). 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.
D2 · Cognitive Complexity · Hydrator.ProcessHydrationQueueItem (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · appCollector.collectApps (cognitive 25) · ×1
  • appCollector.collectApps (cognitive 25) REDACTED:478 — 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.
D2 · Cognitive Complexity · client.startGRPCProxy (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · apiclient.buildTLSClientConfig (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · repository.findManifests (cognitive 25) · ×1
  • repository.findManifests (cognitive 25) REDACTED:2000 — 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.
D2 · Cognitive Complexity · repository.getPotentiallyValidManifestFile (cognitive 25) · ×1
  • repository.getPotentiallyValidManifestFile (cognitive 25) REDACTED:2144 — 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.
D2 · Cognitive Complexity · ArgoCDServer.Run (cognitive 25) · ×1
  • ArgoCDServer.Run (cognitive 25) REDACTED:591 — ArgoCDServer.Run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (23 pts), match/switch 2 (nesting depth added 4). Of this number, 17 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.
D2 · Cognitive Complexity · argo.ValidatePermissions (cognitive 25) · ×1
  • argo.ValidatePermissions (cognitive 25) util/argo/argo.go:734 — 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.
D2 · Cognitive Complexity · SettingsManager.appendResourceOverridesFromSplitKeys (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · sourceintegrity.GetInstalledPGPKeys (cognitive 25) · ×1
  • sourceintegrity.GetInstalledPGPKeys (cognitive 25) util/sourceintegrity/gpg.go:439 — 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.
D2 · Cognitive Complexity · versions.sortVersionLinks (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · AzureDevOpsProvider.GetBranches (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Render.RenderGeneratorParams (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewApplicationGetCommand (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · sharding.getOrUpdateShardNumberForController (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · appStateManager.evaluateRevisionChanges (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Server.Get (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · argo.GetRefSources (cognitive 24) · ×1
  • argo.GetRefSources (cognitive 24) util/argo/argo.go:635 — 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.
D2 · Cognitive Complexity · grpc.ResolveClientIP (cognitive 24) · ×1
  • grpc.ResolveClientIP (cognitive 24) util/grpc/logging.go:203 — 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.
D2 · Cognitive Complexity · ClientApp.HandleCallback (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · diff.NormalizeSecret (cognitive 23) · ×1
  • diff.NormalizeSecret (cognitive 23) REDACTED:779 — 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.
D2 · Cognitive Complexity · MergeGenerator.GenerateParams (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubMetricsTransport.RoundTrip (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · command.NewCommand (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · commands.getResourceStates (cognitive 23) · ×1
  • commands.getResourceStates (cognitive 23) cmd/argocd/commands/app.go:2163 — 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.
D2 · Cognitive Complexity · ApplicationController.Run (cognitive 23) · ×1
  • ApplicationController.Run (cognitive 23) controller/appcontroller.go:930 — 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.
D2 · Cognitive Complexity · client.WatchApplicationSetWithRetry (cognitive 23) · ×1
  • client.WatchApplicationSetWithRetry (cognitive 23) pkg/apiclient/apiclient.go:1032 — 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 1036). 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.
D2 · Cognitive Complexity · client.WatchApplicationWithRetry (cognitive 23) · ×1
  • client.WatchApplicationWithRetry (cognitive 23) pkg/apiclient/apiclient.go:1075 — 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 1079). 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.
D2 · Cognitive Complexity · Server.UpdatePassword (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · server.bug21955WorkaroundInterceptor (cognitive 23) · ×1
  • server.bug21955WorkaroundInterceptor (cognitive 23) REDACTED:1781 — 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.
D2 · Cognitive Complexity · discovery.DetectConfigManagementPlugin (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · nativeGitClient.getRefsFromCacheOrFetch (cognitive 23) · ×1
  • nativeGitClient.getRefsFromCacheOrFetch (cognitive 23) REDACTED:856 — 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.
D2 · Cognitive Complexity · manifeststream.receiveFile (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · Enforcer.EnforceErr (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewRunDexCommand (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewApplicationSetCreateCommand (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewClusterRemoveCommand (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewVersionCmd (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · client.executeRequest (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · application.parseLogsStream (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · Handler.ServeHTTP (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ArgoCDServer.newStaticAssetsHandler (cognitive 22) · ×1
  • ArgoCDServer.newStaticAssetsHandler (cognitive 22) REDACTED:1526 — 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 1527). 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.
D2 · Cognitive Complexity · path.CheckOutOfBoundsSymlinks (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · git.DiscoverGitHubAppInstallationID (cognitive 22) · ×1
  • git.DiscoverGitHubAppInstallationID (cognitive 22) REDACTED:766 — 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.
D2 · Cognitive Complexity · nativeGitClient.LsFiles (cognitive 22) · ×1
  • nativeGitClient.LsFiles (cognitive 22) REDACTED:749 — 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.
D2 · Cognitive Complexity · helm.DependencyBuild (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · lua.cleanReturnedObj (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · diff.applyPatch (cognitive 21) · ×1
  • diff.applyPatch (cognitive 21) REDACTED:485 — 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.
D2 · Cognitive Complexity · KubectlCmd.filterAPIResources (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · kubectlResourceOperations.newApplyOptions (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewApplicationDeleteCommand (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · commands.printManifestAsTable (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · commit.WriteForPaths (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · Hydrator.hydrate (cognitive 21) · ×1
  • Hydrator.hydrate (cognitive 21) controller/hydrator/hydrator.go:431 — 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.
D2 · Cognitive Complexity · ApplicationSetStatus.SetConditions (cognitive 21) · ×1
  • ApplicationSetStatus.SetConditions (cognitive 21) pkg/apis/application/v1alpha1/applicationset_types.go:1042 — 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.
D2 · Cognitive Complexity · repository.resolveReferencedSources (cognitive 21) · ×1
  • repository.resolveReferencedSources (cognitive 21) REDACTED:581 — repository.resolveReferencedSources has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 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.
D2 · Cognitive Complexity · repository.fetch (cognitive 21) · ×1
  • repository.fetch (cognitive 21) REDACTED:3112 — 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.
D2 · Cognitive Complexity · Server.GetAppDetails (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · cache.AddCacheFlagsToCmd (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · nativeGitClient.Checkout (cognitive 21) · ×1
  • nativeGitClient.Checkout (cognitive 21) REDACTED:816 — 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.
D2 · Cognitive Complexity · nativeGitClient.LsSignatures (cognitive 21) · ×1
  • nativeGitClient.LsSignatures (cognitive 21) REDACTED:1622 — 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.
D2 · Cognitive Complexity · helm.GetParameters (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · VM.ExecuteResourceAction (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · SessionManager.VerifyToken (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · settings.updateSettingsFromConfigMap (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · webhook.fetchChangesFromBitbucketServer (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.deleteInCluster (cognitive 20) · ×1
  • ApplicationSetReconciler.deleteInCluster (cognitive 20) REDACTED:900 — 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 932). 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.
D2 · Cognitive Complexity · scm_provider.compileFilters (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewCommand (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · commands.printManifests (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · admin.reconcileApplications (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · admin.NewGenRepoSpecCommand (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · controller.normalizeTargetResources (cognitive 20) · ×1
  • controller.normalizeTargetResources (cognitive 20) controller/sync.go:496 — 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.
D2 · Cognitive Complexity · ApplicationController.needRefreshAppStatus (cognitive 20) · ×1
  • ApplicationController.needRefreshAppStatus (cognitive 20) controller/appcontroller.go:2451 — ApplicationController.needRefreshAppStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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.
D2 · Cognitive Complexity · cache.loadRedisCreds (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · cmp.receiveFile (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · nativeGitClient.cleanupOrphanedTempPackfiles (cognitive 20) · ×1
  • nativeGitClient.cleanupOrphanedTempPackfiles (cognitive 20) REDACTED:661 — 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.
D2 · Cognitive Complexity · nativeGitClient.lsRemoteOptimized (cognitive 20) · ×1
  • nativeGitClient.lsRemoteOptimized (cognitive 20) REDACTED:1030 — 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.
D2 · Cognitive Complexity · nativeGitClient.resolveRevisionWithOptions (cognitive 20) · ×1
  • nativeGitClient.resolveRevisionWithOptions (cognitive 20) REDACTED:1273 — nativeGitClient.resolveRevisionWithOptions 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.
D2 · Cognitive Complexity · settings.GetLegacyDestinations (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · sourceintegrity.describeProblems (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · clusterCache.processNamespaceHierarchy (cognitive 19) · ×1
  • clusterCache.processNamespaceHierarchy (cognitive 19) gitops-engine/pkg/cache/cluster.go:1532 — clusterCache.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.
D2 · Cognitive Complexity · sync.dedupLiveResources (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.getMinRequeueAfter (cognitive 19) · ×1
  • ApplicationSetReconciler.getMinRequeueAfter (cognitive 19) REDACTED:645 — ApplicationSetReconciler.getMinRequeueAfter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 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.
D2 · Cognitive Complexity · Requirement.Matches (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · commands.oauth2Login (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · settingsOpts.createSettingsManager (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · util.setKustomizeOpt (cognitive 19) · ×1
  • util.setKustomizeOpt (cognitive 19) cmd/util/app.go:331 — 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.
D2 · Cognitive Complexity · controller.NormalizeTargetObjects (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationController.processAppOperationQueueItem (cognitive 19) · ×1
  • ApplicationController.processAppOperationQueueItem (cognitive 19) controller/appcontroller.go:1057 — 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.
D2 · Cognitive Complexity · liveStateCache.handleModEvent (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · controller.isAppSyncStatusRefreshed (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · reposerver.NewServer (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · Service.GetRevisionMetadata (cognitive 19) · ×1
  • Service.GetRevisionMetadata (cognitive 19) REDACTED:2818 — 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.
D2 · Cognitive Complexity · Service.GetOciFiles (cognitive 19) · ×1
  • Service.GetOciFiles (cognitive 19) REDACTED:3705 — 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.
D2 · Cognitive Complexity · application.isTheSelectedOne (cognitive 19) · ×1
  • application.isTheSelectedOne (cognitive 19) server/application/application.go:2060 — 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.
D2 · Cognitive Complexity · Server.ListResourceEvents (cognitive 19) · ×1
  • Server.ListResourceEvents (cognitive 19) server/application/application.go:911 — 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.
D2 · Cognitive Complexity · Server.NormalizeProjs (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · nativeOCIClient.getTags (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · SettingsManager.GetKustomizeSettings (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · settings.parseManifests (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · clusterCache.checkPermission (cognitive 18) · ×1
  • clusterCache.checkPermission (cognitive 18) gitops-engine/pkg/cache/cluster.go:1118 — clusterCache.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.
D2 · Cognitive Complexity · BitbucketServerProvider.ListRepos (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · commands.compareManifests (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · commands.modifyResourceListCmd (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · admin.NewRBACCanCommand (cognitive 18) · ×1
  • admin.NewRBACCanCommand (cognitive 18) cmd/argocd/commands/admin/settings_rbac.go:127 — 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 165). 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.
D2 · Cognitive Complexity · main.main (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · util.ConstructSource (cognitive 18) · ×1
  • util.ConstructSource (cognitive 18) cmd/util/app.go:675 — 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 677). 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.
D2 · Cognitive Complexity · util.FilterResources (cognitive 18) · ×1
  • util.FilterResources (cognitive 18) cmd/util/app.go:891 — 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.
D2 · Cognitive Complexity · controller.isKnownOrphanedResourceExclusion (cognitive 18) · ×1
  • controller.isKnownOrphanedResourceExclusion (cognitive 18) controller/appcontroller.go:523 — 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.
D2 · Cognitive Complexity · appStateManager.EvaluateAppRevisionsChanges (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Server.Delete (cognitive 18) · ×1
  • Server.Delete (cognitive 18) server/application/application.go:1173 — 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.
D2 · Cognitive Complexity · argo.verifyGenerateManifests (cognitive 18) · ×1
  • argo.verifyGenerateManifests (cognitive 18) util/argo/argo.go:898 — argo.verifyGenerateManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · diff.diffArrayCached (cognitive 18) · ×1
  • diff.diffArrayCached (cognitive 18) util/argo/diff/diff.go:328 — 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.
D2 · Cognitive Complexity · git.newAuth (cognitive 18) · ×1
  • git.newAuth (cognitive 18) REDACTED:512 — 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.
D2 · Cognitive Complexity · git.ExtractOrgFromRepoURL (cognitive 18) · ×1
  • git.ExtractOrgFromRepoURL (cognitive 18) REDACTED:897 — 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.
D2 · Cognitive Complexity · grpc.logRequest (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Cmd.RepoAdd (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · tls.generate (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · trace.collectorTLSCredentials (cognitive 18) · ×1
  • trace.collectorTLSCredentials (cognitive 18) REDACTED:35 — 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.
D2 · Cognitive Complexity · versions.MaxVersion (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · webhook.newBitbucketClient (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · health.GetHealthCheckFunc (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · controllers.nestedGeneratorHasClusterGenerator (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ApplicationSetReconciler.migrateStatus (cognitive 17) · ×1
  • ApplicationSetReconciler.migrateStatus (cognitive 17) REDACTED:1083 — 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.
D2 · Cognitive Complexity · generators.filterPaths (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · progressivesync.getAppsToSync (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewCommand (cognitive 17) · ×1
  • commands.NewCommand (cognitive 17) REDACTED:54 — commands.NewCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 93). 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.
D2 · Cognitive Complexity · commands.warnOnProblems (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · application.processAppFields (cognitive 17) · ×1
  • application.processAppFields (cognitive 17) pkg/apiclient/application/forwarder_overwrite.go:138 — 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.
D2 · Cognitive Complexity · repository.runConfigManagementPluginSidecars (cognitive 17) · ×1
  • repository.runConfigManagementPluginSidecars (cognitive 17) REDACTED:2435 — 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.
D2 · Cognitive Complexity · Server.getAppEnforceRBAC (cognitive 17) · ×1
  • Server.getAppEnforceRBAC (cognitive 17) server/application/application.go:177 — 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.
D2 · Cognitive Complexity · Server.Watch (cognitive 17) · ×1
  • Server.Watch (cognitive 17) server/application/application.go:1266 — 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.
D2 · Cognitive Complexity · Server.Create (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Server.getCluster (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · deeplinks.EvaluateDeepLinksResponse (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · RBACPolicyEnforcer.EnforceClaims (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · argo.GetGlobalProjects (cognitive 17) · ×1
  • argo.GetGlobalProjects (cognitive 17) util/argo/argo.go:1224 — 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.
D2 · Cognitive Complexity · resourceTracking.RemoveAppInstance (cognitive 17) · ×1
  • resourceTracking.RemoveAppInstance (cognitive 17) util/argo/resource_tracking.go:192 — 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.
D2 · Cognitive Complexity · lua.strftime (cognitive 17) · ×1
  • lua.strftime (cognitive 17) util/lua/oslib_safe.go:109 — 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.
D2 · Cognitive Complexity · oidc.hasUserReadScope (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · providerImpl.Verify (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · webhook.ParsePushEvent (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · gitOpsEngine.Sync (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · syncContext.autoCreateNamespace (cognitive 16) · ×1
  • syncContext.autoCreateNamespace (cognitive 16) gitops-engine/pkg/sync/sync_context.go:1191 — 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.
D2 · Cognitive Complexity · generators.generateRepoSourceFileParams (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · pull_request.compileFilters (cognitive 16) · ×1
  • pull_request.compileFilters (cognitive 16) applicationset/services/pull_request/utils.go:11 — 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.
D2 · Cognitive Complexity · AWSCodeCommitProvider.RepoHasPath (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · GitlabProvider.listBranches (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · commands.NewAccountSessionTokenCommand (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · admin.checkPolicy (cognitive 16) · ×1
  • admin.checkPolicy (cognitive 16) cmd/argocd/commands/admin/settings_rbac.go:382 — admin.checkPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 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.
D2 · Cognitive Complexity · controller.restoreNonIgnoredFields (cognitive 16) · ×1
  • controller.restoreNonIgnoredFields (cognitive 16) controller/sync.go:651 — 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.
D2 · Cognitive Complexity · ApplicationController.setOperationState (cognitive 16) · ×1
  • ApplicationController.setOperationState (cognitive 16) controller/appcontroller.go:1803 — 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.
D2 · Cognitive Complexity · ApplicationController.canProcessAppWithDestination (cognitive 16) · ×1
  • ApplicationController.canProcessAppWithDestination (cognitive 16) controller/appcontroller.go:3065 — 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.
D2 · Cognitive Complexity · main.newCommand (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · client.newConn (cognitive 16) · ×1
  • client.newConn (cognitive 16) pkg/apiclient/apiclient.go:616 — 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.
D2 · Cognitive Complexity · ApplicationTree.GetSummary (cognitive 16) · ×1
  • ApplicationTree.GetSummary (cognitive 16) pkg/apis/application/v1alpha1/types.go:2149 — 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.
D2 · Cognitive Complexity · repository.getPotentiallyValidManifests (cognitive 16) · ×1
  • repository.getPotentiallyValidManifests (cognitive 16) REDACTED:2220 — 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 2234). 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.
D2 · Cognitive Complexity · Server.Create (cognitive 16) · ×1
  • Server.Create (cognitive 16) server/application/application.go:350 — 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.
D2 · Cognitive Complexity · Server.Watch (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Server.updateAppSet (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · extension.parseAndValidateConfig (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Server.CreateRepository (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · argo.ValidateRepo (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ignoreNormalizer.Normalize (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · resourceTracking.Normalize (cognitive 16) · ×1
  • resourceTracking.Normalize (cognitive 16) util/argo/resource_tracking.go:262 — 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.
D2 · Cognitive Complexity · cert.ParseTLSCertificatesFromStream (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · cmp.sendFile (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · db.SecretToCluster (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · secretsRepositoryBackend.getRepositorySecret (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · HTTPSCreds.Environ (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Cmd.template (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · retryTransport.RoundTrip (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · kube.PortForward (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · manifeststream.sendFile (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · settings.secretToCluster (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · tls.getTLSConfigCustomizer (cognitive 16) · ×1
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
D4 · Code Duplication · Near-duplicate member pair (50 shared lines) · ×1
  • 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.
D4 · Code Duplication · Near-duplicate member pair (29 shared lines) · ×1
  • Near-duplicate member pair (29 shared lines) REDACTED:3300 — REDACTED:3300-3376 | REDACTED:3378-3439 — 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:357-407 — 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 · Duplicated block (64 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (52–53 lines × 2) · ×1
  • Duplicated block (52–53 lines × 2) REDACTED:270 — REDACTED:270-322 | REDACTED:553-604 — 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.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) cmd/argocd/commands/app.go:2602 — cmd/argocd/commands/app.go:2602-2627 | cmd/util/app.go:524-549 — 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:2602` 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.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) gitops-engine/pkg/utils/kube/ctl.go:286 — gitops-engine/pkg/utils/kube/ctl.go:286-310 | gitops-engine/pkg/utils/kube/ctl.go:317-341 — 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:286` 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) applicationset/services/pull_request/github.go:25 — applicationset/services/pull_request/github.go:25-48 | 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.
D4 · Code Duplication · Duplicated block (19–21 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) cmd/argocd/commands/app.go:2896 — cmd/argocd/commands/app.go:2896-2913 | 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:2896` 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:2895` 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 · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) server/application/application.go:1683 — server/application/application.go:1683-1700 | server/application/application.go:1744-1761 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) controller/appcontroller.go:1069 — controller/appcontroller.go:1069-1084 | controller/appcontroller.go:2133-2147 | controller/appcontroller.go:2383-2397 — 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:1069` 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) controller/cache/info.go:245 — controller/cache/info.go:245-256 | controller/cache/info.go:453-466 — 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:245` 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) cmd/argocd/commands/app.go:3149 — cmd/argocd/commands/app.go:3149-3161 | cmd/argocd/commands/app.go:3222-3233 | cmd/argocd/commands/app.go:3297-3308 — 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.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) cmd/argocd/commands/admin/cluster.go:380 — cmd/argocd/commands/admin/cluster.go:380-391 | cmd/argocd/commands/admin/cluster.go:433-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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:380` 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • 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:3235-3246 — 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.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) controller/appcontroller.go:1819 — controller/appcontroller.go:1819-1827 | controller/appcontroller.go:1937-1948 — 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:1819` 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 10) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 7) · ×1
  • Duplicated block (9–11 lines × 7) cmd/argocd/commands/app.go:3003 — cmd/argocd/commands/app.go:3003-3011 | cmd/argocd/commands/app.go:3030-3039 | cmd/argocd/commands/app.go:3101-3109 | 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.
D4 · Code Duplication · Duplicated block (8–10 lines × 28) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 10) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • 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:379-387 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) cmd/argocd/commands/account.go:91 — cmd/argocd/commands/account.go:91-98 | cmd/argocd/commands/app.go:3142-3149 | cmd/argocd/commands/app.go:3289-3297 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) server/application/application.go:711 — server/application/application.go:711-719 | server/application/application.go:856-863 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 14) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) REDACTED:3324 — REDACTED:3324-3331 | REDACTED:3396-3403 | REDACTED:3470-3473 — 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:3324` 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.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • 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:2701-2707 | cmd/argocd/commands/app.go:3002-3008 | cmd/argocd/commands/app.go:3029-3035 | cmd/argocd/commands/app.go:3100-3106 | 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:2700` 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 · Duplicated block (7 lines × 9) · ×1
  • Duplicated block (7 lines × 9) cmd/argocd/commands/app.go:870 — cmd/argocd/commands/app.go:870-876 | cmd/argocd/commands/app.go:3003-3009 | cmd/argocd/commands/app.go:3030-3037 | cmd/argocd/commands/app.go:3101-3107 | 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:3001` 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 · Duplicated block (7 lines × 8) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 32) · ×1
  • 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:3142-3147 | cmd/argocd/commands/app.go:3289-3295 | 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:3288` 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.
D4 · Code Duplication · Duplicated block (6 lines × 18) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) cmd/argocd/commands/app.go:2757 — cmd/argocd/commands/app.go:2757-2762 | 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:2757` 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:2756` 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.
D4 · Code Duplication · Duplicated block (4–6 lines × 4) · ×1
  • Duplicated block (4–6 lines × 4) controller/appcontroller.go:490 — controller/appcontroller.go:490-495 | controller/appcontroller.go:547-552 | controller/appcontroller.go:679-684 | 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:490` 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 · Duplicated block (5 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 14) · ×1
  • 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:3095-3105 | cmd/argocd/commands/app.go:3140-3146 | cmd/argocd/commands/app.go:3205-3215 | 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.
D5 · Coupling · Off the main sequence · ×1
  • 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.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 484 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
Minor — 243 finding(s)
D31 · IaC & Container Security · Low IaC · ×120
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 95 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×32
  • 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 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 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 applicationset/generators/plugin.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 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.
  • Orphaned file reposerver/repository/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.
  • + 7 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate cmd/argocd-application-controller/commands/argocd_application_controller.go:157 — `!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:964 — `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:2913 — `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:2172 — `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:620 — `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:599 — `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:1421 — `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:584 — `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:802 — `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:60 — `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:153 — `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.
D29 · Static Analysis (SAST) · REDACTED · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D41 · Kernel & Syscall Confinement · No seccomp profile · ×11
  • 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.
M4 · Documentation accuracy · README/code drift · ×5
  • README/code drift docs/operator-manual/declarative-setup.md:909 — docs/operator-manual/declarative-setup.md documents the environment variable `IAM_CLUSTER_ROLE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/operator-manual/declarative-setup.md:909 — docs/operator-manual/declarative-setup.md documents the environment variable `ARGO_CD_MANAGEMENT_IAM_ROLE_NAME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/operator-manual/tls.md:60 — docs/operator-manual/tls.md documents the setting `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_256_GCM_SHA384`, but no code or configuration file names `TLS_RSA_WITH_AES_256_GCM_SHA384`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift test/remote/README.md:67 — test/remote/README.md names `test/remote/manifests/e2e_repositories.yaml`, but no file or folder `test/remote/manifests/e2e_repositories.yaml` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/operator-manual/applicationset/Controlling-Resource-Modification.md:280 — docs/operator-manual/applicationset/Controlling-Resource-Modification.md changes into `applicationset/manifests`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default on error · ×3
  • Silent fallback default on error util/argo/resource_tracking.go:80 — `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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×1
  • 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) — 5 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 (9 single-owned of 299 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 299 of the 486 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — 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/webhook/dockerhub.go, util/webhook/harbor.go, applicationset/utils/template_functions.go, util/cache/twolevelclient.go.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — 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/`.
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)` (100134 LoC, 1317 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Stale vulnerability suppression · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 32 of 299 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 and example/demo trees and test files identified by path convention, largest first; 299 of the 486 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, 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 (and 24 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.
D42 · Runtime Threat Enforcement · No runtime threat detection · ×1
  • 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.
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P2 · Observability · Logging is not universal · ×1
  • 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`.
P4 · Deployment & Rollback · No release approval gate · ×1
  • 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • 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.
Minor — 22 finding(s)
D12 · Dependency Hygiene · Outdated · ×22
  • 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.3 in REDACTED, but v1.47.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/aws/aws-sdk-go-v2@v1.47.4 && 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.9 in REDACTED, but v1.33.10 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.10 && 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.9 in REDACTED, but v1.20.10 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.20.10 && 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.0 in REDACTED, but v1.44.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/aws/aws-sdk-go-v2/service/codecommit@v1.44.1 && 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.5 in REDACTED, but v1.41.6 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.41.6 && 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.4 in REDACTED, but v1.51.5 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.51.5 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/aws/smithy-go — `github.com/aws/smithy-go` is required at v1.28.5 in REDACTED, but v1.28.6 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/smithy-go@v1.28.6 && 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/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.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/klauspost/compress@v1.20.3 && 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/mod — `golang.org/x/mod` is required at v0.21.0 in REDACTED, but v0.42.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.42.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.24.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.24.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.1 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.1 && 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.1 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.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: oras.land/oras-go/v2 — `oras.land/oras-go/v2` is required at v2.6.4 in REDACTED, but v2.7.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get oras.land/oras-go/v2@v2.7.0 && 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.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e71f25dd0ee44e24a0662578eaa68fe6/history.json --exit-code 0 --source .9artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e71f25dd0ee44e24a0662578eaa68fe6/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .106artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update20artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet . --skip-check-update509artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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 15 file(s) — `controller/appcontroller.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/application.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/applicationset.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/appproject.go`, `pkg/client/clientset/versioned/typed/application/v1alpha1/fake/fake_application.go`, … (+10 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16c3b-1aa2-7db3-bee1-a7164578c8de · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md