Public report of Homebrew/brew, published 25 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 reportMeasured 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, 25 October 2026, 18:41 UTC · Survey ID cd_5a033d60b8c94e0ab4e4ce5e7a74ef0c
Homebrew/brew
Measured 25 October 2026, 18:35 UTC, at code version 8d79935
Regression: 2 dimensions fell 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 scoreAdequate
CriticalWeakAdequateStrongExemplary
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: 137,524 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Production Readiness, 48
Findings by how serious they are
29 critical929 serious64 minor
7 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
25 October 2026, 18:35 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.
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 ▸
64of 64 dimensions measured by tools.
1000of 1022 findings point to an exact file and line, so you can open each one in the code. The other 22 concern the repository as a whole, such as missing documentation.
64dimensions across 6 lenses, read from 137,524 lines of product code in 3 projects.
Homebrew/brew falls short of our standard for production because we found no logging, tracing or health checks in the code. It scores 61 out of 100 and is rated Adequate, and all 29 of its critical findings are security problems.
Production Readiness, at 48, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 10 points. Adding a diagnostic log would lift Production Readiness itself, worth about 9 points. Raising Production Readiness to 70 would lift the score to about 70.
Nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Nine places in the code run text as code, which an attacker could use, and six passwords or keys in the code's history and one in the code are open to anyone who can read the repository. Replacing each exposed password or key, pinning each tool to an exact version and replacing text run as code with direct calls would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code, and the two unsafe settings in infrastructure or container files need changing to safe values.
The product code is 137,524 lines, about €300,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
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: 23 findings
These 23 critical or serious findings were in the previous survey, on 11 October 2026, and are gone from this one.
Exception handling · Swallowed exception (caught, then discarded) Library/Homebrew/cmd/vulns.rb
Rebuild cost: about €300,000 · Estimate
Cost to rebuild
€100,000 to €500,000, for 1,674 to 5,310 hours of work, about 2.1 person-years for 1 to 4 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 61. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 137,524 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
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 10 points · Low effort · REDACTED Scanning
2
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 9 points · Medium effort · Observability
3
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Raises the score by about 4 points · Medium effort · DR & Backup
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 €300,000 to build again, about 2.1 person-years of work. Its weakest lens is Production Readiness, at 48 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 10 points for low effort, because it clears the 1 REDACTED Scanning findings. 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.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 126,289 lines over the last 90 days, which is about 512,172 lines a year. At that pace, the extra work comes to an estimated 61.2 to 367.4 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: 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.
217 modules, with 107 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 177 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.
Homebrew.API.Cask uses Utils.Output, so a change to Utils.Output can break Homebrew.API.Cask, while a change to Homebrew.API.Cask can't break Utils.Output.
Position
Below the diagonal: Homebrew.API.Cask uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.Aliases uses a type in Utils.Output.
The types involved
Homebrew.Aliases.Alias → Utils.Output.Mixin
Direction
Homebrew.Aliases uses Utils.Output, so a change to Utils.Output can break Homebrew.Aliases, while a change to Homebrew.Aliases can't break Utils.Output.
Position
Below the diagonal: Homebrew.Aliases uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.Diagnostic uses a type in Utils.Output.
The types involved
Homebrew.Diagnostic.Checks → Utils.Output.Mixin
Direction
Homebrew.Diagnostic uses Utils.Output, so a change to Utils.Output can break Homebrew.Diagnostic, while a change to Homebrew.Diagnostic can't break Utils.Output.
Position
Below the diagonal: Homebrew.Diagnostic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.Diagnostic uses a type in SystemCommand.
The types involved
Homebrew.Diagnostic.Checks → SystemCommand.Mixin
Direction
Homebrew.Diagnostic uses SystemCommand, so a change to SystemCommand can break Homebrew.Diagnostic, while a change to Homebrew.Diagnostic can't break SystemCommand.
Position
Below the diagonal: Homebrew.Diagnostic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.InstallSteps uses a type in Utils.Output.
The types involved
Homebrew.InstallSteps.Runner → Utils.Output.Mixin
Direction
Homebrew.InstallSteps uses Utils.Output, so a change to Utils.Output can break Homebrew.InstallSteps, while a change to Homebrew.InstallSteps can't break Utils.Output.
Position
Below the diagonal: Homebrew.InstallSteps uses a module listed above it, which is the healthy direction.
Homebrew.InstallSteps uses SystemCommand, so a change to SystemCommand can break Homebrew.InstallSteps, while a change to Homebrew.InstallSteps can't break SystemCommand.
Position
Below the diagonal: Homebrew.InstallSteps uses a module listed above it, which is the healthy direction.
37 pairs of types, where a type in (global) uses a type in Utils.Output. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
The types involved
AbstractDownloadStrategy → Utils.Output.Mixin
BottleSpecification → Utils.Output.Mixin
Build → Utils.Output.Mixin
BuildError → Utils.Output.Mixin
CPAN → Utils.Output.Mixin
Cleaner → Utils.Output.Mixin
DependentsMessage → Utils.Output.Mixin
DevelopmentTools → Utils.Output.Mixin
Downloadable → Utils.Output.Mixin
EmbeddedPatch → Utils.Output.Mixin
ExternalPatch → Utils.Output.Mixin
Formula → Utils.Output.Mixin
FormulaVersions → Utils.Output.Mixin
Formulary → Utils.Output.Mixin
GitHub → Utils.Output.Mixin
GitHubPackages → Utils.Output.Mixin
GitHubReleases → Utils.Output.Mixin
GitHubRunnerMatrix → Utils.Output.Mixin
Keg → Utils.Output.Mixin
LinkageChecker → Utils.Output.Mixin
LockFile → Utils.Output.Mixin
MacOSRequirement → Utils.Output.Mixin
Messages → Utils.Output.Mixin
Migrator → Utils.Output.Mixin
Mktemp → Utils.Output.Mixin
Direction
(global) uses Utils.Output, so a change to Utils.Output can break (global), while a change to (global) can't break Utils.Output.
Position
Below the diagonal: (global) uses a module listed above it, which is the healthy direction.
Homebrew.Livecheck.Strategy uses SystemCommand, so a change to SystemCommand can break Homebrew.Livecheck.Strategy, while a change to Homebrew.Livecheck.Strategy can't break SystemCommand.
Position
Below the diagonal: Homebrew.Livecheck.Strategy uses a module listed above it, which is the healthy direction.
Homebrew.Livecheck.Strategy uses Homebrew.Livecheck, so a change to Homebrew.Livecheck can break Homebrew.Livecheck.Strategy, while a change to Homebrew.Livecheck.Strategy can't break Homebrew.Livecheck.
Position
Below the diagonal: Homebrew.Livecheck.Strategy uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in Homebrew uses a type in Utils.Output. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
The types involved
Homebrew.API → Utils.Output.Mixin
Homebrew.AbstractCommand → Utils.Output.Mixin
Homebrew.AbstractSubcommand → Utils.Output.Mixin
Homebrew.Ask → Utils.Output.Mixin
Homebrew.Assertions → Utils.Output.Mixin
Homebrew.Attestation → Utils.Output.Mixin
Homebrew.Bump → Utils.Output.Mixin
Homebrew.Cleanup → Utils.Output.Mixin
Homebrew.Completions → Utils.Output.Mixin
Homebrew.Diagnostic → Utils.Output.Mixin
Homebrew.DownloadQueue → Utils.Output.Mixin
Homebrew.EnvConfig → Utils.Output.Mixin
Homebrew.ExecutablesDB → Utils.Output.Mixin
Homebrew.FormulaAuditor → Utils.Output.Mixin
Homebrew.FormulaCreator → Utils.Output.Mixin
Homebrew.Help → Utils.Output.Mixin
Homebrew.Install → Utils.Output.Mixin
Homebrew.MissingFormula → Utils.Output.Mixin
Homebrew.Reinstall → Utils.Output.Mixin
Homebrew.RetryableDownload → Utils.Output.Mixin
Homebrew.Search → Utils.Output.Mixin
Homebrew.Service → Utils.Output.Mixin
Homebrew.Style → Utils.Output.Mixin
Homebrew.TestBot → Utils.Output.Mixin
Homebrew.Trust → Utils.Output.Mixin
Direction
Homebrew uses Utils.Output, so a change to Utils.Output can break Homebrew, while a change to Homebrew can't break Utils.Output.
Position
Below the diagonal: Homebrew uses a module listed above it, which is the healthy direction.
Homebrew.Bundle.Brew uses Utils.Output, so a change to Utils.Output can break Homebrew.Bundle.Brew, while a change to Homebrew.Bundle.Brew can't break Utils.Output.
Position
Below the diagonal: Homebrew.Bundle.Brew uses a module listed above it, which is the healthy direction.
Homebrew.Bundle.Brew uses Homebrew.Bundle, so a change to Homebrew.Bundle can break Homebrew.Bundle.Brew, while a change to Homebrew.Bundle.Brew can't break Homebrew.Bundle.
Position
Below the diagonal: Homebrew.Bundle.Brew uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.Bundle.Brew uses a type in (global).
The types involved
Homebrew.Bundle.Brew.Topo → Hash
Direction
Homebrew.Bundle.Brew uses (global), so a change to (global) can break Homebrew.Bundle.Brew, while a change to Homebrew.Bundle.Brew can't break (global).
Position
Below the diagonal: Homebrew.Bundle.Brew uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.TestBot uses a type in Utils.Output.
The types involved
Homebrew.TestBot.Test → Utils.Output.Mixin
Direction
Homebrew.TestBot uses Utils.Output, so a change to Utils.Output can break Homebrew.TestBot, while a change to Homebrew.TestBot can't break Utils.Output.
Position
Below the diagonal: Homebrew.TestBot uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Homebrew.TestBot uses a type in SystemCommand.
The types involved
Homebrew.TestBot.Step → SystemCommand.Mixin
Direction
Homebrew.TestBot uses SystemCommand, so a change to SystemCommand can break Homebrew.TestBot, while a change to Homebrew.TestBot can't break SystemCommand.
Position
Below the diagonal: Homebrew.TestBot uses a module listed above it, which is the healthy direction.
OS.Mac.Cask.Quarantine uses Utils.Output, so a change to Utils.Output can break OS.Mac.Cask.Quarantine, while a change to OS.Mac.Cask.Quarantine can't break Utils.Output.
Position
Below the diagonal: OS.Mac.Cask.Quarantine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in OS.Mac.Cask.Quarantine uses a type in (global).
The types involved
OS.Mac.Cask.Quarantine.ClassMethods → Kernel
Direction
OS.Mac.Cask.Quarantine uses (global), so a change to (global) can break OS.Mac.Cask.Quarantine, while a change to OS.Mac.Cask.Quarantine can't break (global).
Position
Below the diagonal: OS.Mac.Cask.Quarantine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in UnpackStrategy.Dmg uses a type in Utils.Output.
The types involved
UnpackStrategy.Dmg.Bom → Utils.Output.Mixin
Direction
UnpackStrategy.Dmg uses Utils.Output, so a change to Utils.Output can break UnpackStrategy.Dmg, while a change to UnpackStrategy.Dmg can't break Utils.Output.
Position
Below the diagonal: UnpackStrategy.Dmg uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in UnpackStrategy.Dmg uses a type in SystemCommand.
The types involved
UnpackStrategy.Dmg.Bom → SystemCommand.Mixin
Direction
UnpackStrategy.Dmg uses SystemCommand, so a change to SystemCommand can break UnpackStrategy.Dmg, while a change to UnpackStrategy.Dmg can't break SystemCommand.
Position
Below the diagonal: UnpackStrategy.Dmg uses a module listed above it, which is the healthy direction.
95 pairs of types, where a type in Homebrew.Cmd uses a type in Homebrew. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Homebrew.Cmd.Bundle uses Utils.Output, so a change to Utils.Output can break Homebrew.Cmd.Bundle, while a change to Homebrew.Cmd.Bundle can't break Utils.Output.
Position
Below the diagonal: Homebrew.Cmd.Bundle uses a module listed above it, which is the healthy direction.
Homebrew.Cmd.Services uses Utils.Output, so a change to Utils.Output can break Homebrew.Cmd.Services, while a change to Homebrew.Cmd.Services can't break Utils.Output.
Position
Below the diagonal: Homebrew.Cmd.Services uses a module listed above it, which is the healthy direction.
Homebrew.Cmd.Services uses Homebrew, so a change to Homebrew can break Homebrew.Cmd.Services, while a change to Homebrew.Cmd.Services can't break Homebrew.
Position
Below the diagonal: Homebrew.Cmd.Services uses a module listed above it, which is the healthy direction.
Homebrew.DevCmd uses SystemCommand, so a change to SystemCommand can break Homebrew.DevCmd, while a change to Homebrew.DevCmd can't break SystemCommand.
Position
Below the diagonal: Homebrew.DevCmd uses a module listed above it, which is the healthy direction.
68 pairs of types, where a type in Homebrew.DevCmd uses a type in Homebrew. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
26
High / Critical
A07:2025 — Authentication Failures
8
High / Critical
A02:2025 — Security Misconfiguration
8
High / Critical
A03:2025 — Software Supply Chain Failures
1
Medium
Roadmap
Immediately resolve the leaked secret in REDACTED and establish a diagnostic logging trail for error paths to enable reproducible bug reporting. Concurrently, document recovery objectives and tested restore procedures to ensure true disaster readiness, while enforcing accessibility checks in CI to prevent regressions. Finally, expand the architecture decision record log to twenty entries to formalize significant design choices.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
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 — 29
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 — 929
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 — 64
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
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. 64 of 64 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.8 — 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 — 64 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1000 of 1022 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — 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 READ here — but this repository measures it: a Codecov configuration (.github/codecov.yml) and a coverage step in CI (`codecov/codecov-action`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.rb), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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. You can widen what we reach: optional: produce a coverage report in a standard format (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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 — then the real number is read on the next scan.
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 source is present (.rb) and this repository declares a Ruby test suite (RSpec: Library/Homebrew, 738 spec files; minitest: Library/Homebrew, 1 test file), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D19 Documentation 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D20 ADR 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 ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
D21 Naming 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — 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 an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
D24 Comment Value — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
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) — 2 | # version is passed through by Docker. 3 | # shellcheck disable=SC2154 4 | >>> FROM ubuntu:"${version}" 5 | ARG DEBIAN_FRONTEND=noninteractive 6 | -------------------- ERROR: failed to solve: ubuntu:24.04: failed to resolve source metadata for docker.io/library/ubuntu:24.04: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/24.04": Forbidden; runtime evidence skipped.
M4 Documentation accuracy — 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
Repo exclusion declarations: 11 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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality 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.
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.
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 (go.mod, 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.
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.
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.
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.
222 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BumpFormulaPr.run at 112. A further 6 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ClassMethods.intel_family at 25 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Library/Homebrew/extend/os/linux/hardware/cpu.rb (ClassMethods.intel_family at 25), Library/Homebrew/extend/ENV/super.rb (Superenv.setup_build_environment at 16), Library/Homebrew/extend/os/mac/hardware/cpu/hardware.rb (CPU.arm_family at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 216 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 18 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with BumpFormulaPr.run (cyclomatic 112), Livecheck.latest_version (cyclomatic 112), List.run (cyclomatic 93). — 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 18 together lifts Cyclomatic Complexity from 5.4 to about 6.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
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.
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.
+ 280 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with List.run (cognitive 184), Livecheck.latest_version (cognitive 162), UpdateReport.output_update_report (cognitive 147). — 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 Cognitive Complexity from 3.8 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
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.
Do you agree with this assessment?
D3 · God Classes7.9 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
TooManyMethods: Formula · ×42Library/Homebrew/formula.rb:88
What to do
Resolve the 44 FileTooLong finding(s) in God Classes — start with install_steps.rb (2), upgrade.rb (2), formula.rb. — One of this dimension's main actionable groups (44 warning-level).
Resolve the 42 TooManyMethods finding(s) in God Classes — start with install_steps.rb (2), formula.rb, tap.rb. — One of this dimension's main actionable groups (42 warning-level).
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.
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.
33 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 19 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with build.rb, install.rb, contributions.rb. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with staged.rb, abstract_command.rb, blank.rb. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 Duplicated block (18 lines × 2) finding(s) in Code Duplication — start with abstract_uninstall.rb, formula.rb. — One of this dimension's main actionable groups (2 warning-level).
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.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (Python+source-import), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations, and — for the source no manifest declares — its top-level source directories, with the imports between them as edges, and main-sequence distance (abstractness) is not computed for these modules yet.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 87 Low cohesion finding(s) in Cohesion (LCOM4) — start with cask_loader.rb (3), resource.rb (2), migrator.rb (2). — One of this dimension's main actionable groups (87 warning-level).
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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Resolve the 13 Classify ADR enforcement finding(s) in Architectural Integrity — start with 2019-membership.md, 2019-moss-track-iii-grant-nomination.md, 2019-plc-minutes.md. — One of this dimension's main actionable groups (13 recommendation-level).
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d7_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
8 outdated direct gem(s), 0 pinning defect(s). 52 declaration(s) graded against rubygems.org, 52 of them against a version resolved in a committed Gemfile.lock. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: html-proofer · ×8
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 112 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 112 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 89 Hotspot finding(s) in Churn × Complexity Hotspots — start with livecheck.rb (3), upgrade.rb (3), audit.rb (2). — One of this dimension's main actionable groups (89 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.1 / 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.
44 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Library/Homebrew/rubocops/shared/install_steps_helper.rb. Counted over 495 of the 1018 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 · ×4
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
64 deducted task-comment markers across 137524 LoC (0.0/KLoC) → score 9.9. 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.
Resolve the 51 TodoComment finding(s) in Explicit Debt — start with strategy_spec.rb (6), formula.rb (3), on_system_conditionals_helper.rb (3). — One of this dimension's main actionable groups (51 warning-level).
Resolve the 11 FixmeComment finding(s) in Explicit Debt — start with REDACTED (2), formulary_spec.rb (2), cask_loader_spec.rb (2). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with requirement.rb. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
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.
0 of 8 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question). How well each record argues its case is not measured.
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md.
Do you agree with this assessment?
D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
1 of 3 build units (Bundler, checkout) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
6 finding(s): 0 critical, 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
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).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
26 finding(s): 0 critical, 20 high, 6 medium, 0 low. semgrep hit a parse error in 12 file(s) — `.vscode/ruby-lsp-activate.sh` (lines 3–28), `Library/Homebrew/brew.sh` (lines 8–686), `Library/Homebrew/cmd/--repository.sh` (line 28), `REDACTED` (line 430), `Library/Homebrew/shims/mac/super/bin/xcrun` (line 73), … (+7 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 1 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
What to do
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED, REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED.long_runner, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 6 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED.long_runner (2). — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
1 of 495 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Library/Homebrew/extend/file/atomic.rb. Counted over 495 of the 1018 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 3 Change coupling finding(s) in Change Coupling — start with reinstall.rb, cask.rb, diagnostic.rb. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with leaves.rb, cask_dependent.rb. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 53 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
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.
Do you agree with this assessment?
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 automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 6 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 test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
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.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
Other · Code Health — Unreviewed-generation residue in this repository's Ruby: methods whose whole body still raises NotImplementedError where nothing overrides them, or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Ruby: methods that only raise NotImplementedError or a "not implemented" error where nothing overrides them, methods that take inputs and return a constant or do nothing, dead `if false` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
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.
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 1 project(s) that lack one — worth up to 2 pts.
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.
No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
What to do
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
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
Dependabot is configured but does not watch `pip` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ 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
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ 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.
The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
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.
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.
Do you agree with this assessment?
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether 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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.6 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`deep_remove_placeholders` is public and takes `value` — which it walks as a `Hash` — from its caller, and it calls itself at line 34 (`self.deep_remove_placeholders`) with a piece of `value` (and at line 36) — and nowhere in `deep_remove_placeholders` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_remove_placeholders` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/api_hashable.rb:34
`github_packages_sbom_supplement_annotation` is public, takes a document from its caller (line 102) and hands it to `add_bottle_package_to_supplement`, which walks `supplement` as a `Hash` and calls itself at line 338 (`self.add_bottle_package_to_supplement`) with a piece of `supplement` — and nowhere in `add_bottle_package_to_supplement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `add_bottle_package_to_supplement` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/sbom.rb:338
`deep_stringify_symbols` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 203 (`self.deep_stringify_symbols`) with a piece of `obj` (and at line 205) — and nowhere in `deep_stringify_symbols` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_stringify_symbols` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils.rb:203
`deep_unstringify_symbols` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 223 (`self.deep_unstringify_symbols`) with a piece of `obj` (and at line 225) — and nowhere in `deep_unstringify_symbols` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_unstringify_symbols` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils.rb:223
`deep_compact_blank` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 239 (`self.deep_compact_blank`) with a piece of `obj` (and at line 243) — and nowhere in `deep_compact_blank` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_compact_blank` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils.rb:239
`parse_license_expression` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 99 (`self.parse_license_expression`) with a piece of `license_expression` — and nowhere in `parse_license_expression` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `parse_license_expression` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils/spdx.rb:99
`license_expression_to_string` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 149 (`self.license_expression_to_string`) with a piece of `license_expression` — and nowhere in `license_expression_to_string` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `license_expression_to_string` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils/spdx.rb:149
`licenses_forbid_installation?` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 295 (`self.licenses_forbid_installation?`) with a piece of `license_expression` (and at line 297) — and nowhere in `licenses_forbid_installation?` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `licenses_forbid_installation?` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — Library/Homebrew/utils/spdx.rb:295
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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.
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.
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.
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.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
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.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
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.
`rescue` 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. (×30) — Library/Homebrew/caveats.rb:230, Library/Homebrew/diagnostic.rb:1001, Library/Homebrew/formula.rb:2797, …
`rescue Exception` 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. — Library/Homebrew/cask/appcast.rb:51
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
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.
Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
985/988 of this repository's Ruby product files are checked for nil — 985 by Sorbet at `# typed: true` or above, 0 under a Steepfile target's `check` paths with diagnostics that make `Ruby::NoMethod` an error. A file at `# typed: false` (Sorbet's reading of a file with no sigil), `ignore`, outside Sorbet's input or under its `--ignore`, or Steep-checked only under `lenient`/`silent`, is one where `user.name.upcase` on a nilable `name` passes, and the first nil reaching it is a `NoMethodError: undefined method 'upcase' for nil` in production.
What to do
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 3 of 55 WCAG 2.2 Level A/AA success criteria (5%; ≈6% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 52 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 4 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.
P12 CI test-gate honesty — 1 observation(s) recorded · 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.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 3 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 included — 51 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.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC3 Page structure — No structural check found in the parsed markup — AC3 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AC6 Visual & motion safety — No styled element found in the parsed markup — AC6 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Python 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; this repository's Ruby 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.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads.
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) — 2 | # version is passed through by Docker. 3 | # shellcheck disable=SC2154 4 | >>> FROM ubuntu:"${version}" 5 | ARG DEBIAN_FRONTEND=noninteractive 6 | -------------------- ERROR: failed to solve: ubuntu:24.04: failed to resolve source metadata for docker.io/library/ubuntu:24.04: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/24.04": Forbidden; 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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, a db/schema.rb table or a Mongoid document — and no database or data-store client (an ActiveRecord model, Sequel, pg, mysql2, sqlite3, Mongo, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository draws no route and defines no request handler (no Rails routes.draw or controller, no Sinatra, Roda or Grape application, no Hanami action). Access control is therefore N/A here — a gem is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential in an ActiveRecord or Sequel migration, db/schema.rb or a Mongoid document — and no database client (an ActiveRecord model, Sequel, pg, mysql2, Mongo) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, db/schema.rb or a Mongoid document — and no database client (ActiveRecord, Sequel, pg, mysql2, mongo, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, a db/schema.rb table or a Mongoid document — and no database or data-store client (an ActiveRecord model, Sequel, pg, mysql2, sqlite3, Mongo, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~140426 lines of test source are present (.rb) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .rb suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# only; Ruby, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rb, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rb), 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) — 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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.rb) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (53 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Python, Ruby source, so there is no service whose uptime a failing dependency could take down
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 (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `x.report(…)` entries in a `Benchmark.ips`/`bm`/`bmbm`/`benchmark`/`memory` block, `benchmark:` entries in a benchmark-driver YAML under a bench* directory, rspec-benchmark `perform_*` expectations where the gem is installed, or benchmark-ips, benchmark-memory, rspec-benchmark or benchmark-driver in a Gemfile or gemspec, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: Ruby runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
PF3 Async & latency hygiene — Not applicable: Ruby has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — No web surface: 972 Ruby file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no `config.ru`, no web framework, Rack or server gem among its gemspec run-time dependencies or its Gemfile's production gems, and no Rails, Rack, Sinatra, Grape, Hanami, WEBrick, Puma or Falcon server defined or booted in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
X2 Cancellation propagation — no C# was loaded; this repository's Ruby and Python were read, and no request in it can be cancelled by a caller — a Ruby request takes no token: Net::HTTP, Faraday and async-http are stopped from outside the call (Async::Task#stop, Thread#raise, Timeout), not through a parameter; a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
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.
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 — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
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.
Hotspot: Library/Homebrew/dev-cmd/advisory-match.rb Library/Homebrew/dev-cmd/advisory-match.rb:74— Library/Homebrew/dev-cmd/advisory-match.rb changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in AdvisoryMatch.run at line 74. 3 of those changes were fix/bug commits, and the other 27 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/dev-cmd/advisory-match.rb`: 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: Library/Homebrew/cask/audit.rb Library/Homebrew/cask/audit.rb:628— Library/Homebrew/cask/audit.rb changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in Audit.audit_signing at line 628. 2 of those changes were fix/bug commits, and the other 38 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/cask/audit.rb`: 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: Library/Homebrew/install_steps.rb Library/Homebrew/install_steps.rb:1002— Library/Homebrew/install_steps.rb changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in Runner.run_install_step at line 1002. 1 of those changes was a fix/bug commit, and the other 22 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/install_steps.rb`: 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:222— REDACTED changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in Bump.retrieve_versions_by_arch at line 222. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00: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:102— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in BumpFormulaPr.run at line 102. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00: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: Library/Homebrew/formula_installer.rb Library/Homebrew/formula_installer.rb:1052— Library/Homebrew/formula_installer.rb changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in FormulaInstaller.finish at line 1052. 1 of those changes was a fix/bug commit, and the other 43 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/formula_installer.rb`: 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: Library/Homebrew/tap.rb Library/Homebrew/tap.rb:674— Library/Homebrew/tap.rb changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in Tap.install at line 674. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/tap.rb`: 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: Library/Homebrew/livecheck/livecheck.rb Library/Homebrew/livecheck/livecheck.rb:631— Library/Homebrew/livecheck/livecheck.rb changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in Livecheck.latest_version at line 631. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/livecheck/livecheck.rb`: 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: Library/Homebrew/cmd/info.rb Library/Homebrew/cmd/info.rb:435— Library/Homebrew/cmd/info.rb changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in Info.info_formula at line 435. 1 of those changes was a fix/bug commit, and the other 12 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/cmd/info.rb`: 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: Library/Homebrew/formula_auditor.rb Library/Homebrew/formula_auditor.rb:893— Library/Homebrew/formula_auditor.rb changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in FormulaAuditor.audit_specs at line 893. 1 of those changes was a fix/bug commit, and the other 14 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/formula_auditor.rb`: 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: Library/Homebrew/dev-cmd/bottle.rb Library/Homebrew/dev-cmd/bottle.rb:427— Library/Homebrew/dev-cmd/bottle.rb changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in Bottle.bottle_formula at line 427. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/dev-cmd/bottle.rb`: 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: Library/Homebrew/cmd/upgrade.rb Library/Homebrew/cmd/upgrade.rb:186— Library/Homebrew/cmd/upgrade.rb changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in UpgradeCmd.run at line 186. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/cmd/upgrade.rb`: 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: Library/Homebrew/vulns/match.rb Library/Homebrew/vulns/match.rb:968— Library/Homebrew/vulns/match.rb changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Match.reconcile_history at line 968. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/vulns/match.rb`: 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: Library/Homebrew/formula.rb Library/Homebrew/formula.rb:3802— Library/Homebrew/formula.rb changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Formula.eligible_kegs_for_cleanup at line 3802. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/formula.rb`: 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: Library/Homebrew/dev-cmd/contributions.rb Library/Homebrew/dev-cmd/contributions.rb:114— Library/Homebrew/dev-cmd/contributions.rb changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in Contributions.run at line 114. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/dev-cmd/contributions.rb`: 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: Library/Homebrew/cask/upgrade.rb Library/Homebrew/cask/upgrade.rb:138— Library/Homebrew/cask/upgrade.rb changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in Upgrade.upgrade_casks! at line 138. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/cask/upgrade.rb`: 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: Library/Homebrew/cmd/install.rb Library/Homebrew/cmd/install.rb:179— Library/Homebrew/cmd/install.rb changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in InstallCmd.run at line 179. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/cmd/install.rb`: 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: Library/Homebrew/utils/curl.rb Library/Homebrew/utils/curl.rb:476— Library/Homebrew/utils/curl.rb changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Curl.curl_check_http_content at line 476. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/utils/curl.rb`: 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: Library/Homebrew/api.rb Library/Homebrew/api.rb:50— Library/Homebrew/api.rb changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in API.fetch_json_api_file at line 50. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/api.rb`: 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: Library/Homebrew/download_queue.rb Library/Homebrew/download_queue.rb:141— Library/Homebrew/download_queue.rb changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in DownloadQueue.fetch at line 141. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/download_queue.rb`: 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: Library/Homebrew/dev-cmd/audit.rb Library/Homebrew/dev-cmd/audit.rb:106— Library/Homebrew/dev-cmd/audit.rb changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in Audit.run at line 106. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/dev-cmd/audit.rb`: 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: Library/Homebrew/utils/pypi.rb Library/Homebrew/utils/pypi.rb:249— Library/Homebrew/utils/pypi.rb changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in PyPI.update_python_resources! at line 249. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/utils/pypi.rb`: 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: Library/Homebrew/services/cli.rb Library/Homebrew/services/cli.rb:229— Library/Homebrew/services/cli.rb changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in Cli.stop at line 229. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/services/cli.rb`: 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: Library/Homebrew/rubocops/lines.rb Library/Homebrew/rubocops/lines.rb:912— Library/Homebrew/rubocops/lines.rb changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Miscellaneous.audit_formula at line 912. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/rubocops/lines.rb`: 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: Library/Homebrew/dev-cmd/tests.rb Library/Homebrew/dev-cmd/tests.rb:62— Library/Homebrew/dev-cmd/tests.rb changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Tests.run at line 62. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:54 +00:00' --until='2026-10-25 13:24:54 +00:00' --full-history --no-merges -- Library/Homebrew/dev-cmd/tests.rb`: 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.
Low cohesion: Pathname (LCOM4 26) Library/Homebrew/extend/pathname.rb:30— Pathname's methods fall into 26 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 26 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: FormulaInstaller (LCOM4 20) Library/Homebrew/formula_installer.rb:39— FormulaInstaller's methods fall into 20 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 20 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: Formula (LCOM4 16) Library/Homebrew/formula.rb:88— Formula's methods fall into 16 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 16 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: DSL (LCOM4 15) Library/Homebrew/cask/dsl.rb:35— DSL's methods fall into 15 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 15 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: Checks (LCOM4 14) Library/Homebrew/diagnostic.rb:60— Checks's methods fall into 14 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 14 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: Service (LCOM4 13) Library/Homebrew/service.rb:16— Service's methods fall into 13 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 13 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: Installer (LCOM4 11) Library/Homebrew/cask/installer.rb:24— Installer's methods fall into 11 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 11 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: Tap (LCOM4 10) Library/Homebrew/tap.rb:20— Tap'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: TestFormulae (LCOM4 10) REDACTED:9— TestFormulae'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: AbstractArtifact (LCOM4 9) Library/Homebrew/cask/artifact/abstract_artifact.rb:16— AbstractArtifact's methods fall into 9 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 9 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: Cleanup (LCOM4 9) Library/Homebrew/cleanup.rb:16— Cleanup's methods fall into 9 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 9 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: Requirement (LCOM4 9) Library/Homebrew/requirement.rb:13— Requirement's methods fall into 9 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 9 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: Cask (LCOM4 8) Library/Homebrew/cask/cask.rb:19— Cask's methods fall into 8 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 8 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: DependsOn (LCOM4 8) Library/Homebrew/cask/dsl/depends_on.rb:13— DependsOn's methods fall into 8 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 8 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: AbstractDownloadStrategy (LCOM4 8) Library/Homebrew/download_strategy/abstract_download_strategy.rb:7— AbstractDownloadStrategy's methods fall into 8 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 8 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: FormulaAuditor (LCOM4 8) Library/Homebrew/formula_auditor.rb:20— FormulaAuditor's methods fall into 8 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 8 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: FormulaLoader (LCOM4 8) REDACTED:472— FormulaLoader's methods fall into 8 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 8 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: Keg (LCOM4 8) Library/Homebrew/keg.rb:16— Keg's methods fall into 8 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 8 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: Result (LCOM4 8) Library/Homebrew/system_command.rb:635— Result's methods fall into 8 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 8 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: Test (LCOM4 8) Library/Homebrew/test_bot/test.rb:9— Test's methods fall into 8 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 8 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: Config (LCOM4 7) Library/Homebrew/cask/config.rb:17— Config's methods fall into 7 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 7 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: Base (LCOM4 7) Library/Homebrew/cask/dsl/base.rb:9— Base's methods fall into 7 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 7 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: Cleaner (LCOM4 7) Library/Homebrew/cleaner.rb:16— Cleaner's methods fall into 7 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 7 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: VerificationCache (LCOM4 7) Library/Homebrew/downloadable.rb:21— VerificationCache's methods fall into 7 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 7 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: FormulaCreator (LCOM4 7) Library/Homebrew/formula_creator.rb:12— FormulaCreator's methods fall into 7 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 7 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.
TodoComment Library/Homebrew/cleanup.rb:935— # TODO: Work out a sensible way to clean up `pip`'s, `setuptools`' and `wheel`'s — 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 Library/Homebrew/diagnostic.rb:965— # TODO: remove this once it's no longer in the default GitHub Actions image — 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 Library/Homebrew/formula.rb:3928— # TODO: Enable when `min-publish-age` stabilises in Cargo 1.100, — 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 Library/Homebrew/formula.rb:5251— # TODO: replace legacy `replacement` with `replacement_formula` or `replacement_cask` — 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 Library/Homebrew/formula.rb:5362— # TODO: replace legacy `replacement` with `replacement_formula` or `replacement_cask` — 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 Library/Homebrew/formula_auditor.rb:468— # TODO: remove this and check these there too. — 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 Library/Homebrew/github_packages.rb:367— # TODO: upload/add tag_hash["all_files"] somewhere. — 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 Library/Homebrew/hardware.rb:39— # TODO: -mcpu=apple-m1 when we've patched all our GCCs to support it — 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 Library/Homebrew/linkage_checker.rb:358— # TODO: Report linkage with `/usr/lib/libc++.1.dylib` when this link is broken. — 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 Library/Homebrew/resource_auditor.rb:200— # TODO: try remove the OS/env conditional — 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 Library/Homebrew/service.rb:775— # TODO: Remove this code when all users are running on versions of Homebrew — 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 Library/Homebrew/upgrade.rb:290— # TODO: this should be refactored to use FormulaInstaller new logic — 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 Library/Homebrew/utils/curl.rb:552— # TODO: `utils/shared_audits` requires this file in turn. — 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 Library/Homebrew/test_bot/formulae_dependents.rb:267— # TODO: Try generalising this by sorting dependents according to install size, — 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 Library/Homebrew/test_bot/formulae_dependents.rb:353— # TODO: Consider handling the following case better. — 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 Library/Homebrew/test_bot/formulae_detect.rb:186— # TODO: Remove `GITHUB_EVENT_NAME` check when formulae detection — 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 Library/Homebrew/test_bot/tap_syntax.rb:17— # TODO: consider in future if we want to allow unsupported taps here. — 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 Library/Homebrew/test/completions_spec.rb:157— # TODO: re-enable this test if it can be made to take ~ 1 second or there's — 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 Library/Homebrew/test/utils/curl_spec.rb:93— # TODO: Make the Incapsula test data more realistic once we can find an — 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 Library/Homebrew/test/os/mac/pkgconfig_spec.rb:43— # TODO: uncomment this when GitHub Actions has completed their macOS-26-arm64 expat 2.7.4 rollout — 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 Library/Homebrew/test/livecheck/strategy_spec.rb:307— # TODO: Remove this line when removing the user agent fallback logic — 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 Library/Homebrew/test/livecheck/strategy_spec.rb:316— # TODO: Remove this line when removing the user agent fallback logic — 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 Library/Homebrew/test/livecheck/strategy_spec.rb:525— # TODO: Remove this line when removing the user agent fallback logic — 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 Library/Homebrew/test/livecheck/strategy_spec.rb:322— # TODO: Remove this block when removing the user agent fallback logic — 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 Library/Homebrew/test/livecheck/strategy_spec.rb:348— # TODO: Remove this block when removing the user agent fallback logic — 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.
FileTooLong: Homebrew/formula.rb Library/Homebrew/formula.rb— FileTooLong — 2701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2201 over it, 5.40× 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: Homebrew/formula_installer.rb Library/Homebrew/formula_installer.rb— FileTooLong — 1551 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1051 over it, 3.10× 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: Homebrew/install_steps.rb Library/Homebrew/install_steps.rb— FileTooLong — 1442 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 942 over it, 2.88× 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: Homebrew/diagnostic.rb Library/Homebrew/diagnostic.rb— FileTooLong — 1418 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 918 over it, 2.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cask/audit.rb Library/Homebrew/cask/audit.rb— FileTooLong — 1192 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 692 over it, 2.38× 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: dev-cmd/advisory-match.rb Library/Homebrew/dev-cmd/advisory-match.rb— FileTooLong — 1164 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 664 over it, 2.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Homebrew/tap.rb Library/Homebrew/tap.rb— FileTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 606 over it, 2.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: Homebrew/formula_auditor.rb Library/Homebrew/formula_auditor.rb— FileTooLong — 1100 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 600 over it, 2.20× 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: livecheck/livecheck.rb Library/Homebrew/livecheck/livecheck.rb— FileTooLong — 1059 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 559 over it, 2.12× 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: cli/parser.rb Library/Homebrew/cli/parser.rb— FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 474 over it, 1.95× 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 — 968 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 468 over it, 1.94× 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 — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× 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: rubocops/lines.rb Library/Homebrew/rubocops/lines.rb— FileTooLong — 927 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 427 over it, 1.85× 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: dev-cmd/contributions.rb Library/Homebrew/dev-cmd/contributions.rb— FileTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 405 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: vulns/match.rb Library/Homebrew/vulns/match.rb— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× 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: cask/installer.rb Library/Homebrew/cask/installer.rb— FileTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 356 over it, 1.71× 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: cmd/upgrade.rb Library/Homebrew/cmd/upgrade.rb— FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 354 over it, 1.71× 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: cmd/info.rb Library/Homebrew/cmd/info.rb— FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 352 over it, 1.70× 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: Homebrew/env_config.rb Library/Homebrew/env_config.rb— FileTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 351 over it, 1.70× 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: Homebrew/cleanup.rb Library/Homebrew/cleanup.rb— FileTooLong — 841 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 341 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 817 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 317 over it, 1.63× 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: Homebrew/exceptions.rb Library/Homebrew/exceptions.rb— FileTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 279 over it, 1.56× 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: dev-cmd/bottle.rb Library/Homebrew/dev-cmd/bottle.rb— FileTooLong — 773 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 273 over it, 1.55× 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: Homebrew/keg.rb Library/Homebrew/keg.rb— FileTooLong — 746 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 246 over it, 1.49× 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: utils/ast.rb Library/Homebrew/utils/ast.rb— FileTooLong — 711 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 211 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.
TooManyMethods: Formula Library/Homebrew/formula.rb:88— TooManyMethods — 291 methods. The bar is 30 methods; this is 261 over it, 9.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: Tap Library/Homebrew/tap.rb:20— TooManyMethods — 99 methods. The bar is 30 methods; this is 69 over it, 3.30× 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: FormulaInstaller Library/Homebrew/formula_installer.rb:39— TooManyMethods — 93 methods. The bar is 30 methods; this is 63 over it, 3.10× 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: Audit Library/Homebrew/cask/audit.rb:26— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× 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: Checks Library/Homebrew/diagnostic.rb:60— TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× 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: Cask Library/Homebrew/cask/cask.rb:19— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× 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: Installer Library/Homebrew/cask/installer.rb:24— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× 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: DSL Library/Homebrew/install_steps.rb:38— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: Sandbox Library/Homebrew/sandbox.rb:15— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: Parser Library/Homebrew/cli/parser.rb:20— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× 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: Brew Library/Homebrew/bundle/brew.rb:14— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: Keg Library/Homebrew/keg.rb:16— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: Cleanup Library/Homebrew/cleanup.rb:16— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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 Library/Homebrew/service.rb:16— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: FormulaWrapper Library/Homebrew/services/formula_wrapper.rb:10— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: FormulaAuditor Library/Homebrew/formula_auditor.rb:20— 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: Extension Library/Homebrew/bundle/extensions/extension.rb:10— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Superenv Library/Homebrew/extend/ENV/super.rb:18— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 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.
TooManyMethods: Runner Library/Homebrew/install_steps.rb:896— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: InstallStepsHelper Library/Homebrew/rubocops/shared/install_steps_helper.rb:6— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: Winget Library/Homebrew/bundle/extensions/winget.rb:12— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: DSL Library/Homebrew/cask/dsl.rb:35— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: SharedEnvExtension Library/Homebrew/extend/ENV/shared.rb:15— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: Trust Library/Homebrew/trust.rb:15— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: FormulaAST Library/Homebrew/utils/ast.rb:91— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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.
Swallowed exception (caught, then discarded) Library/Homebrew/caveats.rb:230— `rescue` 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) Library/Homebrew/diagnostic.rb:1001— `rescue` 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) Library/Homebrew/formula.rb:2797— `rescue` 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) Library/Homebrew/formula.rb:3987— `rescue` 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) Library/Homebrew/formula_cellar_checks.rb:271— `rescue` 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) Library/Homebrew/global.rb:151— `rescue` 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) Library/Homebrew/install.rb:655— `rescue` 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) Library/Homebrew/install.rb:700— `rescue` 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) Library/Homebrew/search.rb:113— `rescue` 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) Library/Homebrew/uninstall.rb:52— `rescue` 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) Library/Homebrew/uninstall.rb:155— `rescue` 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) Library/Homebrew/utils/github/api.rb:459— `rescue` 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) Library/Homebrew/services/cli.rb:404— `rescue` 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) Library/Homebrew/services/formula_wrapper.rb:30— `rescue` 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) Library/Homebrew/services/formula_wrapper.rb:42— `rescue` 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) Library/Homebrew/services/formula_wrapper.rb:56— `rescue` 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) Library/Homebrew/services/formula_wrapper.rb:285— `rescue` 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) Library/Homebrew/extend/os/mac/diagnostic.rb:386— `rescue` 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) Library/Homebrew/extend/os/mac/diagnostic.rb:424— `rescue` 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) Library/Homebrew/extend/os/mac/diagnostic.rb:471— `rescue` 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) Library/Homebrew/extend/os/mac/pkgconf.rb:28— `rescue` 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) Library/Homebrew/extend/hash/keys.rb:65— `rescue` 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) Library/Homebrew/dev-cmd/bump-unversioned-casks.rb:117— `rescue` 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) Library/Homebrew/cask/appcast.rb:51— `rescue Exception` 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) Library/Homebrew/cask/audit.rb:312— `rescue` 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.
FixmeComment Library/Homebrew/formula.rb:885— # FIXME: This should not actually take a block. All resources should be defined — 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:1190— # FIXME: Remove the need to do this here. — 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:1195— # FIXME: Remove the need to split the name and instead make — 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 Library/Homebrew/test/formulary_spec.rb:1291— # FIXME — 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 Library/Homebrew/test/formulary_spec.rb:1342— # FIXME — 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 Library/Homebrew/test/cask/cask_loader_spec.rb:98— # FIXME — 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 Library/Homebrew/test/cask/cask_loader_spec.rb:201— # FIXME — 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 Library/Homebrew/test/cmd/bundle/remove_subcommand_spec.rb:129— # FIXME: Why doesn't this work? — 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 Library/Homebrew/rubocops/lines.rb:1217— # FIXME: Handle Pathname parameters (e.g. `system bin/"rustup"`). — 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 Library/Homebrew/extend/os/linux/diagnostic.rb:276— # FIXME: This includes formulae that have no runtime dependency on GCC. — 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 Library/Homebrew/cli/parser.rb:75— # FIXME: remove once commands are all subclasses of `AbstractCommand`: — 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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×8
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/api_hashable.rb:34— `deep_remove_placeholders` is public and takes `value` — which it walks as a `Hash` — from its caller, and it calls itself at line 34 (`self.deep_remove_placeholders`) with a piece of `value` (and at line 36) — and nowhere in `deep_remove_placeholders` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_remove_placeholders` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/sbom.rb:338— `github_packages_sbom_supplement_annotation` is public, takes a document from its caller (line 102) and hands it to `add_bottle_package_to_supplement`, which walks `supplement` as a `Hash` and calls itself at line 338 (`self.add_bottle_package_to_supplement`) with a piece of `supplement` — and nowhere in `add_bottle_package_to_supplement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `add_bottle_package_to_supplement` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils.rb:203— `deep_stringify_symbols` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 203 (`self.deep_stringify_symbols`) with a piece of `obj` (and at line 205) — and nowhere in `deep_stringify_symbols` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_stringify_symbols` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils.rb:223— `deep_unstringify_symbols` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 223 (`self.deep_unstringify_symbols`) with a piece of `obj` (and at line 225) — and nowhere in `deep_unstringify_symbols` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_unstringify_symbols` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils.rb:239— `deep_compact_blank` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 239 (`self.deep_compact_blank`) with a piece of `obj` (and at line 243) — and nowhere in `deep_compact_blank` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_compact_blank` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils/spdx.rb:99— `parse_license_expression` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 99 (`self.parse_license_expression`) with a piece of `license_expression` — and nowhere in `parse_license_expression` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `parse_license_expression` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils/spdx.rb:149— `license_expression_to_string` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 149 (`self.license_expression_to_string`) with a piece of `license_expression` — and nowhere in `license_expression_to_string` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `license_expression_to_string` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap Library/Homebrew/utils/spdx.rb:295— `licenses_forbid_installation?` is public and takes `license_expression` — which it walks as a `Hash` — from its caller, and it calls itself at line 295 (`self.licenses_forbid_installation?`) with a piece of `license_expression` (and at line 297) — and nowhere in `licenses_forbid_installation?` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `licenses_forbid_installation?` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Duplicated block (12 lines × 2) Library/Homebrew/build.rb:101— Library/Homebrew/build.rb:101-112 | Library/Homebrew/build.rb:114-125 — 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) Library/Homebrew/cmd/install.rb:444— Library/Homebrew/cmd/install.rb:444-455 | Library/Homebrew/cmd/reinstall.rb:317-328 — before extracting anything, compare `Library/Homebrew/cmd/install.rb` and `Library/Homebrew/cmd/reinstall.rb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Library/Homebrew/cmd/install.rb:444` 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 (12 lines × 2) Library/Homebrew/dev-cmd/contributions.rb:443— Library/Homebrew/dev-cmd/contributions.rb:443-454 | Library/Homebrew/dev-cmd/contributions.rb:490-501 — 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) Library/Homebrew/livecheck/strategy/pypi.rb:96— Library/Homebrew/livecheck/strategy/pypi.rb:96-107 | Library/Homebrew/livecheck/strategy/ruby_gems.rb:85-96 — 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 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) Library/Homebrew/cask/staged.rb:49— Library/Homebrew/cask/staged.rb:49-56 | Library/Homebrew/install_steps.rb:1367-1374 — 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) Library/Homebrew/abstract_command.rb:33— Library/Homebrew/abstract_command.rb:33-40 | Library/Homebrew/abstract_subcommand.rb:21-28 — 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 (8 lines × 2) Library/Homebrew/rubocops/blank.rb:49— Library/Homebrew/rubocops/blank.rb:49-56 | Library/Homebrew/rubocops/present.rb:42-50 — 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 (8 lines × 2) Library/Homebrew/tap/core_cask_tap.rb:78— Library/Homebrew/tap/core_cask_tap.rb:78-85 | Library/Homebrew/tap/core_tap.rb:180-187 — 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.
Change coupling: reinstall.rb ↔ upgrade.rb Library/Homebrew/cask/reinstall.rb:1— `Library/Homebrew/cask/reinstall.rb` and `Library/Homebrew/cask/upgrade.rb` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8c459e7e` Move API and queue helpers to owners; `61cef916` Fetch cask downloads with formula bottles; `bd463ee7` Keep one failure from aborting a batch install — run `git show` on any of them.
Change coupling: cask.rb ↔ formula.rb Library/Homebrew/api/cask.rb:1— `Library/Homebrew/api/cask.rb` and `Library/Homebrew/api/formula.rb` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `7b7c464d` Stop using unsigned per-package API data for installs; `170eed9f` Harden unsigned API, trust, installer and output boundaries; `5ab33c9e` Parse only needed internal API payload entries — run `git show` on any of them.
Change coupling: diagnostic.rb ↔ autoremove.rb Library/Homebrew/diagnostic.rb:1— `Library/Homebrew/diagnostic.rb` and `Library/Homebrew/utils/autoremove.rb` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `80923379` fix: handle renames and unavailable formulae in autoremove/doctor; `1e8f1eeb` perf: avoid Formulary.resolve per dep in autoremove/cleanup/doctor; `8caf1a8a` Add `installed_*` methods for calculating installed runtime deps — run `git show` on any of them.
FromNameLoader.try_new (cyclomatic 17) Library/Homebrew/cask/cask_loader.rb:600— FromNameLoader.try_new 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.
FromNameLoader.try_new (cyclomatic 17) REDACTED:802— FromNameLoader.try_new 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.
FromNameLoader.try_new (cognitive 17) Library/Homebrew/cask/cask_loader.rb:600— FromNameLoader.try_new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 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.
FromNameLoader.try_new (cognitive 17) REDACTED:802— FromNameLoader.try_new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 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.
Change-coupling hub: leaves.rb → cleanup.rb, install.rb, dependency.rb, diagnostic.rb, autoremove.rb Library/Homebrew/cmd/leaves.rb— `Library/Homebrew/cmd/leaves.rb` changes together with 5 other files — `Library/Homebrew/cleanup.rb`, `Library/Homebrew/cmd/install.rb`, `Library/Homebrew/dependency.rb`, `Library/Homebrew/diagnostic.rb`, `Library/Homebrew/utils/autoremove.rb` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
Change-coupling hub: cask_dependent.rb → cleanup.rb, install.rb, diagnostic.rb, autoremove.rb Library/Homebrew/cask_dependent.rb— `Library/Homebrew/cask_dependent.rb` changes together with 4 other files — `Library/Homebrew/cleanup.rb`, `Library/Homebrew/cmd/install.rb`, `Library/Homebrew/diagnostic.rb`, `Library/Homebrew/utils/autoremove.rb` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Duplicated block (18 lines × 2) Library/Homebrew/cask/artifact/abstract_uninstall.rb:474— Library/Homebrew/cask/artifact/abstract_uninstall.rb:474-491 | Library/Homebrew/cask/ci/zap_check.rb:114-131 — 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 (18 lines × 2) Library/Homebrew/formula.rb:5266— Library/Homebrew/formula.rb:5266-5283 | Library/Homebrew/formula.rb:5377-5394 — 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) Library/Homebrew/diagnostic.rb:1701— Library/Homebrew/diagnostic.rb:1701-1717 | Library/Homebrew/diagnostic.rb:1736-1752 — 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 `Library/Homebrew/diagnostic.rb:1701` 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) Library/Homebrew/utils/shared_audits.rb:429— Library/Homebrew/utils/shared_audits.rb:429-445 | Library/Homebrew/utils/shared_audits.rb:523-539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (9 lines × 5) Library/Homebrew/livecheck/strategy/json.rb:111— Library/Homebrew/livecheck/strategy/json.rb:111-119 | Library/Homebrew/livecheck/strategy/page_match.rb:100-108 | Library/Homebrew/livecheck/strategy/sparkle.rb:253-261 | Library/Homebrew/livecheck/strategy/xml.rb:150-158 | Library/Homebrew/livecheck/strategy/yaml.rb:109-117 — 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 5 call sites, so a change lands once. 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 (9 lines × 5) Library/Homebrew/livecheck/strategy/apache.rb:103— Library/Homebrew/livecheck/strategy/apache.rb:103-111 | Library/Homebrew/livecheck/strategy/bitbucket.rb:114-122 | Library/Homebrew/livecheck/strategy/cpan.rb:92-100 | Library/Homebrew/livecheck/strategy/gnu.rb:107-115 | Library/Homebrew/livecheck/strategy/hackage.rb:91-99 — 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 5 call sites, so a change lands once.
Duplicated block (7 lines × 2) REDACTED:148— REDACTED:148-154 | Library/Homebrew/dev-cmd/livecheck.rb:72-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.
Duplicated block (7 lines × 2) Library/Homebrew/tab/tab.rb:429— Library/Homebrew/tab/tab.rb:429-435 | Library/Homebrew/tab/tab.rb:458-464 — 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 `Library/Homebrew/tab/tab.rb:429` 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 (5 lines × 2) Library/Homebrew/vulns/cpan_sec.rb:34— Library/Homebrew/vulns/cpan_sec.rb:34-38 | Library/Homebrew/vulns/repology.rb:37-41 — 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 (5 lines × 2) REDACTED:229— REDACTED:229-233 | REDACTED:237-241 — 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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 6 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.
BumpFormulaPr.run (cyclomatic 112) REDACTED:102— BumpFormulaPr.run has cyclomatic complexity 112 (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.
Livecheck.latest_version (cyclomatic 112) Library/Homebrew/livecheck/livecheck.rb:631— Livecheck.latest_version has cyclomatic complexity 112 (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.
List.run (cyclomatic 93) Library/Homebrew/cmd/list.rb:94— List.run has cyclomatic complexity 93 (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.
Livecheck.run_checks (cyclomatic 90) Library/Homebrew/livecheck/livecheck.rb:161— Livecheck.run_checks has cyclomatic complexity 90 (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.
AdvisoryMatch.run (cyclomatic 88) Library/Homebrew/dev-cmd/advisory-match.rb:74— AdvisoryMatch.run has cyclomatic complexity 88 (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.
Livecheck.resource_version (cyclomatic 86) Library/Homebrew/livecheck/livecheck.rb:906— Livecheck.resource_version has cyclomatic complexity 86 (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.
Runner.run_install_step (cyclomatic 84) Library/Homebrew/install_steps.rb:1002— Runner.run_install_step has cyclomatic complexity 84 (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.
Bump.retrieve_versions_by_arch (cyclomatic 82) REDACTED:222— Bump.retrieve_versions_by_arch has cyclomatic complexity 82 (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.
Info.info_formula (cyclomatic 80) Library/Homebrew/cmd/info.rb:435— Info.info_formula has cyclomatic complexity 80 (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.
PyPI.update_python_resources! (cyclomatic 74) Library/Homebrew/utils/pypi.rb:249— PyPI.update_python_resources! has cyclomatic complexity 74 (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.
FormulaAuditor.audit_deps (cyclomatic 72) Library/Homebrew/formula_auditor.rb:342— FormulaAuditor.audit_deps has cyclomatic complexity 72 (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.
UpdateReport.output_update_report (cyclomatic 71) Library/Homebrew/cmd/update-report.rb:80— UpdateReport.output_update_report has cyclomatic complexity 71 (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.
Bump.retrieve_and_display_info_and_open_pr (cyclomatic 71) REDACTED:475— Bump.retrieve_and_display_info_and_open_pr has cyclomatic complexity 71 (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.
Bottle.bottle_formula (cyclomatic 67) Library/Homebrew/dev-cmd/bottle.rb:427— Bottle.bottle_formula has cyclomatic complexity 67 (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.
Audit.run (cyclomatic 66) Library/Homebrew/dev-cmd/audit.rb:106— Audit.run has cyclomatic complexity 66 (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.
FormulaAuditor.audit_specs (cyclomatic 64) Library/Homebrew/formula_auditor.rb:893— FormulaAuditor.audit_specs has cyclomatic complexity 64 (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.
InstallCmd.run (cyclomatic 63) Library/Homebrew/cmd/install.rb:179— InstallCmd.run has cyclomatic complexity 63 (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.
Audit.audit_signing (cyclomatic 61) Library/Homebrew/cask/audit.rb:628— Audit.audit_signing has cyclomatic complexity 61 (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.
Influx.query (cyclomatic 60) Library/Homebrew/utils/analytics/influx.rb:87— Influx.query has cyclomatic complexity 60 (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.
Bump.version_with_cooldown (cyclomatic 59) REDACTED:801— Bump.version_with_cooldown has cyclomatic complexity 59 (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.
API.fetch_json_api_file (cyclomatic 58) Library/Homebrew/api.rb:50— API.fetch_json_api_file has cyclomatic complexity 58 (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.
Contributions.run (cyclomatic 58) Library/Homebrew/dev-cmd/contributions.rb:114— Contributions.run has cyclomatic complexity 58 (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.
Install.install_formula? (cyclomatic 58) Library/Homebrew/install/check.rb:17— Install.install_formula? has cyclomatic complexity 58 (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.
Tap.install (cyclomatic 58) Library/Homebrew/tap.rb:674— Tap.install has cyclomatic complexity 58 (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.
NamedArgs.load_formula_or_cask (cyclomatic 51) Library/Homebrew/cli/named_args.rb:342— NamedArgs.load_formula_or_cask 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.
StaleLeadMaintainerPrApproval.evaluate (cyclomatic 49) .github/scripts/approve_stale_lead_maintainer_prs.rb:180— StaleLeadMaintainerPrApproval.evaluate has cyclomatic complexity 49 (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.
UpgradeCmd.run (cyclomatic 47) Library/Homebrew/cmd/upgrade.rb:186— UpgradeCmd.run has cyclomatic complexity 47 (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.
Curl.curl_check_http_content (cyclomatic 47) Library/Homebrew/utils/curl.rb:476— Curl.curl_check_http_content has cyclomatic complexity 47 (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.
BumpCaskPr.replace_version_and_checksum (cyclomatic 46) REDACTED:294— BumpCaskPr.replace_version_and_checksum has cyclomatic complexity 46 (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.
OsvExport.merge_range_transitions (cyclomatic 46) Library/Homebrew/vulns/osv_export.rb:251— OsvExport.merge_range_transitions 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.
DownloadQueue.fetch (cyclomatic 44) Library/Homebrew/download_queue.rb:141— DownloadQueue.fetch 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.
Miscellaneous.audit_formula (cyclomatic 44) Library/Homebrew/rubocops/lines.rb:912— Miscellaneous.audit_formula has cyclomatic complexity 44 (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.
BumpCaskPr.run (cyclomatic 43) REDACTED:70— BumpCaskPr.run has cyclomatic complexity 43 (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.
Bottle.merge (cyclomatic 42) Library/Homebrew/dev-cmd/bottle.rb:786— Bottle.merge has cyclomatic complexity 42 (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.
PlatformIndependence.body? (cyclomatic 42) Library/Homebrew/vulns/platform_independence.rb:42— PlatformIndependence.body? has cyclomatic complexity 42 (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.
ExecSubcommand.run_external_command (cyclomatic 41) Library/Homebrew/bundle/subcommand/exec.rb:89— ExecSubcommand.run_external_command has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Upgrade.upgrade_casks! (cyclomatic 41) Library/Homebrew/cask/upgrade.rb:138— Upgrade.upgrade_casks! has cyclomatic complexity 41 (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.
Release.run (cyclomatic 41) Library/Homebrew/dev-cmd/release.rb:42— Release.run has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PrPull.run (cyclomatic 40) Library/Homebrew/dev-cmd/pr-pull.rb:84— PrPull.run has cyclomatic complexity 40 (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.
Cli.stop (cyclomatic 39) Library/Homebrew/services/cli.rb:229— Cli.stop 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.
OnSystemConditionals.simplify_os_sha256_stanzas (cyclomatic 38) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:127— OnSystemConditionals.simplify_os_sha256_stanzas has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DocstringParser.parse_content (cyclomatic 38) Library/Homebrew/yard/docstring_parser.rb:25— DocstringParser.parse_content 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.
Cleanup.stale_formula? (cyclomatic 37) Library/Homebrew/cleanup.rb:162— Cleanup.stale_formula? 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.
Caskroom.migrate_caskfile_to_json (cyclomatic 34) Library/Homebrew/cask/caskroom.rb:72— Caskroom.migrate_caskfile_to_json has cyclomatic complexity 34 (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.
Reporter.report (cyclomatic 34) Library/Homebrew/cmd/update_report/reporter.rb:58— Reporter.report has cyclomatic complexity 34 (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.
Extract.run (cyclomatic 34) Library/Homebrew/dev-cmd/extract.rb:36— Extract.run has cyclomatic complexity 34 (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.
Tap.apply_redirected_remote! (cyclomatic 34) Library/Homebrew/tap.rb:549— Tap.apply_redirected_remote! has cyclomatic complexity 34 (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.
Link.run (cyclomatic 33) Library/Homebrew/cmd/link.rb:42— Link.run 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.
FormulaCellarChecks.check_prebuilt_npm_binaries (cyclomatic 33) Library/Homebrew/formula_cellar_checks.rb:436— FormulaCellarChecks.check_prebuilt_npm_binaries has cyclomatic complexity 33 (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.
Bump.run (cyclomatic 31) REDACTED:110— Bump.run has cyclomatic complexity 31 (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.
Deps.run (cyclomatic 30) REDACTED:120— Deps.run 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.
BumpFormulaPr.patches_for_removal (cyclomatic 30) REDACTED:561— BumpFormulaPr.patches_for_removal 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.
GitHubPackages.upload_bottle (cyclomatic 30) Library/Homebrew/github_packages.rb:205— GitHubPackages.upload_bottle 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.
LinkageChecker.check_dylibs (cyclomatic 30) Library/Homebrew/linkage_checker.rb:147— LinkageChecker.check_dylibs 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.
InstallStepsHelper.simple_install_step_line (cyclomatic 30) Library/Homebrew/rubocops/shared/install_steps_helper.rb:466— InstallStepsHelper.simple_install_step_line 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.
Style.check_style_impl (cyclomatic 30) REDACTED:86— Style.check_style_impl 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.
Version.<=> (cyclomatic 30) Library/Homebrew/version.rb:569— Version.<=> 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.
AdvisoryOverrides.initialize (cyclomatic 30) Library/Homebrew/vulns/advisory_overrides.rb:43— AdvisoryOverrides.initialize 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.
FormulaStructGenerator.generate_formula_struct_hash (cyclomatic 29) Library/Homebrew/api/formula/formula_struct_generator.rb:43— FormulaStructGenerator.generate_formula_struct_hash has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Audit.audit_min_os (cyclomatic 29) Library/Homebrew/cask/audit.rb:948— Audit.audit_min_os has cyclomatic complexity 29 (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.
FormulaAuditor.audit_revision (cyclomatic 29) Library/Homebrew/formula_auditor.rb:1065— FormulaAuditor.audit_revision has cyclomatic complexity 29 (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.
Text.audit_formula (cyclomatic 29) Library/Homebrew/rubocops/text.rb:14— Text.audit_formula has cyclomatic complexity 29 (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.
StaleLeadMaintainerPrApproval.finish (cyclomatic 28) .github/scripts/approve_stale_lead_maintainer_prs.rb:375— StaleLeadMaintainerPrApproval.finish 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.
FormulaInstaller.finish (cyclomatic 28) Library/Homebrew/formula_installer.rb:1052— FormulaInstaller.finish has cyclomatic complexity 28 (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.
TestResource.audit_formula (cyclomatic 28) Library/Homebrew/rubocops/class.rb:84— TestResource.audit_formula 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.
JavaVersions.audit_formula (cyclomatic 28) Library/Homebrew/rubocops/lines.rb:468— JavaVersions.audit_formula 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.
Upgrade.upgrade_dependents (cyclomatic 28) Library/Homebrew/upgrade.rb:319— Upgrade.upgrade_dependents 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.
CPAN.update_perl_resources! (cyclomatic 28) Library/Homebrew/utils/cpan.rb:93— CPAN.update_perl_resources! has cyclomatic complexity 28 (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.
SharedAudits.new_domain_problem (cyclomatic 28) Library/Homebrew/utils/shared_audits.rb:67— SharedAudits.new_domain_problem has cyclomatic complexity 28 (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.
Identify.registry_purl (cyclomatic 28) Library/Homebrew/vulns/identify.rb:197— Identify.registry_purl has cyclomatic complexity 28 (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.
CleanupSubcommand.cleanup (cyclomatic 27) Library/Homebrew/bundle/subcommand/cleanup.rb:123— CleanupSubcommand.cleanup 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.
CurlDownloadStrategy.fetch (cyclomatic 27) Library/Homebrew/download_strategy/curl_download_strategy.rb:40— CurlDownloadStrategy.fetch 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.
FormulaInstaller.check_install_sanity (cyclomatic 27) Library/Homebrew/formula_installer.rb:417— FormulaInstaller.check_install_sanity has cyclomatic complexity 27 (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.
Style.run_rubocop (cyclomatic 27) REDACTED:210— Style.run_rubocop 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.
Match.reconcile_history (cyclomatic 27) Library/Homebrew/vulns/match.rb:968— Match.reconcile_history has cyclomatic complexity 27 (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.
Audit.extract_artifacts (cyclomatic 26) Library/Homebrew/cask/audit.rb:185— Audit.extract_artifacts 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.
Audit.audit_rosetta (cyclomatic 26) Library/Homebrew/cask/audit.rb:823— Audit.audit_rosetta 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.
Upgrade.outdated_casks (cyclomatic 26) Library/Homebrew/cask/upgrade.rb:40— Upgrade.outdated_casks 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.
FetchCmd.run (cyclomatic 26) Library/Homebrew/cmd/fetch.rb:83— FetchCmd.run 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.
UninstallCmd.run (cyclomatic 26) Library/Homebrew/cmd/uninstall.rb:44— UninstallCmd.run 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.
LivecheckCmd.run (cyclomatic 26) Library/Homebrew/dev-cmd/livecheck.rb:59— LivecheckCmd.run 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.
Typecheck.run (cyclomatic 26) Library/Homebrew/dev-cmd/typecheck.rb:48— Typecheck.run 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.
Unbottled.output_unbottled (cyclomatic 26) Library/Homebrew/dev-cmd/unbottled.rb:210— Unbottled.output_unbottled 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.
Moved.move (cyclomatic 25) Library/Homebrew/cask/artifact/moved.rb:78— Moved.move 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.
Audit.cask_bundle_min_os (cyclomatic 25) Library/Homebrew/cask/audit.rb:1377— Audit.cask_bundle_min_os 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.
Parser.parse (cyclomatic 25) Library/Homebrew/cli/parser.rb:461— Parser.parse 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.
UpgradeCmd.formulae_upgrade_context (cyclomatic 25) Library/Homebrew/cmd/upgrade.rb:394— UpgradeCmd.formulae_upgrade_context 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.
Contributions.scan_contributions (cyclomatic 25) Library/Homebrew/dev-cmd/contributions.rb:366— Contributions.scan_contributions has cyclomatic complexity 25 (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.
Lgtm.run (cyclomatic 25) Library/Homebrew/dev-cmd/lgtm.rb:26— Lgtm.run 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.
FormulaCellarChecks.check_binary_arches (cyclomatic 25) Library/Homebrew/formula_cellar_checks.rb:370— FormulaCellarChecks.check_binary_arches has cyclomatic complexity 25 (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.
FormulaInstaller.install (cyclomatic 25) Library/Homebrew/formula_installer.rb:558— FormulaInstaller.install has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Service.to_plist (cyclomatic 25) Library/Homebrew/service.rb:609— Service.to_plist has cyclomatic complexity 25 (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.
Utils.safe_fork (cyclomatic 25) Library/Homebrew/utils/fork.rb:145— Utils.safe_fork has cyclomatic complexity 25 (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.
Match.subject_version_at (cyclomatic 25) Library/Homebrew/vulns/match.rb:1199— Match.subject_version_at 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.
FormulaInstaller.expand_dependencies_for_formula_once (cyclomatic 24) Library/Homebrew/formula_installer.rb:793— FormulaInstaller.expand_dependencies_for_formula_once 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.
OnSystemConditionals.audit_identical_sha256_across_architectures (cyclomatic 24) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:389— OnSystemConditionals.audit_identical_sha256_across_architectures 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.
ComponentsRedundancy.audit_formula (cyclomatic 24) Library/Homebrew/rubocops/components_redundancy.rb:24— ComponentsRedundancy.audit_formula 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.
OSDependsOn.on_send (cyclomatic 24) Library/Homebrew/rubocops/os_depends_on.rb:52— OSDependsOn.on_send 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.
PatchInclusion.removal_reason (cyclomatic 24) Library/Homebrew/utils/github/patch_inclusion.rb:24— PatchInclusion.removal_reason 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.
Mixin.odeprecated (cyclomatic 24) Library/Homebrew/utils/output.rb:189— Mixin.odeprecated 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.
Cask.auto_updates_bundle_outdated? (cyclomatic 23) Library/Homebrew/cask/cask.rb:846— Cask.auto_updates_bundle_outdated? has cyclomatic complexity 23 (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.
Reinstall.run (cyclomatic 23) Library/Homebrew/cmd/reinstall.rb:123— Reinstall.run 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.
Untrust.run (cyclomatic 23) Library/Homebrew/cmd/untrust.rb:31— Untrust.run 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.
VersionInstall.run (cyclomatic 23) Library/Homebrew/cmd/version-install.rb:31— VersionInstall.run 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.
Contributions.parse_git_log (cyclomatic 23) Library/Homebrew/dev-cmd/contributions.rb:595— Contributions.parse_git_log has cyclomatic complexity 23 (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.
FormulaAuditor.audit_license (cyclomatic 23) Library/Homebrew/formula_auditor.rb:270— FormulaAuditor.audit_license 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.
ResourceAuditor.audit_urls (cyclomatic 23) Library/Homebrew/resource_auditor.rb:194— ResourceAuditor.audit_urls 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.
Curl.curl_args (cyclomatic 23) Library/Homebrew/utils/curl.rb:121— Curl.curl_args has cyclomatic complexity 23 (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.
Edit.run (cyclomatic 22) Library/Homebrew/dev-cmd/edit.rb:30— Edit.run 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.
GenerateCaskCiMatrix.run (cyclomatic 22) Library/Homebrew/dev-cmd/generate-cask-ci-matrix.rb:54— GenerateCaskCiMatrix.run 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.
FormulaInstaller.install_dependency (cyclomatic 22) Library/Homebrew/formula_installer.rb:941— FormulaInstaller.install_dependency 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.
Formulary.load_formula_from_struct! (cyclomatic 22) REDACTED:233— Formulary.load_formula_from_struct! 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.
UrlHelper.audit_url (cyclomatic 22) Library/Homebrew/rubocops/shared/url_helper.rb:52— UrlHelper.audit_url 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.
Caveats.keg_only_text (cyclomatic 21) Library/Homebrew/caveats.rb:72— Caveats.keg_only_text 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.
Cleanup.prune_prefix_symlinks_and_directories (cyclomatic 21) Library/Homebrew/cleanup.rb:977— Cleanup.prune_prefix_symlinks_and_directories 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.
Untap.run (cyclomatic 21) Library/Homebrew/cmd/untap.rb:25— Untap.run 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.
Reporter.migrate_tap_migration (cyclomatic 21) Library/Homebrew/cmd/update_report/reporter.rb:224— Reporter.migrate_tap_migration 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.
UpgradeCmd.show_final_upgrade_summary (cyclomatic 21) Library/Homebrew/cmd/upgrade.rb:571— UpgradeCmd.show_final_upgrade_summary 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.
UpgradeCmd.upgrade_outdated_formulae! (cyclomatic 21) Library/Homebrew/cmd/upgrade.rb:662— UpgradeCmd.upgrade_outdated_formulae! 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.
BumpUnversionedCasks.bump_unversioned_cask (cyclomatic 21) Library/Homebrew/dev-cmd/bump-unversioned-casks.rb:90— BumpUnversionedCasks.bump_unversioned_cask 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.
GitDownloadStrategy.env (cyclomatic 21) Library/Homebrew/download_strategy/git_download_strategy.rb:123— GitDownloadStrategy.env 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.
FormulaInstaller.forbidden_tap_check (cyclomatic 21) Library/Homebrew/formula_installer.rb:1869— FormulaInstaller.forbidden_tap_check 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.
Formulary.tap_formula_name_type (cyclomatic 21) REDACTED:1182— Formulary.tap_formula_name_type 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.
Keg.link_dir (cyclomatic 21) Library/Homebrew/keg.rb:910— Keg.link_dir 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.
TernaryToIf.before_declaring_variable (cyclomatic 21) Library/Homebrew/rubocops/ternary_to_if.rb:32— TernaryToIf.before_declaring_variable 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.
Match.range_status (cyclomatic 21) Library/Homebrew/vulns/match.rb:729— Match.range_status 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.
Match.to_brew_record (cyclomatic 21) Library/Homebrew/vulns/match.rb:804— Match.to_brew_record 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.
Build.install (cyclomatic 20) Library/Homebrew/build.rb:85— Build.install 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.
Installer.forbidden_cask_and_formula_check (cyclomatic 20) Library/Homebrew/cask/installer.rb:906— Installer.forbidden_cask_and_formula_check 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.
Installer.load_installed_caskfile! (cyclomatic 20) Library/Homebrew/cask/installer.rb:1007— Installer.load_installed_caskfile! 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.
Upgrade.upgrade_cask (cyclomatic 20) Library/Homebrew/cask/upgrade.rb:386— Upgrade.upgrade_cask 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.
DirEmitter.reconcile (cyclomatic 20) Library/Homebrew/dev-cmd/advisory-match.rb:955— DirEmitter.reconcile 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.
Livecheck.url (cyclomatic 20) Library/Homebrew/livecheck.rb:199— Livecheck.url 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.
OnSystemConditionals.sha256_pairs (cyclomatic 20) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:338— OnSystemConditionals.sha256_pairs 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.
GemSetup.install_bundler_gems! (cyclomatic 20) Library/Homebrew/utils/gem_setup.rb:197— GemSetup.install_bundler_gems! 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.
Match.reconciliation_observation (cyclomatic 20) Library/Homebrew/vulns/match.rb:1035— Match.reconciliation_observation 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.
OsvExport.merge_existing (cyclomatic 20) Library/Homebrew/vulns/osv_export.rb:112— OsvExport.merge_existing 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.
Scanner.build_target (cyclomatic 20) Library/Homebrew/vulns/scanner.rb:171— Scanner.build_target 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.
CaskLoader.tap_cask_token_type (cyclomatic 19) Library/Homebrew/cask/cask_loader.rb:712— CaskLoader.tap_cask_token_type 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.
Installer.forbidden_tap_check (cyclomatic 19) Library/Homebrew/cask/installer.rb:865— Installer.forbidden_tap_check 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.
Caveats.service_caveats (cyclomatic 19) Library/Homebrew/caveats.rb:287— Caveats.service_caveats 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.
NamedArgs.to_paths (cyclomatic 19) Library/Homebrew/cli/named_args.rb:189— NamedArgs.to_paths 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.
Parser.generate_usage_banner (cyclomatic 19) Library/Homebrew/cli/parser.rb:777— Parser.generate_usage_banner 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.
Info.run (cyclomatic 19) Library/Homebrew/cmd/info.rb:97— Info.run 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.
DirEmitter.terminal_intervals (cyclomatic 19) Library/Homebrew/dev-cmd/advisory-match.rb:902— DirEmitter.terminal_intervals 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.
AdvisoryMatch.reconcile_formula (cyclomatic 19) Library/Homebrew/dev-cmd/advisory-match.rb:391— AdvisoryMatch.reconcile_formula 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.
Create.create_formula (cyclomatic 19) Library/Homebrew/dev-cmd/create.rb:228— Create.create_formula 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.
GenerateCaskCiMatrix.generate_matrix (cyclomatic 19) Library/Homebrew/dev-cmd/generate-cask-ci-matrix.rb:220— GenerateCaskCiMatrix.generate_matrix 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.
PrUpload.run (cyclomatic 19) Library/Homebrew/dev-cmd/pr-upload.rb:50— PrUpload.run 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.
Checks.check_untrusted_taps (cyclomatic 19) Library/Homebrew/diagnostic.rb:984— Checks.check_untrusted_taps 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.
Formula.system (cyclomatic 19) Library/Homebrew/formula.rb:3694— Formula.system 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.
FormulaInstaller.pour (cyclomatic 19) Library/Homebrew/formula_installer.rb:1696— FormulaInstaller.pour 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.
Runner.sandbox_write_paths (cyclomatic 19) Library/Homebrew/install_steps.rb:947— Runner.sandbox_write_paths 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.
InstallSteps.keychain_find_certificate_name (cyclomatic 19) Library/Homebrew/rubocops/cask/install_steps.rb:187— InstallSteps.keychain_find_certificate_name 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.
NoOverrides.on_system_stanzas (cyclomatic 19) Library/Homebrew/rubocops/cask/no_overrides.rb:39— NoOverrides.on_system_stanzas has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ComponentsOrder.audit_formula (cyclomatic 19) Library/Homebrew/rubocops/components_order.rb:27— ComponentsOrder.audit_formula 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.
Uninstall.uninstall_kegs (cyclomatic 19) Library/Homebrew/uninstall.rb:24— Uninstall.uninstall_kegs 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.
History.walk (cyclomatic 19) Library/Homebrew/vulns/history.rb:66— History.walk 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.
Bump.create_pr (cyclomatic 18) Library/Homebrew/bump.rb:49— Bump.create_pr 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.
Parser.named_args (cyclomatic 18) Library/Homebrew/cli/parser.rb:630— Parser.named_args 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.
Info.installed_section_lines (cyclomatic 18) Library/Homebrew/cmd/info.rb:813— Info.installed_section_lines 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.
DirEmitter.prepare_aliases (cyclomatic 18) Library/Homebrew/dev-cmd/advisory-match.rb:715— DirEmitter.prepare_aliases 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.
BumpFormulaPr.update_resource_block! (cyclomatic 18) REDACTED:861— BumpFormulaPr.update_resource_block! 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.
DispatchBuildBottle.run (cyclomatic 18) Library/Homebrew/dev-cmd/dispatch-build-bottle.rb:43— DispatchBuildBottle.run 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.
Unbottled.run (cyclomatic 18) Library/Homebrew/dev-cmd/unbottled.rb:45— Unbottled.run 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.
CurlDownloadStrategy.resolve_url_basename_time_file_size (cyclomatic 18) Library/Homebrew/download_strategy/curl_download_strategy.rb:209— CurlDownloadStrategy.resolve_url_basename_time_file_size 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.
FormulaAuditor.audit_file (cyclomatic 18) Library/Homebrew/formula_auditor.rb:94— FormulaAuditor.audit_file 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.
FormulaInstaller.enqueue_fetch (cyclomatic 18) Library/Homebrew/formula_installer.rb:1593— FormulaInstaller.enqueue_fetch 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.
Keg.make_relative_symlink (cyclomatic 18) Library/Homebrew/keg.rb:825— Keg.make_relative_symlink 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.
Patches.patch_problems (cyclomatic 18) Library/Homebrew/rubocops/patches.rb:58— Patches.patch_problems 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.
DescHelper.audit_desc (cyclomatic 18) Library/Homebrew/rubocops/shared/desc_helper.rb:21— DescHelper.audit_desc 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.
Cli.service_load (cyclomatic 18) Library/Homebrew/services/cli.rb:484— Cli.service_load 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.
Brew.formula_to_hash (cyclomatic 17) Library/Homebrew/bundle/brew.rb:326— Brew.formula_to_hash 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.
Trust.entries (cyclomatic 17) Library/Homebrew/bundle/trust.rb:20— Trust.entries 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.
NamedArgs.warn_if_cask_conflicts (cyclomatic 17) Library/Homebrew/cli/named_args.rb:629— NamedArgs.warn_if_cask_conflicts has cyclomatic complexity 17 (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.
Info.print_json (cyclomatic 17) Library/Homebrew/cmd/info.rb:743— Info.print_json 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.
Bump.handle_formulae_and_casks (cyclomatic 17) REDACTED:957— Bump.handle_formulae_and_casks 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.
Create.create_cask (cyclomatic 17) Library/Homebrew/dev-cmd/create.rb:93— Create.create_cask 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.
Extract.with_monkey_patch (cyclomatic 17) Library/Homebrew/dev-cmd/extract.rb:182— Extract.with_monkey_patch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Formula.eligible_kegs_for_cleanup (cyclomatic 17) Library/Homebrew/formula.rb:3802— Formula.eligible_kegs_for_cleanup 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.
FormulaCreator.initialize (cyclomatic 17) Library/Homebrew/formula_creator.rb:31— FormulaCreator.initialize 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.
FormulaInstaller.pour_bottle? (cyclomatic 17) Library/Homebrew/formula_installer.rb:258— FormulaInstaller.pour_bottle? 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.
FormulaInstaller.build (cyclomatic 17) Library/Homebrew/formula_installer.rb:1196— FormulaInstaller.build 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.
Keg.relocate_build_prefix (cyclomatic 17) Library/Homebrew/keg_relocate.rb:309— Keg.relocate_build_prefix 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.
Readall.valid_casks? (cyclomatic 17) Library/Homebrew/readall.rb:119— Readall.valid_casks? 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.
InstallSteps.keychain_certificate_step_lines (cyclomatic 17) Library/Homebrew/rubocops/cask/install_steps.rb:118— InstallSteps.keychain_certificate_step_lines 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.
PythonVersions.audit_formula (cyclomatic 17) Library/Homebrew/rubocops/lines.rb:591— PythonVersions.audit_formula 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.
ShellCommands.on_send (cyclomatic 17) Library/Homebrew/rubocops/shell_commands.rb:74— ShellCommands.on_send 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.
Curl.curl_http_content_headers_and_checksum (cyclomatic 17) Library/Homebrew/utils/curl.rb:641— Curl.curl_http_content_headers_and_checksum 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.
API.open_rest (cyclomatic 17) Library/Homebrew/utils/github/api.rb:294— API.open_rest 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.
Identify.registry_package_for (cyclomatic 17) Library/Homebrew/vulns/identify.rb:150— Identify.registry_package_for 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.
Vulnerability.non_semver_fix_available_of_type? (cyclomatic 17) Library/Homebrew/vulns/vulnerability.rb:429— Vulnerability.non_semver_fix_available_of_type? has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cask.install! (cyclomatic 16) Library/Homebrew/bundle/cask.rb:64— Cask.install! 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.
DSL.sha256 (cyclomatic 16) Library/Homebrew/cask/dsl.rb:553— DSL.sha256 has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cleanup.cleanup_cache (cyclomatic 16) Library/Homebrew/cleanup.rb:741— Cleanup.cleanup_cache 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.
Parser.switch (cyclomatic 16) Library/Homebrew/cli/parser.rb:232— Parser.switch 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.
FetchCmd.cask_downloads (cyclomatic 16) Library/Homebrew/cmd/fetch.rb:192— FetchCmd.cask_downloads 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.
FetchCmd.enqueue_api_formula_bottles? (cyclomatic 16) Library/Homebrew/cmd/fetch.rb:284— FetchCmd.enqueue_api_formula_bottles? 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.
Dependency.installed? (cyclomatic 16) Library/Homebrew/dependency.rb:70— Dependency.installed? 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.
DeprecateDisable.message (cyclomatic 16) Library/Homebrew/deprecate_disable.rb:76— DeprecateDisable.message 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.
DirEmitter.reconciliation_resource_records (cyclomatic 16) Library/Homebrew/dev-cmd/advisory-match.rb:816— DirEmitter.reconciliation_resource_records 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.
Bottle.keg_contain? (cyclomatic 16) Library/Homebrew/dev-cmd/bottle.rb:254— Bottle.keg_contain? 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.
FormulaAnalytics.run (cyclomatic 16) Library/Homebrew/dev-cmd/formula-analytics.rb:66— FormulaAnalytics.run 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.
Unbottled.output_lost_bottles (cyclomatic 16) Library/Homebrew/dev-cmd/unbottled.rb:291— Unbottled.output_lost_bottles has cyclomatic complexity 16 (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.
WhichUpdate.update_and_save! (cyclomatic 16) Library/Homebrew/dev-cmd/which-update.rb:56— WhichUpdate.update_and_save! 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.
FormulaAuditor.audit_compatibility_version (cyclomatic 16) Library/Homebrew/formula_auditor.rb:1129— FormulaAuditor.audit_compatibility_version 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.
FormulaCellarChecks.check_cpuid_instruction (cyclomatic 16) Library/Homebrew/formula_cellar_checks.rb:324— FormulaCellarChecks.check_cpuid_instruction 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.
Keg.elf_relocation_strings (cyclomatic 16) Library/Homebrew/keg_relocate.rb:686— Keg.elf_relocation_strings 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.
MissingFormula.tap_migration_reason (cyclomatic 16) Library/Homebrew/missing_formula.rb:102— MissingFormula.tap_migration_reason 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.
AssertStatements.audit_formula (cyclomatic 16) Library/Homebrew/rubocops/lines.rb:72— AssertStatements.audit_formula 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.
RedundantGenerateCompletionsShells.audit_formula (cyclomatic 16) Library/Homebrew/rubocops/lines.rb:871— RedundantGenerateCompletionsShells.audit_formula 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.
InstallStepsHelper.brew_ruby_step_node (cyclomatic 16) Library/Homebrew/rubocops/shared/install_steps_helper.rb:175— InstallStepsHelper.brew_ruby_step_node 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.
Service.to_systemd_unit (cyclomatic 16) Library/Homebrew/service.rb:675— Service.to_systemd_unit 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.
Cli.start (cyclomatic 16) Library/Homebrew/services/cli.rb:180— Cli.start 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.
SystemCommand.each_output_line (cyclomatic 16) Library/Homebrew/system_command.rb:459— SystemCommand.each_output_line 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.
TapAuditor.check_renames (cyclomatic 16) Library/Homebrew/tap_auditor.rb:160— TapAuditor.check_renames 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.
UnversionedCaskChecker.guess_cask_version (cyclomatic 16) Library/Homebrew/unversioned_cask_checker.rb:184— UnversionedCaskChecker.guess_cask_version 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.
API.raise_error (cyclomatic 16) Library/Homebrew/utils/github/api.rb:456— API.raise_error 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.
Utils.popen (cyclomatic 16) Library/Homebrew/utils/popen.rb:102— Utils.popen 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.
Vulnerability.range_status_for_entries (cyclomatic 16) Library/Homebrew/vulns/vulnerability.rb:184— Vulnerability.range_status_for_entries 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.
XxxComment Library/Homebrew/requirement.rb:142— # XXX If the satisfy block returns a Pathname, then make sure that it — 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.
HackComment Library/Homebrew/cmd/update_report/reporter.rb:387— # Hack `git diff` output with regexes to look like `git diff-tree` output. — 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.
List.run (cognitive 184) Library/Homebrew/cmd/list.rb:94— List.run has cognitive complexity 184 (threshold 15). Drivers by points: if/else 66 (146 pts), boolean chains 28, ternaries 2 (6 pts), error handling 1 (4 pts) (nesting depth added 87). 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.
Livecheck.latest_version (cognitive 162) Library/Homebrew/livecheck/livecheck.rb:631— Livecheck.latest_version has cognitive complexity 162 (threshold 15). Drivers by points: if/else 75 (126 pts), boolean chains 25, match/switch 3 (7 pts), ternaries 2 (4 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdateReport.output_update_report (cognitive 147) Library/Homebrew/cmd/update-report.rb:80— UpdateReport.output_update_report has cognitive complexity 147 (threshold 15). Drivers by points: if/else 55 (123 pts), boolean chains 15, error handling 3 (9 pts) (nesting depth added 74). 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.
BumpFormulaPr.run (cognitive 145) REDACTED:102— BumpFormulaPr.run has cognitive complexity 145 (threshold 15). Drivers by points: if/else 86 (113 pts), boolean chains 25, ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 30). 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.
Livecheck.resource_version (cognitive 119) Library/Homebrew/livecheck/livecheck.rb:906— Livecheck.resource_version has cognitive complexity 119 (threshold 15). Drivers by points: if/else 65 (98 pts), boolean chains 16, ternaries 2 (4 pts), error handling 1 (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.
Livecheck.run_checks (cognitive 112) Library/Homebrew/livecheck/livecheck.rb:161— Livecheck.run_checks has cognitive complexity 112 (threshold 15). Drivers by points: if/else 57 (87 pts), boolean chains 23, error handling 1, match/switch 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bump.retrieve_versions_by_arch (cognitive 105) REDACTED:222— Bump.retrieve_versions_by_arch has cognitive complexity 105 (threshold 15). Drivers by points: if/else 42 (63 pts), boolean chains 38, ternaries 3, error handling 1 (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.
Info.info_formula (cognitive 102) Library/Homebrew/cmd/info.rb:435— Info.info_formula has cognitive complexity 102 (threshold 15). Drivers by points: if/else 51 (71 pts), boolean chains 22, ternaries 3 (5 pts), error handling 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DownloadQueue.fetch (cognitive 102) Library/Homebrew/download_queue.rb:141— DownloadQueue.fetch has cognitive complexity 102 (threshold 15). Drivers by points: if/else 36 (77 pts), error handling 5 (13 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 52). 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.
InstallCmd.run (cognitive 100) Library/Homebrew/cmd/install.rb:179— InstallCmd.run has cognitive complexity 100 (threshold 15). Drivers by points: if/else 40 (73 pts), boolean chains 15, error handling 5 (9 pts), match/switch 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bottle.bottle_formula (cognitive 99) Library/Homebrew/dev-cmd/bottle.rb:427— Bottle.bottle_formula has cognitive complexity 99 (threshold 15). Drivers by points: if/else 60 (88 pts), boolean chains 8, ternaries 2, error handling 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.
NamedArgs.load_formula_or_cask (cognitive 98) Library/Homebrew/cli/named_args.rb:342— NamedArgs.load_formula_or_cask has cognitive complexity 98 (threshold 15). Drivers by points: if/else 31 (71 pts), error handling 5 (14 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 50). 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.
Runner.run_install_step (cognitive 97) Library/Homebrew/install_steps.rb:1002— Runner.run_install_step has cognitive complexity 97 (threshold 15). Drivers by points: if/else 39 (78 pts), boolean chains 18, match/switch 1 (nesting depth added 39). 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.
AdvisoryMatch.run (cognitive 94) Library/Homebrew/dev-cmd/advisory-match.rb:74— AdvisoryMatch.run has cognitive complexity 94 (threshold 15). Drivers by points: if/else 43 (59 pts), boolean chains 30, ternaries 1 (3 pts), error handling 1, match/switch 1 (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.
PyPI.update_python_resources! (cognitive 94) Library/Homebrew/utils/pypi.rb:249— PyPI.update_python_resources! has cognitive complexity 94 (threshold 15). Drivers by points: if/else 53 (71 pts), boolean chains 22, error handling 1 (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.
Bump.retrieve_and_display_info_and_open_pr (cognitive 92) REDACTED:475— Bump.retrieve_and_display_info_and_open_pr has cognitive complexity 92 (threshold 15). Drivers by points: if/else 47 (62 pts), boolean chains 29, ternaries 1 (nesting depth added 15). 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.
Bump.version_with_cooldown (cognitive 83) REDACTED:801— Bump.version_with_cooldown has cognitive complexity 83 (threshold 15). Drivers by points: if/else 37 (71 pts), boolean chains 11, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Install.install_formula? (cognitive 79) Library/Homebrew/install/check.rb:17— Install.install_formula? has cognitive complexity 79 (threshold 15). Drivers by points: if/else 36 (55 pts), boolean chains 24 (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.
Contributions.run (cognitive 76) Library/Homebrew/dev-cmd/contributions.rb:114— Contributions.run has cognitive complexity 76 (threshold 15). Drivers by points: if/else 38 (53 pts), boolean chains 21, 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.
Influx.query (cognitive 76) Library/Homebrew/utils/analytics/influx.rb:87— Influx.query has cognitive complexity 76 (threshold 15). Drivers by points: if/else 40 (56 pts), ternaries 6 (12 pts), boolean chains 6, match/switch 2 (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.
Tap.install (cognitive 75) Library/Homebrew/tap.rb:674— Tap.install has cognitive complexity 75 (threshold 15). Drivers by points: if/else 36 (51 pts), boolean chains 19, ternaries 2 (4 pts), error handling 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.
API.fetch_json_api_file (cognitive 74) Library/Homebrew/api.rb:50— API.fetch_json_api_file has cognitive complexity 74 (threshold 15). Drivers by points: if/else 30 (46 pts), boolean chains 24, error handling 2, ternaries 1 (2 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.
Audit.run (cognitive 73) Library/Homebrew/dev-cmd/audit.rb:106— Audit.run has cognitive complexity 73 (threshold 15). Drivers by points: if/else 43 (54 pts), boolean chains 18, ternaries 1 (nesting depth added 11). 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.
FormulaAuditor.audit_specs (cognitive 68) Library/Homebrew/formula_auditor.rb:893— FormulaAuditor.audit_specs has cognitive complexity 68 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 14, match/switch 1 (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.
FormulaAuditor.audit_deps (cognitive 67) Library/Homebrew/formula_auditor.rb:342— FormulaAuditor.audit_deps has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34, boolean chains 27, error handling 3 (6 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.
Audit.audit_signing (cognitive 66) Library/Homebrew/cask/audit.rb:628— Audit.audit_signing has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (43 pts), boolean chains 20, match/switch 2, ternaries 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.
Cli.stop (cognitive 66) Library/Homebrew/services/cli.rb:229— Cli.stop has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (50 pts), boolean chains 13, loops 1 (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.
Moved.move (cognitive 64) Library/Homebrew/cask/artifact/moved.rb:78— Moved.move has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (56 pts), boolean chains 8 (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.
UpgradeCmd.run (cognitive 59) Library/Homebrew/cmd/upgrade.rb:186— UpgradeCmd.run has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 19, match/switch 1 (2 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.
Release.run (cognitive 59) Library/Homebrew/dev-cmd/release.rb:42— Release.run has cognitive complexity 59 (threshold 15). Drivers by points: if/else 26 (40 pts), error handling 8 (10 pts), boolean chains 6, ternaries 1 (2 pts), 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.
ExecSubcommand.run_external_command (cognitive 57) Library/Homebrew/bundle/subcommand/exec.rb:89— ExecSubcommand.run_external_command has cognitive complexity 57 (threshold 15). Drivers by points: if/else 36 (47 pts), boolean chains 7, error handling 1 (3 pts) (nesting depth added 13). 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.
StaleLeadMaintainerPrApproval.evaluate (cognitive 54) .github/scripts/approve_stale_lead_maintainer_prs.rb:180— StaleLeadMaintainerPrApproval.evaluate has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (35 pts), boolean chains 19 (nesting depth added 8). 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.
OsvExport.merge_range_transitions (cognitive 54) Library/Homebrew/vulns/osv_export.rb:251— OsvExport.merge_range_transitions has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 22, 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.
BumpCaskPr.replace_version_and_checksum (cognitive 53) REDACTED:294— BumpCaskPr.replace_version_and_checksum has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 18, ternaries 2 (nesting depth added 8). 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.
Extract.run (cognitive 53) Library/Homebrew/dev-cmd/extract.rb:36— Extract.run has cognitive complexity 53 (threshold 15). Drivers by points: if/else 28 (45 pts), boolean chains 6, ternaries 1 (2 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.
CleanupSubcommand.cleanup (cognitive 52) Library/Homebrew/bundle/subcommand/cleanup.rb:123— CleanupSubcommand.cleanup has cognitive complexity 52 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 4 (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.
BumpCaskPr.run (cognitive 52) REDACTED:70— BumpCaskPr.run has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 12, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). 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.
Bottle.merge (cognitive 51) Library/Homebrew/dev-cmd/bottle.rb:786— Bottle.merge has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 16, error handling 1 (2 pts), match/switch 1, ternaries 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.
Untap.run (cognitive 50) Library/Homebrew/cmd/untap.rb:25— Untap.run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (34 pts), error handling 3 (10 pts), boolean chains 6 (nesting depth added 28). 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.
Curl.curl_check_http_content (cognitive 49) Library/Homebrew/utils/curl.rb:476— Curl.curl_check_http_content has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 19, error handling 2 (3 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.
Bump.run (cognitive 48) REDACTED:110— Bump.run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 7 (14 pts), boolean chains 4, error handling 1 (2 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.
Cleanup.stale_formula? (cognitive 47) Library/Homebrew/cleanup.rb:162— Cleanup.stale_formula? has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (32 pts), error handling 4 (8 pts), boolean chains 7 (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.
FetchCmd.run (cognitive 47) Library/Homebrew/cmd/fetch.rb:83— FetchCmd.run has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (34 pts), error handling 2 (7 pts), match/switch 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SharedAudits.new_domain_problem (cognitive 47) Library/Homebrew/utils/shared_audits.rb:67— SharedAudits.new_domain_problem has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (25 pts), error handling 4 (9 pts), boolean chains 5, match/switch 1 (3 pts), ternaries 1 (3 pts), loops 1 (2 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.
Miscellaneous.audit_formula (cognitive 46) Library/Homebrew/rubocops/lines.rb:912— Miscellaneous.audit_formula has cognitive complexity 46 (threshold 15). Drivers by points: if/else 34 (37 pts), boolean chains 9 (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.
PlatformIndependence.body? (cognitive 46) Library/Homebrew/vulns/platform_independence.rb:42— PlatformIndependence.body? has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 15, match/switch 2 (4 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.
PrPull.run (cognitive 44) Library/Homebrew/dev-cmd/pr-pull.rb:84— PrPull.run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 15 (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.
LinkageChecker.check_dylibs (cognitive 44) Library/Homebrew/linkage_checker.rb:147— LinkageChecker.check_dylibs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 8, error handling 3 (5 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.
GemSetup.install_bundler_gems! (cognitive 44) Library/Homebrew/utils/gem_setup.rb:197— GemSetup.install_bundler_gems! has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (39 pts), error handling 1 (4 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.
Upgrade.upgrade_casks! (cognitive 43) Library/Homebrew/cask/upgrade.rb:138— Upgrade.upgrade_casks! has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 13, error handling 3 (5 pts) (nesting depth added 8). 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.
Unbottled.output_unbottled (cognitive 42) Library/Homebrew/dev-cmd/unbottled.rb:210— Unbottled.output_unbottled has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (39 pts), match/switch 1 (2 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.
Deps.run (cognitive 41) REDACTED:120— Deps.run has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 6, match/switch 2 (5 pts), ternaries 1 (nesting depth added 9). 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.
Lgtm.run (cognitive 41) Library/Homebrew/dev-cmd/lgtm.rb:26— Lgtm.run has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 3 (8 pts), boolean chains 2 (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.
Version.<=> (cognitive 41) Library/Homebrew/version.rb:569— Version.<=> has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 7, loops 1, match/switch 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.
Upgrade.outdated_casks (cognitive 40) Library/Homebrew/cask/upgrade.rb:40— Upgrade.outdated_casks has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 6, ternaries 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.
Link.run (cognitive 40) Library/Homebrew/cmd/link.rb:42— Link.run has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 9, error handling 2, ternaries 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.
BumpUnversionedCasks.bump_unversioned_cask (cognitive 40) Library/Homebrew/dev-cmd/bump-unversioned-casks.rb:90— BumpUnversionedCasks.bump_unversioned_cask has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 4 (11 pts), boolean chains 5 (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.
OnSystemConditionals.simplify_os_sha256_stanzas (cognitive 40) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:127— OnSystemConditionals.simplify_os_sha256_stanzas has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 21, if/else 15 (16 pts), ternaries 2 (3 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Tap.apply_redirected_remote! (cognitive 40) Library/Homebrew/tap.rb:549— Tap.apply_redirected_remote! has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 19, ternaries 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, 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.
CurlDownloadStrategy.fetch (cognitive 39) Library/Homebrew/download_strategy/curl_download_strategy.rb:40— CurlDownloadStrategy.fetch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 5, error handling 4 (5 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.
DocstringParser.parse_content (cognitive 39) Library/Homebrew/yard/docstring_parser.rb:25— DocstringParser.parse_content has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 14, ternaries 1 (4 pts) (nesting depth added 13). 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.
CPAN.update_perl_resources! (cognitive 38) Library/Homebrew/utils/cpan.rb:93— CPAN.update_perl_resources! has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26 (35 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.
Parser.parse (cognitive 37) Library/Homebrew/cli/parser.rb:461— Parser.parse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 8, ternaries 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.
Reporter.report (cognitive 37) Library/Homebrew/cmd/update_report/reporter.rb:58— Reporter.report has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28 (32 pts), match/switch 2 (3 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.
UpgradeCmd.formulae_upgrade_context (cognitive 37) Library/Homebrew/cmd/upgrade.rb:394— UpgradeCmd.formulae_upgrade_context has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 5, ternaries 1 (2 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.
PrUpload.run (cognitive 37) Library/Homebrew/dev-cmd/pr-upload.rb:50— PrUpload.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (37 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.
Upgrade.upgrade_dependents (cognitive 37) Library/Homebrew/upgrade.rb:319— Upgrade.upgrade_dependents has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (22 pts), error handling 3 (6 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Caskroom.migrate_caskfile_to_json (cognitive 36) Library/Homebrew/cask/caskroom.rb:72— Caskroom.migrate_caskfile_to_json has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 14, error handling 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, 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.
LivecheckCmd.run (cognitive 36) Library/Homebrew/dev-cmd/livecheck.rb:59— LivecheckCmd.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 6 (12 pts), boolean chains 3, error handling 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.
GitHubPackages.upload_bottle (cognitive 36) Library/Homebrew/github_packages.rb:205— GitHubPackages.upload_bottle has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2, loops 1, match/switch 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.
StaleLeadMaintainerPrApproval.finish (cognitive 35) .github/scripts/approve_stale_lead_maintainer_prs.rb:375— StaleLeadMaintainerPrApproval.finish has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 11, ternaries 3 (4 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.
VersionInstall.run (cognitive 35) Library/Homebrew/cmd/version-install.rb:31— VersionInstall.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (24 pts), error handling 3 (6 pts), boolean chains 5 (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.
Typecheck.run (cognitive 35) Library/Homebrew/dev-cmd/typecheck.rb:48— Typecheck.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6, ternaries 3 (5 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.
Formula.eligible_kegs_for_cleanup (cognitive 35) Library/Homebrew/formula.rb:3802— Formula.eligible_kegs_for_cleanup has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 3 (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.
Style.check_style_impl (cognitive 35) REDACTED:86— Style.check_style_impl has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 12, match/switch 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.
Uninstall.uninstall_kegs (cognitive 35) Library/Homebrew/uninstall.rb:24— Uninstall.uninstall_kegs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (28 pts), error handling 2 (3 pts), ternaries 1 (3 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.
Cleanup.prune_prefix_symlinks_and_directories (cognitive 34) Library/Homebrew/cleanup.rb:977— Cleanup.prune_prefix_symlinks_and_directories has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 3 (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.
Reporter.migrate_tap_migration (cognitive 34) Library/Homebrew/cmd/update_report/reporter.rb:224— Reporter.migrate_tap_migration has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 2, error handling 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.
FormulaAuditor.audit_license (cognitive 34) Library/Homebrew/formula_auditor.rb:270— FormulaAuditor.audit_license has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 5 (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.
Formulary.load_formula_from_struct! (cognitive 34) REDACTED:233— Formulary.load_formula_from_struct! has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (34 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.
Formulary.tap_formula_name_type (cognitive 34) REDACTED:1182— Formulary.tap_formula_name_type has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 5 (11 pts), boolean chains 5 (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.
Keg.link_dir (cognitive 34) Library/Homebrew/keg.rb:910— Keg.link_dir has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 2 (4 pts), boolean chains 3 (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.
Style.run_rubocop (cognitive 34) REDACTED:210— Style.run_rubocop has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 7, match/switch 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.
Upgrade.upgrade_cask (cognitive 33) Library/Homebrew/cask/upgrade.rb:386— Upgrade.upgrade_cask has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 3 (6 pts), match/switch 1 (2 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.
Info.print_json (cognitive 33) Library/Homebrew/cmd/info.rb:743— Info.print_json has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TapInfo.print_tap_info (cognitive 33) Library/Homebrew/cmd/tap-info.rb:44— TapInfo.print_tap_info has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 4, ternaries 1 (4 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.
Utils.popen (cognitive 33) Library/Homebrew/utils/popen.rb:102— Utils.popen has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), error handling 4 (8 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.
AdvisoryOverrides.initialize (cognitive 33) Library/Homebrew/vulns/advisory_overrides.rb:43— AdvisoryOverrides.initialize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 11 (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.
Build.install (cognitive 32) Library/Homebrew/build.rb:85— Build.install has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (28 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.
CaskLoader.tap_cask_token_type (cognitive 32) Library/Homebrew/cask/cask_loader.rb:712— CaskLoader.tap_cask_token_type has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (10 pts), boolean chains 5 (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.
BumpFormulaPr.patches_for_removal (cognitive 32) REDACTED:561— BumpFormulaPr.patches_for_removal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 15, 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.
FormulaInstaller.finish (cognitive 32) Library/Homebrew/formula_installer.rb:1052— FormulaInstaller.finish has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 8 (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.
OnSystemConditionals.audit_identical_sha256_across_architectures (cognitive 32) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:389— OnSystemConditionals.audit_identical_sha256_across_architectures has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4, ternaries 2 (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.
InstallStepsHelper.simple_install_step_line (cognitive 32) Library/Homebrew/rubocops/shared/install_steps_helper.rb:466— InstallStepsHelper.simple_install_step_line has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 8, match/switch 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.
Caveats.keg_only_text (cognitive 31) Library/Homebrew/caveats.rb:72— Caveats.keg_only_text has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6 (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.
Info.run (cognitive 31) Library/Homebrew/cmd/info.rb:97— Info.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 2 (4 pts), boolean chains 3 (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.
Outdated.print_outdated (cognitive 31) Library/Homebrew/cmd/outdated.rb:128— Outdated.print_outdated has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (30 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.
Reinstall.run (cognitive 31) Library/Homebrew/cmd/reinstall.rb:123— Reinstall.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 4 (9 pts), boolean chains 1, 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.
FormulaCellarChecks.check_prebuilt_npm_binaries (cognitive 31) Library/Homebrew/formula_cellar_checks.rb:436— FormulaCellarChecks.check_prebuilt_npm_binaries has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, boolean chains 5, error handling 2, ternaries 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.
ComponentsRedundancy.audit_formula (cognitive 31) Library/Homebrew/rubocops/components_redundancy.rb:24— ComponentsRedundancy.audit_formula has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 8, ternaries 2 (5 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.
Identify.registry_purl (cognitive 31) Library/Homebrew/vulns/identify.rb:197— Identify.registry_purl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 2, match/switch 1 (nesting depth added 14). 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.
FormulaStructGenerator.generate_formula_struct_hash (cognitive 30) Library/Homebrew/api/formula/formula_struct_generator.rb:43— FormulaStructGenerator.generate_formula_struct_hash has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 11 (13 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Parser.generate_usage_banner (cognitive 30) Library/Homebrew/cli/parser.rb:777— Parser.generate_usage_banner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (27 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.
Untrust.run (cognitive 30) Library/Homebrew/cmd/untrust.rb:31— Untrust.run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (4 pts), boolean chains 3, ternaries 2 (3 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.
BumpFormulaPr.update_resource_block! (cognitive 30) REDACTED:861— BumpFormulaPr.update_resource_block! has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (30 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.
FormulaInstaller.check_install_sanity (cognitive 30) Library/Homebrew/formula_installer.rb:417— FormulaInstaller.check_install_sanity has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 9 (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.
FormulaInstaller.install (cognitive 30) Library/Homebrew/formula_installer.rb:558— FormulaInstaller.install has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 6, error handling 3 (4 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.
JavaVersions.audit_formula (cognitive 30) Library/Homebrew/rubocops/lines.rb:468— JavaVersions.audit_formula has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (24 pts), match/switch 2 (3 pts), boolean chains 2, ternaries 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, 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.
NamedArgs.to_paths (cognitive 29) Library/Homebrew/cli/named_args.rb:189— NamedArgs.to_paths has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 8, ternaries 1 (2 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.
UninstallCmd.run (cognitive 29) Library/Homebrew/cmd/uninstall.rb:44— UninstallCmd.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 3, error handling 2 (3 pts), match/switch 1, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ResourceAuditor.audit_urls (cognitive 29) Library/Homebrew/resource_auditor.rb:194— ResourceAuditor.audit_urls has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, 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.
Curl.curl_http_content_headers_and_checksum (cognitive 29) Library/Homebrew/utils/curl.rb:641— Curl.curl_http_content_headers_and_checksum has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 pts), error handling 1 (4 pts), boolean chains 2, ternaries 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.
Audit.audit_min_os (cognitive 28) Library/Homebrew/cask/audit.rb:948— Audit.audit_min_os has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 10, ternaries 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.
Edit.run (cognitive 28) Library/Homebrew/dev-cmd/edit.rb:30— Edit.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 9 (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.
FormulaAuditor.audit_file (cognitive 28) Library/Homebrew/formula_auditor.rb:94— FormulaAuditor.audit_file has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 6, error handling 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.
Text.audit_formula (cognitive 28) Library/Homebrew/rubocops/text.rb:14— Text.audit_formula has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 4, match/switch 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.
Mixin.odeprecated (cognitive 28) Library/Homebrew/utils/output.rb:189— Mixin.odeprecated has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 3, error handling 1 (2 pts) (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.
Audit.extract_artifacts (cognitive 27) Library/Homebrew/cask/audit.rb:185— Audit.extract_artifacts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 10 (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.
DirEmitter.reconcile (cognitive 27) Library/Homebrew/dev-cmd/advisory-match.rb:955— DirEmitter.reconcile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 6, error handling 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.
FormulaAuditor.audit_revision (cognitive 27) Library/Homebrew/formula_auditor.rb:1065— FormulaAuditor.audit_revision has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14, boolean chains 13. 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.
FormulaInstaller.forbidden_tap_check (cognitive 27) Library/Homebrew/formula_installer.rb:1869— FormulaInstaller.forbidden_tap_check has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7 (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.
Trust.entries (cognitive 26) Library/Homebrew/bundle/trust.rb:20— Trust.entries has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (4 pts), ternaries 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.
Audit.audit_rosetta (cognitive 26) Library/Homebrew/cask/audit.rb:823— Audit.audit_rosetta has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, 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.
Audit.cask_bundle_min_os (cognitive 26) Library/Homebrew/cask/audit.rb:1377— Audit.cask_bundle_min_os has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 2 (3 pts), error handling 1 (2 pts), boolean chains 1, ternaries 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.
AdvisoryMatch.reconcile_formula (cognitive 26) Library/Homebrew/dev-cmd/advisory-match.rb:391— AdvisoryMatch.reconcile_formula has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (21 pts), error handling 3 (4 pts), ternaries 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.
FormulaCellarChecks.check_binary_arches (cognitive 26) Library/Homebrew/formula_cellar_checks.rb:370— FormulaCellarChecks.check_binary_arches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 11 (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.
TestResource.audit_formula (cognitive 26) Library/Homebrew/rubocops/class.rb:84— TestResource.audit_formula has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 10. 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.
PatchInclusion.removal_reason (cognitive 26) Library/Homebrew/utils/github/patch_inclusion.rb:24— PatchInclusion.removal_reason has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 9, error handling 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.
Match.reconcile_history (cognitive 26) Library/Homebrew/vulns/match.rb:968— Match.reconcile_history has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 11, ternaries 1 (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.
Match.subject_version_at (cognitive 26) Library/Homebrew/vulns/match.rb:1199— Match.subject_version_at has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5 (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.
Cask.install! (cognitive 25) Library/Homebrew/bundle/cask.rb:64— Cask.install! has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 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.
Installer.load_installed_caskfile! (cognitive 25) Library/Homebrew/cask/installer.rb:1007— Installer.load_installed_caskfile! has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, error handling 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.
UpdateReport.tap_or_untap_core_taps_if_necessary (cognitive 25) Library/Homebrew/cmd/update-report.rb:386— UpdateReport.tap_or_untap_core_taps_if_necessary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4 (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.
FormulaCreator.initialize (cognitive 25) Library/Homebrew/formula_creator.rb:31— FormulaCreator.initialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, error handling 1 (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.
FormulaInstaller.install_dependency (cognitive 25) Library/Homebrew/formula_installer.rb:941— FormulaInstaller.install_dependency has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, error handling 1, ternaries 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.
Service.to_plist (cognitive 25) Library/Homebrew/service.rb:609— Service.to_plist has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 3 (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.
History.walk (cognitive 25) Library/Homebrew/vulns/history.rb:66— History.walk has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 4 (6 pts), boolean chains 2, ternaries 1 (2 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.
Cask.auto_updates_bundle_outdated? (cognitive 24) Library/Homebrew/cask/cask.rb:846— Cask.auto_updates_bundle_outdated? has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, error handling 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.
UpgradeCmd.show_final_upgrade_summary (cognitive 24) Library/Homebrew/cmd/upgrade.rb:571— UpgradeCmd.show_final_upgrade_summary has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 3 (5 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.
Bump.handle_formulae_and_casks (cognitive 24) REDACTED:957— Bump.handle_formulae_and_casks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 3 (6 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.
Contributions.scan_contributions (cognitive 24) Library/Homebrew/dev-cmd/contributions.rb:366— Contributions.scan_contributions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 2, error handling 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.
Keg.make_relative_symlink (cognitive 24) Library/Homebrew/keg.rb:825— Keg.make_relative_symlink has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3 (6 pts), boolean chains 5 (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.
OnSystemConditionals.sha256_pairs (cognitive 24) Library/Homebrew/rubocops/cask/on_system_conditionals.rb:338— OnSystemConditionals.sha256_pairs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 5 (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.
Curl.curl_args (cognitive 24) Library/Homebrew/utils/curl.rb:121— Curl.curl_args has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), match/switch 2 (3 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.
Utils.safe_fork (cognitive 24) Library/Homebrew/utils/fork.rb:145— Utils.safe_fork has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (19 pts), error handling 3, boolean chains 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.
Info.github_info (cognitive 23) Library/Homebrew/cmd/info.rb:367— Info.github_info has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, 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.
UpgradeCmd.upgrade_outdated_formulae! (cognitive 23) Library/Homebrew/cmd/upgrade.rb:662— UpgradeCmd.upgrade_outdated_formulae! has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5 (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.
Uses.intersection_of_dependents (cognitive 23) Library/Homebrew/cmd/uses.rb:103— Uses.intersection_of_dependents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), boolean chains 5 (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.
GenerateCaskCiMatrix.run (cognitive 23) Library/Homebrew/dev-cmd/generate-cask-ci-matrix.rb:54— GenerateCaskCiMatrix.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4 (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.
Formula.system (cognitive 23) Library/Homebrew/formula.rb:3694— Formula.system has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (6 pts), match/switch 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.
Cli.service_load (cognitive 23) Library/Homebrew/services/cli.rb:484— Cli.service_load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 3 (6 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.
Cleanup.clean! (cognitive 22) Library/Homebrew/cleanup.rb:448— Cleanup.clean! has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2 (4 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.
FormulaInstaller.check_conflicts (cognitive 22) Library/Homebrew/formula_installer.rb:662— FormulaInstaller.check_conflicts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (6 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.
FormulaInstaller.expand_dependencies_for_formula_once (cognitive 22) Library/Homebrew/formula_installer.rb:793— FormulaInstaller.expand_dependencies_for_formula_once has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10 (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.
ComponentsOrder.audit_formula (cognitive 22) Library/Homebrew/rubocops/components_order.rb:27— ComponentsOrder.audit_formula has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, ternaries 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.
PythonVersions.audit_formula (cognitive 22) Library/Homebrew/rubocops/lines.rb:591— PythonVersions.audit_formula has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4 (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.
OSDependsOn.on_send (cognitive 22) Library/Homebrew/rubocops/os_depends_on.rb:52— OSDependsOn.on_send has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, boolean chains 8. 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.
UrlHelper.audit_url (cognitive 22) Library/Homebrew/rubocops/shared/url_helper.rb:52— UrlHelper.audit_url has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, 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.
Sandbox.deny_read_home (cognitive 22) Library/Homebrew/sandbox.rb:429— Sandbox.deny_read_home has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 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.
Trust.write_trust_store (cognitive 22) Library/Homebrew/trust.rb:479— Trust.write_trust_store has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 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.
Bump.create_pr (cognitive 21) Library/Homebrew/bump.rb:49— Bump.create_pr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, error handling 2 (3 pts) (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.
Brew.formula_to_hash (cognitive 21) Library/Homebrew/bundle/brew.rb:326— Brew.formula_to_hash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, error handling 1 (2 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.
Installer.forbidden_tap_check (cognitive 21) Library/Homebrew/cask/installer.rb:865— Installer.forbidden_tap_check has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7 (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.
Installer.forbidden_cask_and_formula_check (cognitive 21) Library/Homebrew/cask/installer.rb:906— Installer.forbidden_cask_and_formula_check has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6 (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.
Parser.generate_help_text (cognitive 21) Library/Homebrew/cli/parser.rb:558— Parser.generate_help_text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 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.
Bump.version_args_for_bump (cognitive 21) REDACTED:667— Bump.version_args_for_bump has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4 (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.
Create.create_formula (cognitive 21) Library/Homebrew/dev-cmd/create.rb:228— Create.create_formula has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (21 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.
Unbottled.run (cognitive 21) Library/Homebrew/dev-cmd/unbottled.rb:45— Unbottled.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 3 (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.
FormulaInstaller.pour_bottle? (cognitive 21) Library/Homebrew/formula_installer.rb:258— FormulaInstaller.pour_bottle? has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (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.
FormulaInstaller.build (cognitive 21) Library/Homebrew/formula_installer.rb:1196— FormulaInstaller.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 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.
FormulaInstaller.link (cognitive 21) Library/Homebrew/formula_installer.rb:1322— FormulaInstaller.link has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 4 (8 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.
Readall.valid_casks? (cognitive 21) Library/Homebrew/readall.rb:119— Readall.valid_casks? has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 2 (3 pts), ternaries 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.
Patches.patch_problems (cognitive 21) Library/Homebrew/rubocops/patches.rb:58— Patches.patch_problems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 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.
Trust.trust_name (cognitive 21) Library/Homebrew/trust.rb:378— Trust.trust_name has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, error handling 1, 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.
Flatpak.install! (cognitive 20) Library/Homebrew/bundle/extensions/flatpak.rb:236— Flatpak.install! 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.
FromPathLoader.load (cognitive 20) Library/Homebrew/cask/cask_loader.rb:167— FromPathLoader.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 3 (5 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.
DirEmitter.prepare_aliases (cognitive 20) Library/Homebrew/dev-cmd/advisory-match.rb:715— DirEmitter.prepare_aliases has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 4. 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.
Create.create_cask (cognitive 20) Library/Homebrew/dev-cmd/create.rb:93— Create.create_cask has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, ternaries 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.
WhichUpdate.update_and_save! (cognitive 20) Library/Homebrew/dev-cmd/which-update.rb:56— WhichUpdate.update_and_save! has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (2 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.
Checks.check_untrusted_taps (cognitive 20) Library/Homebrew/diagnostic.rb:984— Checks.check_untrusted_taps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, error handling 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.
Install.install_formulae (cognitive 20) Library/Homebrew/install.rb:342— Install.install_formulae has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, error handling 2 (3 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.
Keg.relocate_build_prefix (cognitive 20) Library/Homebrew/keg_relocate.rb:309— Keg.relocate_build_prefix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Patch.create (cognitive 20) Library/Homebrew/patch.rb:100— Patch.create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (3 pts) (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.
TernaryToIf.before_declaring_variable (cognitive 20) Library/Homebrew/rubocops/ternary_to_if.rb:32— TernaryToIf.before_declaring_variable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2, ternaries 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.
Curl.curl_headers (cognitive 20) Library/Homebrew/utils/curl.rb:391— Curl.curl_headers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4 (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.
API.open_rest (cognitive 20) Library/Homebrew/utils/github/api.rb:294— API.open_rest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 2 (3 pts), ternaries 2 (3 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, 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.
Match.to_brew_record (cognitive 20) Library/Homebrew/vulns/match.rb:804— Match.to_brew_record has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 3 (4 pts) (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.
Match.reconciliation_observation (cognitive 20) Library/Homebrew/vulns/match.rb:1035— Match.reconciliation_observation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 5, ternaries 1 (2 pts) (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.
OsvExport.merge_existing (cognitive 20) Library/Homebrew/vulns/osv_export.rb:112— OsvExport.merge_existing has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 9, error handling 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.
Cask.to_hash_with_variations (cognitive 19) Library/Homebrew/cask/cask.rb:639— Cask.to_hash_with_variations has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DependsOn.record_macos_requirement (cognitive 19) Library/Homebrew/cask/dsl/depends_on.rb:186— DependsOn.record_macos_requirement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 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.
Caveats.service_caveats (cognitive 19) Library/Homebrew/caveats.rb:287— Caveats.service_caveats has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8 (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.
Parser.named_args (cognitive 19) Library/Homebrew/cli/parser.rb:630— Parser.named_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7 (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.
Deps.dep_display_name (cognitive 19) REDACTED:274— Deps.dep_display_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 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.
DeprecateDisable.message (cognitive 19) Library/Homebrew/deprecate_disable.rb:76— DeprecateDisable.message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 3 (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.
Descriptions.decorate_name (cognitive 19) Library/Homebrew/descriptions.rb:100— Descriptions.decorate_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 2 (5 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.
Bottle.keg_contain? (cognitive 19) Library/Homebrew/dev-cmd/bottle.rb:254— Bottle.keg_contain? has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 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.
Bump.livecheck_result (cognitive 19) REDACTED:1036— Bump.livecheck_result has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, error handling 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.
GenerateCaskCiMatrix.generate_matrix (cognitive 19) Library/Homebrew/dev-cmd/generate-cask-ci-matrix.rb:220— GenerateCaskCiMatrix.generate_matrix has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 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.
AbstractFileDownloadStrategy.parse_basename (cognitive 19) Library/Homebrew/download_strategy/abstract_file_download_strategy.rb:63— AbstractFileDownloadStrategy.parse_basename has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
GitDownloadStrategy.env (cognitive 19) Library/Homebrew/download_strategy/git_download_strategy.rb:123— GitDownloadStrategy.env has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 8, error handling 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClassMethods.setup_preferred_gcc_libs (cognitive 19) Library/Homebrew/extend/os/linux/install.rb:73— ClassMethods.setup_preferred_gcc_libs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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.
FormulaInstaller.prelude_fetch (cognitive 19) Library/Homebrew/formula_installer.rb:317— FormulaInstaller.prelude_fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 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.
FormulaInstaller.enqueue_fetch (cognitive 19) Library/Homebrew/formula_installer.rb:1593— FormulaInstaller.enqueue_fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 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.
GitHubPackages.preupload_check (cognitive 19) Library/Homebrew/github_packages.rb:527— GitHubPackages.preupload_check has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
Attestation.check_attestation (cognitive 19) Library/Homebrew/utils/attestation.rb:13— Attestation.check_attestation has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (15 pts), if/else 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.
SPDX.string_to_license_expression (cognitive 19) Library/Homebrew/utils/spdx.rb:182— SPDX.string_to_license_expression has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Identify.registry_package_for (cognitive 19) Library/Homebrew/vulns/identify.rb:150— Identify.registry_package_for has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, match/switch 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.
Attestation.check_attestation (cognitive 18) Library/Homebrew/attestation.rb:122— Attestation.check_attestation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, error handling 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, 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.
Go.packages (cognitive 18) Library/Homebrew/bundle/extensions/go.rb:31— Go.packages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 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.
Installer.homebrew_batchable? (cognitive 18) Library/Homebrew/bundle/installer.rb:243— Installer.homebrew_batchable? has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, error handling 1, match/switch 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.
Tap.dump (cognitive 18) Library/Homebrew/bundle/tap.rb:89— Tap.dump has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3 (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.
Cleanup.cleanup_cache (cognitive 18) Library/Homebrew/cleanup.rb:741— Cleanup.cleanup_cache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (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.
Info.installed_section_lines (cognitive 18) Library/Homebrew/cmd/info.rb:813— Info.installed_section_lines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3, error handling 1 (2 pts) (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.
Completions.generate_fish_subcommand_completion (cognitive 18) Library/Homebrew/completions.rb:512— Completions.generate_fish_subcommand_completion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5 (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.
DirEmitter.terminal_intervals (cognitive 18) Library/Homebrew/dev-cmd/advisory-match.rb:902— DirEmitter.terminal_intervals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 8, error handling 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.
Contributions.parse_git_log (cognitive 18) Library/Homebrew/dev-cmd/contributions.rb:595— Contributions.parse_git_log has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 1 (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.
DispatchBuildBottle.run (cognitive 18) Library/Homebrew/dev-cmd/dispatch-build-bottle.rb:43— DispatchBuildBottle.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, error handling 1 (2 pts) (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.
Unbottled.formulae_all_installs_from_args (cognitive 18) Library/Homebrew/dev-cmd/unbottled.rb:119— Unbottled.formulae_all_installs_from_args has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, error handling 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.
BuildError.dump (cognitive 18) Library/Homebrew/exceptions.rb:663— BuildError.dump has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (18 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.
Formula.ensure_installed! (cognitive 18) Library/Homebrew/formula.rb:381— Formula.ensure_installed! has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 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.
Formulary.resolve (cognitive 18) REDACTED:419— Formulary.resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4 (nesting depth added 8). 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.
Readall.valid_tap? (cognitive 18) Library/Homebrew/readall.rb:189— Readall.valid_tap? has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResourceAuditor.audit_download_strategy (cognitive 18) Library/Homebrew/resource_auditor.rb:109— ResourceAuditor.audit_download_strategy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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.
InstallSteps.keychain_find_certificate_name (cognitive 18) Library/Homebrew/rubocops/cask/install_steps.rb:187— InstallSteps.keychain_find_certificate_name has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 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.
Sandbox.run (cognitive 18) Library/Homebrew/sandbox.rb:735— Sandbox.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 3 (4 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Service.to_systemd_unit (cognitive 18) Library/Homebrew/service.rb:675— Service.to_systemd_unit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 2 (4 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.
TapAuditor.check_renames (cognitive 18) Library/Homebrew/tap_auditor.rb:160— TapAuditor.check_renames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (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.
Brewfile.path (cognitive 17) Library/Homebrew/bundle/brewfile.rb:16— Brewfile.path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (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.
BundleVersion.nice_parts (cognitive 17) Library/Homebrew/bundle_version.rb:99— BundleVersion.nice_parts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6 (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.
Migrator.move_old_cask (cognitive 17) Library/Homebrew/cask/migrator.rb:137— Migrator.move_old_cask has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (5 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.
Parser.parse_remaining (cognitive 17) Library/Homebrew/cli/parser.rb:425— Parser.parse_remaining has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 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.
Parser.formulae (cognitive 17) Library/Homebrew/cli/parser.rb:1145— Parser.formulae has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, error handling 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.
Commands.command_options (cognitive 17) Library/Homebrew/commands.rb:266— Commands.command_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dependency.installed? (cognitive 17) Library/Homebrew/dependency.rb:70— Dependency.installed? has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, error handling 1 (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.
Contributions.maintainer_report_users (cognitive 17) Library/Homebrew/dev-cmd/contributions.rb:269— Contributions.maintainer_report_users has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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.
Contributions.maintainer_activity_report (cognitive 17) Library/Homebrew/dev-cmd/contributions.rb:726— Contributions.maintainer_activity_report has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 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.
CurlDownloadStrategy.resolve_url_basename_time_file_size (cognitive 17) Library/Homebrew/download_strategy/curl_download_strategy.rb:209— CurlDownloadStrategy.resolve_url_basename_time_file_size has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, error handling 2, ternaries 1 (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.
ErrorDuringExecution.initialize (cognitive 17) Library/Homebrew/exceptions.rb:859— ErrorDuringExecution.initialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 3 (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.
DiskUsageExtension.compute_disk_usage (cognitive 17) Library/Homebrew/extend/pathname/disk_usage_extension.rb:40— DiskUsageExtension.compute_disk_usage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (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.
FormulaCreator.write_formula! (cognitive 17) Library/Homebrew/formula_creator.rb:111— FormulaCreator.write_formula! has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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.
Formulary.load_formula (cognitive 17) REDACTED:124— Formulary.load_formula has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 2, match/switch 1 (2 pts) (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.
Livecheck.url (cognitive 17) Library/Homebrew/livecheck.rb:199— Livecheck.url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, match/switch 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.
LivecheckVersion.<=> (cognitive 17) Library/Homebrew/livecheck/livecheck_version.rb:34— LivecheckVersion.<=> has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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.
Git.preprocess_url (cognitive 17) Library/Homebrew/livecheck/strategy/git.rb:70— Git.preprocess_url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, error handling 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.
MissingFormula.tap_migration_reason (cognitive 17) Library/Homebrew/missing_formula.rb:102— MissingFormula.tap_migration_reason has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. 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.
MissingFormula.deleted_reason (cognitive 17) Library/Homebrew/missing_formula.rb:155— MissingFormula.deleted_reason has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (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.
RetryableDownload.fetch (cognitive 17) Library/Homebrew/retryable_download.rb:59— RetryableDownload.fetch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, error handling 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.
NoOverrides.on_system_stanzas (cognitive 17) Library/Homebrew/rubocops/cask/no_overrides.rb:39— NoOverrides.on_system_stanzas has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InstallSteps.add_implicit_var_base_offense (cognitive 17) Library/Homebrew/rubocops/install_steps.rb:153— InstallSteps.add_implicit_var_base_offense has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (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.
DescHelper.audit_desc (cognitive 17) Library/Homebrew/rubocops/shared/desc_helper.rb:21— DescHelper.audit_desc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. 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.
Cli.start (cognitive 17) Library/Homebrew/services/cli.rb:180— Cli.start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (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.
Cli.take_root_ownership? (cognitive 17) Library/Homebrew/services/cli.rb:389— Cli.take_root_ownership? has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 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.
SystemCommand.each_output_line (cognitive 17) Library/Homebrew/system_command.rb:459— SystemCommand.each_output_line has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (6 pts), ternaries 2 (3 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.
Trust.trust_fully_qualified_items! (cognitive 17) Library/Homebrew/trust.rb:125— Trust.trust_fully_qualified_items! has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 2, error handling 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.
UnversionedCaskChecker.guess_cask_version (cognitive 17) Library/Homebrew/unversioned_cask_checker.rb:184— UnversionedCaskChecker.guess_cask_version has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, error handling 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.
Annotation.to_s (cognitive 17) Library/Homebrew/utils/github/actions.rb:81— Annotation.to_s has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (2 pts) (nesting depth added 9). 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.
Attestation.check_core_attestation (cognitive 16) Library/Homebrew/attestation.rb:253— Attestation.check_core_attestation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 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.
InstallSubcommand.run (cognitive 16) Library/Homebrew/bundle/subcommand/install.rb:57— InstallSubcommand.run has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Auditor.audit (cognitive 16) Library/Homebrew/cask/auditor.rb:77— Auditor.audit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 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.
FromAPILoader.load_from_struct (cognitive 16) Library/Homebrew/cask/cask_loader.rb:508— FromAPILoader.load_from_struct has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, error handling 1 (2 pts) (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.
NamedArgs.warn_if_cask_conflicts (cognitive 16) Library/Homebrew/cli/named_args.rb:629— NamedArgs.warn_if_cask_conflicts has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), error handling 2 (3 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.switch (cognitive 16) Library/Homebrew/cli/parser.rb:232— Parser.switch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 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.
Doctor.run (cognitive 16) Library/Homebrew/cmd/doctor.rb:37— Doctor.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (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.
ReporterHub.dump (cognitive 16) Library/Homebrew/cmd/update_report/reporter_hub.rb:43— ReporterHub.dump has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (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.
BumpRevision.run (cognitive 16) Library/Homebrew/dev-cmd/bump-revision.rb:32— BumpRevision.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 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.
Extract.with_monkey_patch (cognitive 16) Library/Homebrew/dev-cmd/extract.rb:182— Extract.with_monkey_patch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
FormulaInstaller.fetch_bottle_tab (cognitive 16) Library/Homebrew/formula_installer.rb:1560— FormulaInstaller.fetch_bottle_tab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (5 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.
FormulaInstaller.pour (cognitive 16) Library/Homebrew/formula_installer.rb:1696— FormulaInstaller.pour has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 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.
Runner.sandbox_write_paths (cognitive 16) Library/Homebrew/install_steps.rb:947— Runner.sandbox_write_paths has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 1, match/switch 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.
HeaderMatch.versions_from_content (cognitive 16) Library/Homebrew/livecheck/strategy/header_match.rb:49— HeaderMatch.versions_from_content has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6, 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.
McpServer.tool_command_arguments (cognitive 16) REDACTED:366— McpServer.tool_command_arguments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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.
Migrator.link_newname (cognitive 16) Library/Homebrew/migrator.rb:370— Migrator.link_newname has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (7 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.
Resource.unpack (cognitive 16) Library/Homebrew/resource.rb:165— Resource.unpack has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (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.
EmptyConditionalArgument.on_send (cognitive 16) Library/Homebrew/rubocops/cask/empty_conditional_argument.rb:39— EmptyConditionalArgument.on_send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 1 (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.
HelperFunctions.string_content (cognitive 16) Library/Homebrew/rubocops/shared/helper_functions.rb:106— HelperFunctions.string_content has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 6). 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.
OnSystemConditionalsHelper.audit_on_system_blocks (cognitive 16) Library/Homebrew/rubocops/shared/on_system_conditionals_helper.rb:33— OnSystemConditionalsHelper.audit_on_system_blocks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 1 (2 pts) (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.
ShellCommands.on_send (cognitive 16) Library/Homebrew/rubocops/shell_commands.rb:74— ShellCommands.on_send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 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.
Services.dispatch (cognitive 16) Library/Homebrew/services/subcommand.rb:24— Services.dispatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (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.
Trust.infer_target (cognitive 16) Library/Homebrew/trust.rb:337— Trust.infer_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), 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.
Path.loadable_package_path? (cognitive 16) Library/Homebrew/utils/path.rb:266— Path.loadable_package_path? has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 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.
Match.range_status (cognitive 16) Library/Homebrew/vulns/match.rb:729— Match.range_status has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Scanner.build_target (cognitive 16) Library/Homebrew/vulns/scanner.rb:171— Scanner.build_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (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.
Vulnerability.non_semver_fix_available_of_type? (cognitive 16) Library/Homebrew/vulns/vulnerability.rb:429— Vulnerability.non_semver_fix_available_of_type? has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Near-duplicate member pair (53 shared lines) Library/Homebrew/livecheck/livecheck.rb:637— Library/Homebrew/livecheck/livecheck.rb:637-890 | Library/Homebrew/livecheck/livecheck.rb:915-1135 — These two members are variants of one another: 53 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) Library/Homebrew/livecheck/strategy/json.rb:109— Library/Homebrew/livecheck/strategy/json.rb:109-125 | Library/Homebrew/livecheck/strategy/page_match.rb:96-114 | Library/Homebrew/livecheck/strategy/sparkle.rb:248-267 | Library/Homebrew/livecheck/strategy/xml.rb:148-164 | Library/Homebrew/livecheck/strategy/yaml.rb:107-123 — 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.
Duplicated block (24–25 lines × 2) Library/Homebrew/cmd/pyenv-sync.rb:51— Library/Homebrew/cmd/pyenv-sync.rb:51-75 | Library/Homebrew/cmd/rbenv-sync.rb:52-75 — 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 (24 lines × 2) Library/Homebrew/livecheck/livecheck.rb:784— Library/Homebrew/livecheck/livecheck.rb:784-807 | Library/Homebrew/livecheck/livecheck.rb:1043-1066 — 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 (20 lines × 2) Library/Homebrew/livecheck/livecheck.rb:707— Library/Homebrew/livecheck/livecheck.rb:707-726 | Library/Homebrew/livecheck/livecheck.rb:956-975 — 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 (14 lines × 4) Library/Homebrew/livecheck/strategy/json.rb:112— Library/Homebrew/livecheck/strategy/json.rb:112-125 | Library/Homebrew/livecheck/strategy/page_match.rb:101-114 | Library/Homebrew/livecheck/strategy/xml.rb:151-164 | Library/Homebrew/livecheck/strategy/yaml.rb:110-123 — 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 4 call sites, so a change lands once.
Duplicated block (14 lines × 2) Library/Homebrew/reinstall/reinstall.rb:44— Library/Homebrew/reinstall/reinstall.rb:44-57 | Library/Homebrew/upgrade.rb:601-614 — 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 (13 lines × 2) Library/Homebrew/livecheck/strategy/github_latest.rb:91— Library/Homebrew/livecheck/strategy/github_latest.rb:91-103 | Library/Homebrew/livecheck/strategy/github_releases.rb:134-146 — 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 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 × 3) Library/Homebrew/cmd/nodenv-sync.rb:24— Library/Homebrew/cmd/nodenv-sync.rb:24-36 | Library/Homebrew/cmd/pyenv-sync.rb:24-35 | Library/Homebrew/cmd/rbenv-sync.rb:24-36 — 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. 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–12 lines × 2) Library/Homebrew/cmd/install.rb:367— Library/Homebrew/cmd/install.rb:367-378 | Library/Homebrew/cmd/reinstall.rb:245-255 — before extracting anything, compare `Library/Homebrew/cmd/install.rb` and `Library/Homebrew/cmd/reinstall.rb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Library/Homebrew/cmd/install.rb:367` 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 × 3) Library/Homebrew/cmd/install.rb:347— Library/Homebrew/cmd/install.rb:347-357 | Library/Homebrew/cmd/install.rb:371-381 | Library/Homebrew/cmd/reinstall.rb:232-242 — before extracting anything, compare `Library/Homebrew/cmd/install.rb` and `Library/Homebrew/cmd/reinstall.rb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Library/Homebrew/cmd/install.rb:347` 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) Library/Homebrew/livecheck/strategy/page_match.rb:97— Library/Homebrew/livecheck/strategy/page_match.rb:97-107 | Library/Homebrew/livecheck/strategy/sparkle.rb:249-260 — 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 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 × 7) Library/Homebrew/cmd/install.rb:346— Library/Homebrew/cmd/install.rb:346-355 | Library/Homebrew/cmd/install.rb:370-379 | Library/Homebrew/cmd/reinstall.rb:183-192 | Library/Homebrew/cmd/reinstall.rb:231-240 | Library/Homebrew/cmd/reinstall.rb:247-256 | Library/Homebrew/cmd/reinstall.rb:316-325 | Library/Homebrew/cmd/upgrade.rb:693-702 — before extracting anything, compare `Library/Homebrew/cmd/install.rb` and `Library/Homebrew/cmd/reinstall.rb` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) Library/Homebrew/livecheck/livecheck.rb:757— Library/Homebrew/livecheck/livecheck.rb:757-765 | Library/Homebrew/livecheck/livecheck.rb:1013-1021 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 3) Library/Homebrew/cli/named_args.rb:244— Library/Homebrew/cli/named_args.rb:244-250 | Library/Homebrew/cli/named_args.rb:259-265 | Library/Homebrew/cli/named_args.rb:274-280 — 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 `Library/Homebrew/cli/named_args.rb:244` 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 (33 lines × 2) Library/Homebrew/cask/cask_loader.rb:601— Library/Homebrew/cask/cask_loader.rb:601-633 | REDACTED:803-835 — 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 (6 lines × 2) Library/Homebrew/cask/dsl.rb:212— Library/Homebrew/cask/dsl.rb:212-217 | Library/Homebrew/cask/dsl.rb:219-224 — 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.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Duplicated predicate Library/Homebrew/cmd/missing.rb:27— `!HOMEBREW_CELLAR.exist? && !Cask::Caskroom.path.exist?` appears character-identically in 2 files — Library/Homebrew/cmd/missing.rb, Library/Homebrew/diagnostic.rb. 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 Library/Homebrew/bundle/brew_services.rb:79— `!Homebrew::Services::System.launchctl? && !Homebrew::Services::System.systemctl?` appears character-identically in 2 files — Library/Homebrew/bundle/brew_services.rb, Library/Homebrew/services/subcommand.rb. 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 Library/Homebrew/cask/installer.rb:897— `!dep_tap.allowed_by_env? && dep_tap.forbidden_by_env?` appears character-identically in 2 files — Library/Homebrew/cask/installer.rb, Library/Homebrew/formula_installer.rb. 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 Library/Homebrew/unpack_strategy/dmg.rb:182— `(status.success? && !stdout.empty?) || false` appears character-identically in 2 files — Library/Homebrew/unpack_strategy/dmg.rb, Library/Homebrew/unpack_strategy/tar.rb. 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 Library/Homebrew/extend/os/mac/development_tools.rb:32— `MacOS::Xcode.installed? || MacOS::CLT.installed?` appears character-identically in 2 files — Library/Homebrew/extend/os/mac/development_tools.rb, Library/Homebrew/extend/os/mac/system_config.rb. 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 Library/Homebrew/cask/audit.rb:1520— `SharedAudits.self_submission_for_repo_owner?(repo_owner) || !SharedAudits.commit_email_domain_match(self_submission_urls).nil?` appears character-identically in 2 files — Library/Homebrew/cask/audit.rb, Library/Homebrew/formula_auditor.rb. 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 Library/Homebrew/cask/installer.rb:866— `Tap.allowed_taps.blank? && Tap.forbidden_taps.blank?` appears character-identically in 2 files — Library/Homebrew/cask/installer.rb, Library/Homebrew/formula_installer.rb. 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 Library/Homebrew/cmd/--env.rb:45— `Utils::Shell.parent || Utils::Shell.preferred` appears character-identically in 2 files — Library/Homebrew/cmd/--env.rb, Library/Homebrew/cmd/command-not-found-init.rb. 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 Library/Homebrew/build.rb:145— `args.debug? && !Homebrew::EnvConfig.disable_debrew?` appears character-identically in 3 files — Library/Homebrew/build.rb, Library/Homebrew/postinstall.rb, Library/Homebrew/test.rb. 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 Library/Homebrew/cmd/outdated.rb:248— `args.minimum_version || args.min_version` appears character-identically in 2 files — Library/Homebrew/cmd/outdated.rb, Library/Homebrew/cmd/upgrade.rb. 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 Library/Homebrew/cmd/upgrade.rb:835— `artifact.is_a?(Cask::Artifact::Installer) && artifact.manual_install` appears character-identically in 2 files — Library/Homebrew/cmd/upgrade.rb, Library/Homebrew/dev-cmd/cask-ci.rb. 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 Library/Homebrew/cask/installer.rb:891— `dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?)` appears character-identically in 2 files — Library/Homebrew/cask/installer.rb, Library/Homebrew/formula_installer.rb. 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 Library/Homebrew/cask/upgrade.rb:240— `download_queue || Homebrew::DownloadQueue.default` appears character-identically in 2 files — Library/Homebrew/cask/upgrade.rb, Library/Homebrew/cmd/upgrade.rb. 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 Library/Homebrew/diagnostic.rb:1092— `dst.symlink? && src == Utils::Path.resolved_path(dst)` appears character-identically in 2 files — Library/Homebrew/diagnostic.rb, Library/Homebrew/utils/link.rb. 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 Library/Homebrew/tap/core_cask_tap.rb:69— `existing_path.nil? || existing_path.to_s.length < new_path.length` appears character-identically in 2 files — Library/Homebrew/tap/core_cask_tap.rb, Library/Homebrew/tap/core_tap.rb. 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 Library/Homebrew/dev-cmd/bump-python-resources-pr.rb:58— `formula.deprecated? || formula.disabled?` appears character-identically in 2 files — Library/Homebrew/dev-cmd/bump-python-resources-pr.rb, Library/Homebrew/formula_auditor.rb. 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 Library/Homebrew/cmd/info.rb:476— `formula.valid_platform? && !formula.disabled?` appears character-identically in 2 files — Library/Homebrew/cmd/info.rb, Library/Homebrew/cmd/tap-info.rb. 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 Library/Homebrew/cmd/outdated.rb:62— `minimum_version.present? && args.named.length != 1` appears character-identically in 2 files — Library/Homebrew/cmd/outdated.rb, Library/Homebrew/cmd/upgrade.rb. 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 Library/Homebrew/rubocops/install_steps_source_independence.rb:25— `parent.is_a?(RuboCop::AST::SendNode) && parent.receiver == node` appears character-identically in 2 files — Library/Homebrew/rubocops/install_steps_source_independence.rb, Library/Homebrew/rubocops/no_base64.rb. 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 Library/Homebrew/cask/artifact/generated_script.rb:32— `path.absolute? || path.each_filename.any?("..")` appears character-identically in 2 files — Library/Homebrew/cask/artifact/generated_script.rb, Library/Homebrew/cask/dsl/rename.rb. 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 Library/Homebrew/cask/dsl.rb:792— `replacement_cask.presence || replacement` appears character-identically in 2 files — Library/Homebrew/cask/dsl.rb, Library/Homebrew/formula.rb. 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 Library/Homebrew/cask/dsl.rb:791— `replacement_formula.presence || replacement` appears character-identically in 2 files — Library/Homebrew/cask/dsl.rb, Library/Homebrew/formula.rb. 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 Library/Homebrew/rubocops/public_api_cookbook.rb:81— `target_line.match(/\A(?:def\s+(?:self\.)?|attr_reader\s+:|attr_accessor\s+:)(\w+[!?]?)/) || target_line.match(/\Adelegate\s+(\w+[!?]?):/)` appears character-identically in 2 files — Library/Homebrew/rubocops/public_api_cookbook.rb, Library/Homebrew/rubocops/shared/api_annotation_helper.rb. 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:429— `throttle_rate.nil? && throttle_days.nil?` appears character-identically in 3 files — REDACTED, REDACTED, Library/Homebrew/livecheck/livecheck.rb. 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 Library/Homebrew/cmd/trust.rb:65— `type == :tap && !Tap.remote_reference?(trust_name) && Tap.fetch(trust_name).official?` appears character-identically in 2 files — Library/Homebrew/cmd/trust.rb, Library/Homebrew/cmd/untrust.rb. 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.
Classify ADR enforcement: 2019 Membership docs/governance/2019-membership.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Nomination for Mozilla Open Source Support, Track III docs/governance/2019-moss-track-iii-grant-nomination.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Project Leadership Committee Minutes 2019 docs/governance/2019-plc-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 2020 Membership docs/governance/2020-membership.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Project Leadership Committee Minutes 2020 docs/governance/2020-plc-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Annual General Meeting 2021 docs/governance/2021-agm-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Extraordinary General Meeting 2021 docs/governance/2021-egm-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 2021 Membership docs/governance/2021-membership.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Project Leadership Committee Minutes 2021 docs/governance/2021-plc-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Annual General Meeting 2022 docs/governance/2022-agm-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 2022 Membership docs/governance/2022-membership.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Annual General Meeting 2023 docs/governance/2023-agm-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: Homebrew Annual General Meeting 2024 docs/governance/2024-agm-minutes.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 23 significant file(s) lose their only recent owner: Library/Homebrew/rubocops/shared/install_steps_helper.rb, Library/Homebrew/rubocops/install_steps.rb, Library/Homebrew/rubocops/cask/install_steps.rb, Library/Homebrew/dev-cmd/benchmark.rb, Library/Homebrew/bundle/cask.rb, Library/Homebrew/install/check.rb, Library/Homebrew/utils/phase_timings.rb, Library/Homebrew/dev-cmd/generate-analytics-api.rb (+15 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 7 significant file(s) lose their only recent owner: Library/Homebrew/vulns/advisory_overrides.rb, Library/Homebrew/cask/ci/zap_check.rb, Library/Homebrew/dev-cmd/bump-python-resources-pr.rb, Library/Homebrew/vulns/history.rb, Library/Homebrew/dev-cmd/cask-ci.rb, Library/Homebrew/rubocops/cask/no_nested_os_dependency.rb, Library/Homebrew/dev-cmd/generate-bottle-ci-matrix.rb. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: Library/Homebrew/vulns/repology.rb, Library/Homebrew/vulns/cpan_sec.rb, Library/Homebrew/vulns/cvss.rb, Library/Homebrew/vulns/purl.rb. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: Library/Homebrew/rubocops/unreferenced_let.rb, Library/Homebrew/rubocops/shared/homepage_helper.rb, Library/Homebrew/dependencies_helpers.rb. Pair on, review, or document these before any departure.
Silent fallback default on parse failure Library/Homebrew/bundle/extensions/npm.rb:161— `parse_package_list` answers `[]` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 rescue or above the method, and the row stops firing.
Silent fallback default on parse failure Library/Homebrew/bundle/extensions/winget.rb:238— `parse_export` answers `[]` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 rescue or above the method, and the row stops firing.
Silent fallback default on parse failure Library/Homebrew/cask/cask_loader.rb:866— `resolve_installed_artifacts` answers `[]` when `CaskError | MethodDeprecatedError | ParserError | KeyError | ErrorDuringExecution | SystemExit` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 rescue or above the method, and the row stops firing.
Silent fallback default on parse failure Library/Homebrew/trust.rb:473— `trust_store` answers `{}` when `ENOENT | ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 rescue or above the method, and the row stops firing.
Hand-rolled JSON/XML parsing via regex Library/Homebrew/github_packages.rb:55— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex Library/Homebrew/github_packages.rb:56— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex Library/Homebrew/livecheck/strategy/hackage.rb:68— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
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 (44 single-owned of 495 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 495 of the 1018 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (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: Library/Homebrew/cask/token_generator.rb, Library/Homebrew/cask/appcast.rb, Library/Homebrew/livecheck/options.rb, Library/Homebrew/livecheck/strategy/crate.rb, Library/Homebrew/utils/github/patch_inclusion.rb, Library/Homebrew/cask/metadata.rb, Library/Homebrew/rubocops/cask/conditional_arguments_order.rb.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. The most over is `Library/Homebrew` (137442 LoC, 2832 module-visible types across 117 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
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 495 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 495 of the 1018 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: Library/Homebrew/extend/file/atomic.rb. 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.
Orphaned file Library/Homebrew/extend/file/atomic.rb: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.
Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
X5 · Nullable reference types· Ruby's type checker does not check nil everywhere · ×1
Ruby's type checker does not check nil everywhere — 985/988 of this repository's Ruby product files are checked for nil — 985 by Sorbet at `# typed: true` or above, 0 under a Steepfile target's `check` paths with diagnostics that make `Ruby::NoMethod` an error. A file at `# typed: false` (Sorbet's reading of a file with no sigil), `ignore`, outside Sorbet's input or under its `--ignore`, or Steep-checked only under `lenient`/`silent`, is one where `user.name.upcase` on a nilable `name` passes, and the first nil reaching it is a `NoMethodError: undefined method 'upcase' for nil` in production.
Outdated: html-proofer — `html-proofer` is resolved to 5.2.2 in the committed Gemfile.lock but 5.2.3 is the current release on rubygems.org, and docs/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update html-proofer` and commit the updated Gemfile.lock.
Outdated: rspec_junit_formatter — `rspec_junit_formatter` is resolved to 0.6.0 in the committed Gemfile.lock but 0.8.0 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update rspec_junit_formatter` and commit the updated Gemfile.lock.
Outdated: rubocop — `rubocop` is resolved to 1.92.0 in the committed Gemfile.lock but 1.92.1 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update rubocop` and commit the updated Gemfile.lock.
Outdated: rubocop-sorbet — `rubocop-sorbet` is resolved to 0.17.1 in the committed Gemfile.lock but 0.17.2 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update rubocop-sorbet` and commit the updated Gemfile.lock.
Outdated: rubydex — `rubydex` is resolved to 0.4.1-aarch64-linux in the committed Gemfile.lock but 0.4.2 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update rubydex` and commit the updated Gemfile.lock.
Outdated: sorbet-runtime — `sorbet-runtime` is resolved to 0.6.13571 in the committed Gemfile.lock but 0.6.13594 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update sorbet-runtime` and commit the updated Gemfile.lock.
Outdated: sorbet-static-and-runtime — `sorbet-static-and-runtime` is resolved to 0.6.13571 in the committed Gemfile.lock but 0.6.13594 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update sorbet-static-and-runtime` and commit the updated Gemfile.lock.
Outdated: spoom — `spoom` is resolved to 1.8.11 in the committed Gemfile.lock but 1.8.12 is the current release on rubygems.org, and Library/Homebrew/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update spoom` and commit the updated Gemfile.lock.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a17458-3f75-7583-b488-8b231a77eaf0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 29 · Warnings: 929 · Recommendations: 56 · Info: 8 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 25-10-2026 @ 18:35 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.