Public report of microsoft/PSRule, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 17:58 UTC · Survey ID cd_a99400c42d1442a1a035b23b328ca4a6
microsoft/PSRule
Measured 17 November 2026, 17:57 UTC, at code version 8da173a
Code coverage is not measured: Suite not runnable in-image.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
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 medium codebase: 49,487 lines of product code in 15 projects, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Performance, 52.1
Findings by how serious they are
32 critical521 serious184 minor
3 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 17:57 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
79of 79 dimensions measured by tools.
704of 737 findings point to an exact file and line, so you can open each one in the code. The other 33 concern the repository as a whole, such as missing documentation.
79dimensions across 6 lenses, read from 49,487 lines of product code in 15 projects.
microsoft/PSRule falls short of our standard for production, held back most by its Performance lens, the way the code guards its speed and its use of resources. It scores 58.7 out of 100 and is rated Adequate, and 13 of its 32 critical findings are security problems.
Performance, at 52.1, is the weakest lens and counts most in the score. The best first step is removing the blocking calls, worth about 6.4 points. Raising Performance to 70 would lift the score to about 64.3.
Five pipeline steps run downloads nobody checks. Four known security holes in the packages the code depends on can be used by attackers, and four errors are caught and ignored, so failures can go unnoticed. Checking each download against a checksum, updating the vulnerable packages and handling or logging the ignored errors would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the two pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The nine data fields that are written but never read need removing.
The product code is 49,487 lines, about €110,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Performance rose from 52.1 to 70, the lowest score rated Strong, the score would rise from 58.7 to about 64.3.
Code composition: what the lines of code are
Business logic 33%Supporting code 36%Tests 24%Generated by tools 6%Code analyzers 0%
Rebuild cost: about €110,000 · Estimate
Cost to rebuild
€35,000 to €180,000, for 587 to 1,900 hours of work, about 0.7 person-years for 1 to 2 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 59. 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
Medium: 49,487 lines of product code
Comment lines
The estimate prices 39,588 lines. Comment lines count towards the size of 49,487 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Resolve the 3 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (2), PSRule.CommandLine.csproj.
Raises the score by about 1.2 points · Low effort · Explicit Debt
3
Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with ConfigurationChangeHandler.cs, GitHelper.cs, CsvOutputWriter.cs.
Raises the score by about 1.2 points · Low effort · Explicit Debt
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 €110,000 to build again, about 0.7 person-years of work. Its weakest lens is Performance, at 52.1 (Adequate). Performance is about whether the code is written and measured with speed in mind. Because the weakest lens counts most in the score, work on Performance also moves the score most.
Based on: the rebuild estimate · the Performance grade · how much each lens counts
What to do: Start with the Performance actions in Top priorities.
If you do one thing first · First action
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants. Of all the actions in this report, it raises the score most for the work it takes: about 6.4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 254 lines over the last 90 days, which is about 1,030 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
63 modules, with 212 dependencies between them. One loop runs through 24 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 23 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.
PSRule.Badges uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Badges, while a change to PSRule.Badges can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→11 PSRule.Definitions.Conventions uses PSRule.Runtimepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.Conventions uses a type in PSRule.Runtime.
PSRule.Definitions.Conventions uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.Conventions, while a change to PSRule.Definitions.Conventions can't break PSRule.Runtime.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→28 PSRule.Definitions.Conventions uses PSRule.Definitionspart of a loop✕
Connections
18 pairs of types, where a type in PSRule.Definitions.Conventions uses a type in PSRule.Definitions.
PSRule.Definitions.Conventions uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.Conventions, while a change to PSRule.Definitions.Conventions can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→28 PSRule.Help uses PSRule.Definitionspart of a loop✕
Connections
6 pairs of types, where a type in PSRule.Help uses a type in PSRule.Definitions.
PSRule.Help uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Help, while a change to PSRule.Help can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Runtime.Binding uses PSRule.Data, so a change to PSRule.Data can break PSRule.Runtime.Binding, while a change to PSRule.Runtime.Binding can't break PSRule.Data.
Position
Below the diagonal: PSRule.Runtime.Binding uses a module listed above it, which is the healthy direction.
7→30 PSRule.Runtime.Binding uses PSRule.Configurationpart of a loop✕
Connections
5 pairs of types, where a type in PSRule.Runtime.Binding uses a type in PSRule.Configuration.
PSRule.Runtime.Binding uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Runtime.Binding, while a change to PSRule.Runtime.Binding can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→34 PSRule.Runtime.ObjectPath uses PSRulepart of a loop✕
Connections
1 pair of types, where a type in PSRule.Runtime.ObjectPath uses a type in PSRule.
PSRule.Runtime.ObjectPath uses PSRule, so a change to PSRule can break PSRule.Runtime.ObjectPath, while a change to PSRule.Runtime.ObjectPath can't break PSRule.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→11 PSRule.Runtime.Scripting uses PSRule.Runtimepart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Runtime.Scripting uses a type in PSRule.Runtime.
PSRule.Runtime.Scripting uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Runtime.Scripting, while a change to PSRule.Runtime.Scripting can't break PSRule.Runtime.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→19 PSRule.Runtime.Scripting uses PSRule.Optionspart of a loop✕
Connections
4 pairs of types, where a type in PSRule.Runtime.Scripting uses a type in PSRule.Options.
PSRule.Runtime.Scripting uses PSRule.Options, so a change to PSRule.Options can break PSRule.Runtime.Scripting, while a change to PSRule.Runtime.Scripting can't break PSRule.Options.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→28 PSRule.Runtime.Scripting uses PSRule.Definitionspart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Runtime.Scripting uses a type in PSRule.Definitions.
PSRule.Runtime.Scripting uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Runtime.Scripting, while a change to PSRule.Runtime.Scripting can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→30 PSRule.Runtime.Scripting uses PSRule.Configurationpart of a loop✕
Connections
1 pair of types, where a type in PSRule.Runtime.Scripting uses a type in PSRule.Configuration.
PSRule.Runtime.Scripting uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Runtime.Scripting, while a change to PSRule.Runtime.Scripting can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
src.vscode-ps-rule.tasks uses src.vscode-ps-rule.logger, so a change to src.vscode-ps-rule.logger can break src.vscode-ps-rule.tasks, while a change to src.vscode-ps-rule.tasks can't break src.vscode-ps-rule.logger.
Position
Below the diagonal: src.vscode-ps-rule.tasks uses a module listed above it, which is the healthy direction.
PSRule.Runtime uses PSRule.Definitions.Conventions, so a change to PSRule.Definitions.Conventions can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Definitions.Conventions.
Position
Below the diagonal: PSRule.Runtime uses a module listed above it, which is the healthy direction.
PSRule.Runtime uses PSRule.Runtime.Binding, so a change to PSRule.Runtime.Binding can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Runtime.Binding.
Position
Below the diagonal: PSRule.Runtime uses a module listed above it, which is the healthy direction.
PSRule.Runtime uses PSRule.Runtime.ObjectPath, so a change to PSRule.Runtime.ObjectPath can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Runtime.ObjectPath.
Position
Below the diagonal: PSRule.Runtime uses a module listed above it, which is the healthy direction.
PSRule.Runtime uses PSRule.Runtime.Scripting, so a change to PSRule.Runtime.Scripting can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Runtime.Scripting.
Position
Below the diagonal: PSRule.Runtime uses a module listed above it, which is the healthy direction.
11→15 PSRule.Runtime uses PSRule.Rulespart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Runtime uses a type in PSRule.Rules.
PSRule.Runtime uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Pipeline.Runs.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→18 PSRule.Runtime uses PSRule.Definitions.Rulespart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Runtime uses a type in PSRule.Definitions.Rules.
PSRule.Runtime uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Definitions.Rules.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→19 PSRule.Runtime uses PSRule.Optionspart of a loop✕
Connections
4 pairs of types, where a type in PSRule.Runtime uses a type in PSRule.Options.
PSRule.Runtime uses PSRule.Options, so a change to PSRule.Options can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Options.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→25 PSRule.Runtime uses PSRule.Pipelinepart of a loop✕
Connections
12 pairs of types, where a type in PSRule.Runtime uses a type in PSRule.Pipeline.
PSRule.Runtime uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→27 PSRule.Runtime uses PSRule.Definitions.Expressionspart of a loop✕
Connections
1 pair of types, where a type in PSRule.Runtime uses a type in PSRule.Definitions.Expressions.
PSRule.Runtime uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Definitions.Expressions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→28 PSRule.Runtime uses PSRule.Definitionspart of a loop✕
Connections
18 pairs of types, where a type in PSRule.Runtime uses a type in PSRule.Definitions.
PSRule.Runtime uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Runtime, while a change to PSRule.Runtime can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
src.vscode-ps-rule.dependencyLens uses src.vscode-ps-rule.logger, so a change to src.vscode-ps-rule.logger can break src.vscode-ps-rule.dependencyLens, while a change to src.vscode-ps-rule.dependencyLens can't break src.vscode-ps-rule.logger.
Position
Below the diagonal: src.vscode-ps-rule.dependencyLens uses a module listed above it, which is the healthy direction.
src.vscode-ps-rule.dependencyLens uses src.vscode-ps-rule.tasks, so a change to src.vscode-ps-rule.tasks can break src.vscode-ps-rule.dependencyLens, while a change to src.vscode-ps-rule.dependencyLens can't break src.vscode-ps-rule.tasks.
Position
Below the diagonal: src.vscode-ps-rule.dependencyLens uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Selectors uses PSRule.Data, so a change to PSRule.Data can break PSRule.Definitions.Selectors, while a change to PSRule.Definitions.Selectors can't break PSRule.Data.
Position
Below the diagonal: PSRule.Definitions.Selectors uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Selectors uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.Selectors, while a change to PSRule.Definitions.Selectors can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.Selectors uses a module listed above it, which is the healthy direction.
13→25 PSRule.Definitions.Selectors uses PSRule.Pipelinepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.Selectors uses a type in PSRule.Pipeline.
PSRule.Definitions.Selectors uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions.Selectors, while a change to PSRule.Definitions.Selectors can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→27 PSRule.Definitions.Selectors uses PSRule.Definitions.Expressionspart of a loop✕
Connections
6 pairs of types, where a type in PSRule.Definitions.Selectors uses a type in PSRule.Definitions.Expressions.
PSRule.Definitions.Selectors uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Definitions.Selectors, while a change to PSRule.Definitions.Selectors can't break PSRule.Definitions.Expressions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→28 PSRule.Definitions.Selectors uses PSRule.Definitionspart of a loop✕
Connections
15 pairs of types, where a type in PSRule.Definitions.Selectors uses a type in PSRule.Definitions.
PSRule.Definitions.Selectors uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.Selectors, while a change to PSRule.Definitions.Selectors can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Definitions.SuppressionGroups uses PSRule.Data, so a change to PSRule.Data can break PSRule.Definitions.SuppressionGroups, while a change to PSRule.Definitions.SuppressionGroups can't break PSRule.Data.
Position
Below the diagonal: PSRule.Definitions.SuppressionGroups uses a module listed above it, which is the healthy direction.
PSRule.Definitions.SuppressionGroups uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.SuppressionGroups, while a change to PSRule.Definitions.SuppressionGroups can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.SuppressionGroups uses a module listed above it, which is the healthy direction.
14→25 PSRule.Definitions.SuppressionGroups uses PSRule.Pipelinepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.SuppressionGroups uses a type in PSRule.Pipeline.
PSRule.Definitions.SuppressionGroups uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions.SuppressionGroups, while a change to PSRule.Definitions.SuppressionGroups can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→27 PSRule.Definitions.SuppressionGroups uses PSRule.Definitions.Expressionspart of a loop✕
Connections
5 pairs of types, where a type in PSRule.Definitions.SuppressionGroups uses a type in PSRule.Definitions.Expressions.
PSRule.Definitions.SuppressionGroups uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Definitions.SuppressionGroups, while a change to PSRule.Definitions.SuppressionGroups can't break PSRule.Definitions.Expressions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→28 PSRule.Definitions.SuppressionGroups uses PSRule.Definitionspart of a loop✕
Connections
22 pairs of types, where a type in PSRule.Definitions.SuppressionGroups uses a type in PSRule.Definitions.
PSRule.Definitions.SuppressionGroups uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.SuppressionGroups, while a change to PSRule.Definitions.SuppressionGroups can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Rules uses PSRule.Definitions.SuppressionGroups, so a change to PSRule.Definitions.SuppressionGroups can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Definitions.SuppressionGroups.
Position
Below the diagonal: PSRule.Rules uses a module listed above it, which is the healthy direction.
15→17 PSRule.Rules uses PSRule.Pipeline.Runspart of a loop✕
Connections
1 pair of types, where a type in PSRule.Rules uses a type in PSRule.Pipeline.Runs.
PSRule.Rules uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Pipeline.Runs.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→18 PSRule.Rules uses PSRule.Definitions.Rulespart of a loop✕
Connections
12 pairs of types, where a type in PSRule.Rules uses a type in PSRule.Definitions.Rules.
PSRule.Rules uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Definitions.Rules.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→27 PSRule.Rules uses PSRule.Definitions.Expressionspart of a loop✕
Connections
1 pair of types, where a type in PSRule.Rules uses a type in PSRule.Definitions.Expressions.
PSRule.Rules uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Definitions.Expressions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→28 PSRule.Rules uses PSRule.Definitionspart of a loop✕
Connections
42 pairs of types, where a type in PSRule.Rules uses a type in PSRule.Definitions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
PSRule.Rules uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→30 PSRule.Rules uses PSRule.Configurationpart of a loop✕
Connections
1 pair of types, where a type in PSRule.Rules uses a type in PSRule.Configuration.
PSRule.Rules uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Rules, while a change to PSRule.Rules can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Pipeline.Formatters uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Pipeline.Formatters, while a change to PSRule.Pipeline.Formatters can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Pipeline.Formatters uses a module listed above it, which is the healthy direction.
16→25 PSRule.Pipeline.Formatters uses PSRule.Pipelinepart of a loop✕
Connections
16 pairs of types, where a type in PSRule.Pipeline.Formatters uses a type in PSRule.Pipeline.
PSRule.Pipeline.Formatters uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Pipeline.Formatters, while a change to PSRule.Pipeline.Formatters can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→28 PSRule.Pipeline.Formatters uses PSRule.Definitionspart of a loop✕
Connections
1 pair of types, where a type in PSRule.Pipeline.Formatters uses a type in PSRule.Definitions.
PSRule.Pipeline.Formatters uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Pipeline.Formatters, while a change to PSRule.Pipeline.Formatters can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→30 PSRule.Pipeline.Formatters uses PSRule.Configurationpart of a loop✕
Connections
6 pairs of types, where a type in PSRule.Pipeline.Formatters uses a type in PSRule.Configuration.
PSRule.Pipeline.Formatters uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Pipeline.Formatters, while a change to PSRule.Pipeline.Formatters can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Pipeline.Runs uses PSRule.Data, so a change to PSRule.Data can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Data.
Position
Below the diagonal: PSRule.Pipeline.Runs uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Runs uses PSRule.Runtime.Binding, so a change to PSRule.Runtime.Binding can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Runtime.Binding.
Position
Below the diagonal: PSRule.Pipeline.Runs uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Runs uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Pipeline.Runs uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Runs uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Pipeline.Runs uses a module listed above it, which is the healthy direction.
17→18 PSRule.Pipeline.Runs uses PSRule.Definitions.Rulespart of a loop✕
Connections
5 pairs of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Definitions.Rules.
PSRule.Pipeline.Runs uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Definitions.Rules.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→19 PSRule.Pipeline.Runs uses PSRule.Optionspart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Options.
PSRule.Pipeline.Runs uses PSRule.Options, so a change to PSRule.Options can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Options.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→20 PSRule.Pipeline.Runs uses PSRule.Definitions.Baselinespart of a loop✕
Connections
1 pair of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Definitions.Baselines.
PSRule.Pipeline.Runs uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Definitions.Baselines.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→25 PSRule.Pipeline.Runs uses PSRule.Pipelinepart of a loop✕
Connections
5 pairs of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Pipeline.
PSRule.Pipeline.Runs uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→28 PSRule.Pipeline.Runs uses PSRule.Definitionspart of a loop✕
Connections
19 pairs of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Definitions.
PSRule.Pipeline.Runs uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→30 PSRule.Pipeline.Runs uses PSRule.Configurationpart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Pipeline.Runs uses a type in PSRule.Configuration.
PSRule.Pipeline.Runs uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Pipeline.Runs, while a change to PSRule.Pipeline.Runs can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Definitions.Rules uses PSRule.Data, so a change to PSRule.Data can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Data.
Position
Below the diagonal: PSRule.Definitions.Rules uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Rules uses PSRule.Help, so a change to PSRule.Help can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Help.
Position
Below the diagonal: PSRule.Definitions.Rules uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Rules uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.Rules uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Rules uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Definitions.Rules uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Rules uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Pipeline.Runs.
Position
Below the diagonal: PSRule.Definitions.Rules uses a module listed above it, which is the healthy direction.
18→27 PSRule.Definitions.Rules uses PSRule.Definitions.Expressionspart of a loop✕
Connections
4 pairs of types, where a type in PSRule.Definitions.Rules uses a type in PSRule.Definitions.Expressions.
PSRule.Definitions.Rules uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Definitions.Expressions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→28 PSRule.Definitions.Rules uses PSRule.Definitionspart of a loop✕
Connections
43 pairs of types, where a type in PSRule.Definitions.Rules uses a type in PSRule.Definitions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
PSRule.Definitions.Rules uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.Rules, while a change to PSRule.Definitions.Rules can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Options uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Options, while a change to PSRule.Options can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Options uses a module listed above it, which is the healthy direction.
19→28 PSRule.Options uses PSRule.Definitionspart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Options uses a type in PSRule.Definitions.
PSRule.Options uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Options, while a change to PSRule.Options can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Definitions.Baselines uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.Baselines, while a change to PSRule.Definitions.Baselines can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.Baselines uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Baselines uses PSRule.Options, so a change to PSRule.Options can break PSRule.Definitions.Baselines, while a change to PSRule.Definitions.Baselines can't break PSRule.Options.
Position
Below the diagonal: PSRule.Definitions.Baselines uses a module listed above it, which is the healthy direction.
20→25 PSRule.Definitions.Baselines uses PSRule.Pipelinepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.Baselines uses a type in PSRule.Pipeline.
PSRule.Definitions.Baselines uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions.Baselines, while a change to PSRule.Definitions.Baselines can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→28 PSRule.Definitions.Baselines uses PSRule.Definitionspart of a loop✕
Connections
11 pairs of types, where a type in PSRule.Definitions.Baselines uses a type in PSRule.Definitions.
PSRule.Definitions.Baselines uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.Baselines, while a change to PSRule.Definitions.Baselines can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→30 PSRule.Definitions.Baselines uses PSRule.Configurationpart of a loop✕
Connections
5 pairs of types, where a type in PSRule.Definitions.Baselines uses a type in PSRule.Configuration.
PSRule.Definitions.Baselines uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Definitions.Baselines, while a change to PSRule.Definitions.Baselines can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Definitions.ModuleConfigs uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.ModuleConfigs, while a change to PSRule.Definitions.ModuleConfigs can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.ModuleConfigs uses a module listed above it, which is the healthy direction.
PSRule.Definitions.ModuleConfigs uses PSRule.Options, so a change to PSRule.Options can break PSRule.Definitions.ModuleConfigs, while a change to PSRule.Definitions.ModuleConfigs can't break PSRule.Options.
Position
Below the diagonal: PSRule.Definitions.ModuleConfigs uses a module listed above it, which is the healthy direction.
21→25 PSRule.Definitions.ModuleConfigs uses PSRule.Pipelinepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.ModuleConfigs uses a type in PSRule.Pipeline.
PSRule.Definitions.ModuleConfigs uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions.ModuleConfigs, while a change to PSRule.Definitions.ModuleConfigs can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→28 PSRule.Definitions.ModuleConfigs uses PSRule.Definitionspart of a loop✕
Connections
16 pairs of types, where a type in PSRule.Definitions.ModuleConfigs uses a type in PSRule.Definitions.
PSRule.Definitions.ModuleConfigs uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.ModuleConfigs, while a change to PSRule.Definitions.ModuleConfigs can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
21→30 PSRule.Definitions.ModuleConfigs uses PSRule.Configurationpart of a loop✕
Connections
22 pairs of types, where a type in PSRule.Definitions.ModuleConfigs uses a type in PSRule.Configuration.
PSRule.Definitions.ModuleConfigs uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Definitions.ModuleConfigs, while a change to PSRule.Definitions.ModuleConfigs can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Emitters uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Emitters, while a change to PSRule.Emitters can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Emitters uses a module listed above it, which is the healthy direction.
PSRule.Emitters uses PSRule.Options, so a change to PSRule.Options can break PSRule.Emitters, while a change to PSRule.Emitters can't break PSRule.Options.
Position
Below the diagonal: PSRule.Emitters uses a module listed above it, which is the healthy direction.
22→25 PSRule.Emitters uses PSRule.Pipelinepart of a loop✕
Connections
3 pairs of types, where a type in PSRule.Emitters uses a type in PSRule.Pipeline.
PSRule.Emitters uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Emitters, while a change to PSRule.Emitters can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→30 PSRule.Emitters uses PSRule.Configurationpart of a loop✕
Connections
1 pair of types, where a type in PSRule.Emitters uses a type in PSRule.Configuration.
PSRule.Emitters uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Emitters, while a change to PSRule.Emitters can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Pipeline.Dependencies uses PSRule.Data, so a change to PSRule.Data can break PSRule.Pipeline.Dependencies, while a change to PSRule.Pipeline.Dependencies can't break PSRule.Data.
Position
Below the diagonal: PSRule.Pipeline.Dependencies uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Dependencies uses PSRule.Options, so a change to PSRule.Options can break PSRule.Pipeline.Dependencies, while a change to PSRule.Pipeline.Dependencies can't break PSRule.Options.
Position
Below the diagonal: PSRule.Pipeline.Dependencies uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Data, so a change to PSRule.Data can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Data.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Runtime.ObjectPath, so a change to PSRule.Runtime.ObjectPath can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Runtime.ObjectPath.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Pipeline.Runs.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
PSRule.Pipeline.Output uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Definitions.Baselines.
Position
Below the diagonal: PSRule.Pipeline.Output uses a module listed above it, which is the healthy direction.
24→25 PSRule.Pipeline.Output uses PSRule.Pipelinepart of a loop✕
Connections
37 pairs of types, where a type in PSRule.Pipeline.Output uses a type in PSRule.Pipeline. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
PSRule.Pipeline.Output uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Pipeline.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→28 PSRule.Pipeline.Output uses PSRule.Definitionspart of a loop✕
Connections
4 pairs of types, where a type in PSRule.Pipeline.Output uses a type in PSRule.Definitions.
PSRule.Pipeline.Output uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→30 PSRule.Pipeline.Output uses PSRule.Configurationpart of a loop✕
Connections
15 pairs of types, where a type in PSRule.Pipeline.Output uses a type in PSRule.Configuration.
PSRule.Pipeline.Output uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Pipeline.Output, while a change to PSRule.Pipeline.Output can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Pipeline uses PSRule.Definitions.Conventions, so a change to PSRule.Definitions.Conventions can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.Conventions.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Runtime.ObjectPath, so a change to PSRule.Runtime.ObjectPath can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Runtime.ObjectPath.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Runtime.Scripting, so a change to PSRule.Runtime.Scripting can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Runtime.Scripting.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in PSRule.Pipeline uses a type in PSRule.Runtime. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
PSRule.Pipeline uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Definitions.Selectors, so a change to PSRule.Definitions.Selectors can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.Selectors.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Definitions.SuppressionGroups, so a change to PSRule.Definitions.SuppressionGroups can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.SuppressionGroups.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Pipeline.Formatters, so a change to PSRule.Pipeline.Formatters can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Pipeline.Formatters.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Pipeline.Runs.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Options, so a change to PSRule.Options can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Options.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.Baselines.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Definitions.ModuleConfigs, so a change to PSRule.Definitions.ModuleConfigs can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.ModuleConfigs.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Emitters, so a change to PSRule.Emitters can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Emitters.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Pipeline.Dependencies, so a change to PSRule.Pipeline.Dependencies can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Pipeline.Dependencies.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
PSRule.Pipeline uses PSRule.Pipeline.Output, so a change to PSRule.Pipeline.Output can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Pipeline.Output.
Position
Below the diagonal: PSRule.Pipeline uses a module listed above it, which is the healthy direction.
25→28 PSRule.Pipeline uses PSRule.Definitionspart of a loop✕
Connections
21 pairs of types, where a type in PSRule.Pipeline uses a type in PSRule.Definitions.
PSRule.Pipeline uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→30 PSRule.Pipeline uses PSRule.Configurationpart of a loop✕
Connections
57 pairs of types, where a type in PSRule.Pipeline uses a type in PSRule.Configuration. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
PSRule.Pipeline uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Pipeline, while a change to PSRule.Pipeline can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Benchmark uses PSRule.Runtime.ObjectPath, so a change to PSRule.Runtime.ObjectPath can break PSRule.Benchmark, while a change to PSRule.Benchmark can't break PSRule.Runtime.ObjectPath.
Position
Below the diagonal: PSRule.Benchmark uses a module listed above it, which is the healthy direction.
PSRule.Benchmark uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Benchmark, while a change to PSRule.Benchmark can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.Benchmark uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Expressions uses PSRule.Data, so a change to PSRule.Data can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.Data.
Position
Below the diagonal: PSRule.Definitions.Expressions uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Expressions uses PSRule.Runtime.ObjectPath, so a change to PSRule.Runtime.ObjectPath can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.Runtime.ObjectPath.
Position
Below the diagonal: PSRule.Definitions.Expressions uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Expressions uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions.Expressions uses a module listed above it, which is the healthy direction.
PSRule.Definitions.Expressions uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.Definitions.Expressions uses a module listed above it, which is the healthy direction.
27→28 PSRule.Definitions.Expressions uses PSRule.Definitionspart of a loop✕
Connections
11 pairs of types, where a type in PSRule.Definitions.Expressions uses a type in PSRule.Definitions.
PSRule.Definitions.Expressions uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.Definitions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→34 PSRule.Definitions.Expressions uses PSRulepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Definitions.Expressions uses a type in PSRule.
PSRule.Definitions.Expressions uses PSRule, so a change to PSRule can break PSRule.Definitions.Expressions, while a change to PSRule.Definitions.Expressions can't break PSRule.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
PSRule.Definitions uses PSRule.Annotations, so a change to PSRule.Annotations can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Annotations.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Data, so a change to PSRule.Data can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Data.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Pipeline.Runs.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Options, so a change to PSRule.Options can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Options.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
PSRule.Definitions uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Definitions.Expressions.
Position
Below the diagonal: PSRule.Definitions uses a module listed above it, which is the healthy direction.
28→30 PSRule.Definitions uses PSRule.Configurationpart of a loop✕
Connections
1 pair of types, where a type in PSRule.Definitions uses a type in PSRule.Configuration.
PSRule.Definitions uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.Definitions, while a change to PSRule.Definitions can't break PSRule.Configuration.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28→34 PSRule.Definitions uses PSRulepart of a loop✕
Connections
1 pair of types, where a type in PSRule.Definitions uses a type in PSRule.
PSRule.Commands uses PSRule.Annotations, so a change to PSRule.Annotations can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Annotations.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Commands uses PSRule.Runtime.Scripting, so a change to PSRule.Runtime.Scripting can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Runtime.Scripting.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Commands uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Commands uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Commands uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Commands uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Commands, while a change to PSRule.Commands can't break PSRule.Definitions.
Position
Below the diagonal: PSRule.Commands uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Data, so a change to PSRule.Data can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Data.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Rules.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Options, so a change to PSRule.Options can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Options.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Definitions.Baselines.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
PSRule.Configuration uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Configuration, while a change to PSRule.Configuration can't break PSRule.Definitions.
Position
Below the diagonal: PSRule.Configuration uses a module listed above it, which is the healthy direction.
30→34 PSRule.Configuration uses PSRulepart of a loop✕
Connections
2 pairs of types, where a type in PSRule.Configuration uses a type in PSRule.
PSRule.Converters.Json uses PSRule.Annotations, so a change to PSRule.Annotations can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Annotations.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Json uses PSRule.Data, so a change to PSRule.Data can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Data.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Json uses PSRule.Options, so a change to PSRule.Options can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Options.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Json uses PSRule.Pipeline.Dependencies, so a change to PSRule.Pipeline.Dependencies can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Pipeline.Dependencies.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Json uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Definitions.Expressions.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Json uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Converters.Json, while a change to PSRule.Converters.Json can't break PSRule.Definitions.
Position
Below the diagonal: PSRule.Converters.Json uses a module listed above it, which is the healthy direction.
PSRule.Converters.Yaml uses PSRule.Annotations, so a change to PSRule.Annotations can break PSRule.Converters.Yaml, while a change to PSRule.Converters.Yaml can't break PSRule.Annotations.
Position
Below the diagonal: PSRule.Converters.Yaml uses a module listed above it, which is the healthy direction.
PSRule.Converters.Yaml uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule.Converters.Yaml, while a change to PSRule.Converters.Yaml can't break PSRule.Definitions.Expressions.
Position
Below the diagonal: PSRule.Converters.Yaml uses a module listed above it, which is the healthy direction.
PSRule.Converters.Yaml uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Converters.Yaml, while a change to PSRule.Converters.Yaml can't break PSRule.Definitions.
Position
Below the diagonal: PSRule.Converters.Yaml uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Annotations, so a change to PSRule.Annotations can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Annotations.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Runtime.Scripting, so a change to PSRule.Runtime.Scripting can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Runtime.Scripting.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Pipeline.Runs, so a change to PSRule.Pipeline.Runs can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Pipeline.Runs.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Definitions.Rules, so a change to PSRule.Definitions.Rules can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Definitions.Rules.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Definitions.Baselines.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule.Host uses PSRule.Definitions, so a change to PSRule.Definitions can break PSRule.Host, while a change to PSRule.Host can't break PSRule.Definitions.
Position
Below the diagonal: PSRule.Host uses a module listed above it, which is the healthy direction.
PSRule uses PSRule.Definitions.Baselines, so a change to PSRule.Definitions.Baselines can break PSRule, while a change to PSRule can't break PSRule.Definitions.Baselines.
Position
Below the diagonal: PSRule uses a module listed above it, which is the healthy direction.
PSRule uses PSRule.Definitions.Expressions, so a change to PSRule.Definitions.Expressions can break PSRule, while a change to PSRule can't break PSRule.Definitions.Expressions.
Position
Below the diagonal: PSRule uses a module listed above it, which is the healthy direction.
PSRule.CommandLine uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.CommandLine, while a change to PSRule.CommandLine can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.CommandLine uses a module listed above it, which is the healthy direction.
PSRule.CommandLine uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.CommandLine, while a change to PSRule.CommandLine can't break PSRule.Rules.
Position
Below the diagonal: PSRule.CommandLine uses a module listed above it, which is the healthy direction.
PSRule.CommandLine uses PSRule.Pipeline.Dependencies, so a change to PSRule.Pipeline.Dependencies can break PSRule.CommandLine, while a change to PSRule.CommandLine can't break PSRule.Pipeline.Dependencies.
Position
Below the diagonal: PSRule.CommandLine uses a module listed above it, which is the healthy direction.
PSRule.CommandLine uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.CommandLine, while a change to PSRule.CommandLine can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.CommandLine uses a module listed above it, which is the healthy direction.
PSRule.CommandLine uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.CommandLine, while a change to PSRule.CommandLine can't break PSRule.Configuration.
Position
Below the diagonal: PSRule.CommandLine uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Models uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.CommandLine.Models, while a change to PSRule.CommandLine.Models can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.CommandLine.Models uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Models uses PSRule.Rules, so a change to PSRule.Rules can break PSRule.CommandLine.Models, while a change to PSRule.CommandLine.Models can't break PSRule.Rules.
Position
Below the diagonal: PSRule.CommandLine.Models uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Models uses PSRule.Options, so a change to PSRule.Options can break PSRule.CommandLine.Models, while a change to PSRule.CommandLine.Models can't break PSRule.Options.
Position
Below the diagonal: PSRule.CommandLine.Models uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Models uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.CommandLine.Models, while a change to PSRule.CommandLine.Models can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.CommandLine.Models uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Models uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.CommandLine.Models, while a change to PSRule.CommandLine.Models can't break PSRule.Configuration.
Position
Below the diagonal: PSRule.CommandLine.Models uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.Data, so a change to PSRule.Data can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.Data.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.Pipeline.Dependencies, so a change to PSRule.Pipeline.Dependencies can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.Pipeline.Dependencies.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.Configuration, so a change to PSRule.Configuration can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.Configuration.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.CommandLine, so a change to PSRule.CommandLine can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.CommandLine.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.CommandLine.Commands uses PSRule.CommandLine.Models, so a change to PSRule.CommandLine.Models can break PSRule.CommandLine.Commands, while a change to PSRule.CommandLine.Commands can't break PSRule.CommandLine.Models.
Position
Below the diagonal: PSRule.CommandLine.Commands uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Handlers uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.EditorServices.Handlers, while a change to PSRule.EditorServices.Handlers can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.EditorServices.Handlers uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Handlers uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.EditorServices.Handlers, while a change to PSRule.EditorServices.Handlers can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.EditorServices.Handlers uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Handlers uses PSRule.CommandLine, so a change to PSRule.CommandLine can break PSRule.EditorServices.Handlers, while a change to PSRule.EditorServices.Handlers can't break PSRule.CommandLine.
Position
Below the diagonal: PSRule.EditorServices.Handlers uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Hosting uses PSRule.Runtime, so a change to PSRule.Runtime can break PSRule.EditorServices.Hosting, while a change to PSRule.EditorServices.Hosting can't break PSRule.Runtime.
Position
Below the diagonal: PSRule.EditorServices.Hosting uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Hosting uses PSRule.Pipeline, so a change to PSRule.Pipeline can break PSRule.EditorServices.Hosting, while a change to PSRule.EditorServices.Hosting can't break PSRule.Pipeline.
Position
Below the diagonal: PSRule.EditorServices.Hosting uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Hosting uses PSRule.CommandLine, so a change to PSRule.CommandLine can break PSRule.EditorServices.Hosting, while a change to PSRule.EditorServices.Hosting can't break PSRule.CommandLine.
Position
Below the diagonal: PSRule.EditorServices.Hosting uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Commands uses PSRule.CommandLine, so a change to PSRule.CommandLine can break PSRule.EditorServices.Commands, while a change to PSRule.EditorServices.Commands can't break PSRule.CommandLine.
Position
Below the diagonal: PSRule.EditorServices.Commands uses a module listed above it, which is the healthy direction.
PSRule.EditorServices.Commands uses PSRule.EditorServices.Hosting, so a change to PSRule.EditorServices.Hosting can break PSRule.EditorServices.Commands, while a change to PSRule.EditorServices.Commands can't break PSRule.EditorServices.Hosting.
Position
Below the diagonal: PSRule.EditorServices.Commands uses a module listed above it, which is the healthy direction.
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
17
High / Critical
A03:2025 — Software Supply Chain Failures
14
High / Critical
Roadmap
Top priorities: TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants; Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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 — 32
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 — 521
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 — 184
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 3
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 79 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 79 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, 704 of 737 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 27% of production LoC (12,899 test / 46,955 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 400 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 6 test source file(s) (.ts, .ps1, .mjs) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (14 contributor(s) across 1846 commit(s) sampled, automation and bot accounts excluded). One of them holds 96% of the history; the other 13 hold 0.3% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (46,955 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/PSRule.BuildTool/ClientContext.cs`, `src/PSRule.CommandLine/Commands/CommandResult.cs`, `src/PSRule.CommandLine/Commands/CommandResult_T.cs`, `src/PSRule.CommandLine/Console.cs`, `src/PSRule.CommandLine/Models/RunCommandOutput.cs`, … (+80 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 47 commits in the last 90 days, yet 169 of 174 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via Dockerfile (docs/scenarios/containers/dockerfile). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 reads a prose claim (a path, a setting, a variable, a route, a version, a project, an install, a bare project name in a command) only in text identified as English: the cues that tell a claim from an absence, the past, a plan or an example are an English lexicon, and on other text they would let a false claim through. Links, image targets, fenced commands with an explicit path or a package-manager script, and env-fence variables are checked in every language. 'und' is text the identifier could not name (too short, mixed script, no function words).
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. 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.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 17 further occurrence(s) are not listed individually; the score already reflects all 57.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Structured logging could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentException: Syntax node is not within syntax tree.
Repo exclusion declarations: 2 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible 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 Secret Scanning: Secret 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.
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.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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 Dockerfile (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.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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".
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.
28 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was GitHubActionsAdapter.GetArgs at 32. 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 Assert.DetectLinePrefix at 42 — 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: src/PSRule/Runtime/Assert.cs (Assert.DetectLinePrefix at 42), src/PSRule/Configuration/PSRuleOption.cs (PSRuleOption.Equals at 17), src/PSRule/Pipeline/Output/CsvOutputWriter.cs (CsvOutputWriter.GetColumnValue 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.
+ 21 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 28 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with GitHubActionsAdapter.GetArgs (cyclomatic 32), AzurePipelinesAdapter.GetArgs (cyclomatic 30), ModuleCommand.ModuleRestoreAsync (cyclomatic 26). — 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 28 together lifts Cyclomatic Complexity from 7.2 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
+ 53 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 60 bodies over 15 down to 15 or less in Cognitive Complexity — start with LanguageExpressionJsonConverter.MapProperty (cognitive 41), ModuleCommand.ModuleRestoreAsync (cognitive 41), AzurePipelinesAdapter.GetArgs (cognitive 37). — 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 60 together lifts Cognitive Complexity from 6.9 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.1 / 10Stronggated by 11 serious findings✓ 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.
Resolve the 8 TooManyMethods finding(s) in God Classes — start with LanguageExpressions.cs, Assert.cs, LegacyRunspaceContext.cs. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 3 FileTooLong finding(s) in God Classes — start with LanguageExpressions.cs, Assert.cs, SemanticVersion.cs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
80 duplicated block group(s) detected. 12.0 % of the production lines (5,648 of 46,955) are in a reported copy. A further 136 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (16 corresponding lines) · ×7src/PSRule/Runtime/Assert.cs:1022
+ 86 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Assert.cs (4), IConfigurationExtensions.cs (2), HostHelper.cs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Edited copy of a member (14 corresponding lines) finding(s) in Code Duplication — start with Assert.cs (2), BaselineJsonSerializationMapper.cs, HashSetExtensions.cs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 9 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with IConfigurationExtensions.cs (2), LegacyRunspaceContext.cs, PathExpressionBuilder.cs. — One of this dimension's main actionable groups (9 warning-level).
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.
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 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with HostContext.cs, PipelineLoggerBase.cs, Run.cs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, 1 mock references across 400 tests. Measured on the C# suite only — at least 6 test source file(s) (.ts, .ps1, .mjs) went unread, so its test quality is unmeasured and is not in these counts.
Mock framework: Moq
✓ On the Gold path — maintain.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
16 outdated, 0 vulnerable, 3 deprecated packages. Those are the NuGet packages; this repository's npm dependencies were read too — 10 outdated of 13 package(s) across 1 lockfile(s).
Resolve the 7 Deprecated finding(s) in Dependency Hygiene — start with PSRule.csproj, PSRule.Benchmark.csproj, PSRule.Tests.csproj. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (3), packages.lock.json (2). — One of this dimension's main actionable groups (5 recommendation-level).
Resolve the 4 Outdated finding(s) in Dependency Hygiene — start with PSRule.csproj (2), PSRule.BuildTool.csproj, PSRule.EditorServices.csproj. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 288 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 25 direct `PackageReference`(s), and 240 further package(s) were reached beyond them by closing the graph over the committed `packages.lock.json` — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 WriteOnlyPrivateField finding(s) in Explicit Debt — start with PipelineLogger.cs (3), SvgBuilder.cs, DateVersion.cs. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with ConfigurationChangeHandler.cs, GitHelper.cs, CsvOutputWriter.cs. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (2), PSRule.CommandLine.csproj. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D18 · Solution Shape8.6 / 10Strong✓ Tool-verified
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
15 projects, 728 source files, 59305 hand-written lines of code (46955 production / 12350 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 3435 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 14 inter-project edges.
Thin analysable surface across projects: PSRule.MSBuildsrc/PSRule.MSBuild/PSRule.MSBuild.csproj
What to do
Resolve the 1 Thin analysable surface across projects finding(s) in Solution Shape — start with PSRule.MSBuild.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F2 example. 98 document(s) read across 11 unit(s).
Documentation: no build, run or usage example · ×8src/PSRule/README.md:1
What to do
Resolve the 8 Documentation finding(s) in Documentation Quality — start with README.md (8). — One of this dimension's main actionable groups (8 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundsrc/PSRule.BuildTool/PSRule.BuildTool.csproj:3
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with PSRule.BuildTool.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 43 declarations measured against a convention their peers follow.
`GetRelatedResourceID` spells `ID` where 52 names in the project spell it `Id`src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs:369
What to do
Resolve the 1 `GetRelatedResourceID` spells `ID` where 52 names in the project spell… finding(s) in Naming Consistency — start with LanguageExpressionBuilder.cs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the names · ×8src/PSRule/Badges/BadgeType.cs:6
What to do
Resolve the 34 redundant comment finding(s) in Comment Value — start with ModuleCommand.cs (4), HotReloadTests.cs (4), OptionContextTests.cs (4). — One of this dimension's main actionable groups (34 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 15 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionsrc/PSRule/PSRule.csproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with PSRule.csproj. — 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.
Do you agree with this assessment?
D27 · Navigability8.4 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
58 % of calls cross a namespace and 4 % go through an interface, but 79 % of collaborators are co-located — so following a call takes several hops. Baseline: medium — clean/modular boundaries expected.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
17 finding(s): 0 critical, 9 high, 8 medium, 0 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 88 file(s) — `REDACTED` (lines 1–5, lines 339–345, line 366), `REDACTED`, `src/PSRule.BuildTool/ClientContext.cs` (line 8), `src/PSRule.CommandLine/Commands/CommandResult.cs` (line 9), `src/PSRule.CommandLine/Commands/CommandResult_T.cs` (line 9), … (+83 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. In 85 of those file(s) — `src/PSRule.BuildTool/ClientContext.cs`, `src/PSRule.CommandLine/Commands/CommandResult.cs`, `src/PSRule.CommandLine/Commands/CommandResult_T.cs`, `src/PSRule.CommandLine/Console.cs`, `src/PSRule.CommandLine/Models/RunCommandOutput.cs`, … (+80 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 4 Change coupling finding(s) in Change Coupling — start with NewRuleDefinitionCommand.cs, PipelineBuilderBase.cs, HostHelper.cs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with PipelineBuilder.cs. — One of this dimension's main actionable groups (1 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 the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 10 platform declaration(s) and 2 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.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
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.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`ClientContext` is a singleton (one shared instance) but mutates instance state outside any lock (LastErrorCode, _OptionPath, Option; e.g. `LastErrorCode` at line 112). — src/PSRule.CommandLine/ClientContext.cs:13
`VersionConstraint` keeps one instance of itself in the static `Any`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_Constraints; e.g. `_Constraints` at line 127). — src/PSRule.Types/Data/DateVersion.cs:64
`VersionConstraint` keeps one instance of itself in the static `Any`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_ConstraintString, _Constraints; e.g. `_ConstraintString` at line 142). — src/PSRule.Types/Data/SemanticVersion.cs:78
`BaselineOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Group; e.g. `Group` at line 89). — src/PSRule.Types/Options/BaselineOption.cs:15
`CapabilityOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Items; e.g. `Items` at line 93). — src/PSRule.Types/Options/CapabilityOption.cs:14
`ExecutionOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Break, HashAlgorithm, DuplicateResourceId, LanguageMode, InitialSessionState, NoMatchingRules; e.g. `Break` at line 375). — src/PSRule.Types/Options/ExecutionOption.cs:14
`OverrideOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Level; e.g. `Level` at line 94). — src/PSRule.Types/Options/OverrideOption.cs:16
`RunOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Category, Description; e.g. `Category` at line 109). — src/PSRule.Types/Options/RunOption.cs:15
`BindingOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (IgnoreCase, NameSeparator, TargetName, TargetType, UseQualifiedName, Field; e.g. `IgnoreCase` at line 172). — src/PSRule/Configuration/BindingOption.cs:15
`ConventionOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Include; e.g. `Include` at line 80). — src/PSRule/Configuration/ConventionOption.cs:11
`IncludeOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Path, Module; e.g. `Path` at line 95). — src/PSRule/Configuration/IncludeOption.cs:11
`InputOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (FileObjects, StringFormat, IgnoreGitPath, IgnoreObjectSource, IgnoreRepositoryCommon, IgnoreUnchangedPath; e.g. `FileObjects` at line 192). — src/PSRule/Configuration/InputOption.cs:13
`OutputOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (As, Banner, Culture, CsvDetailedColumns, Encoding, Footer; e.g. `As` at line 230). — src/PSRule/Configuration/OutputOption.cs:12
`RepositoryOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (BaseRef, Url; e.g. `BaseRef` at line 100). — src/PSRule/Configuration/RepositoryOption.cs:11
`ConstraintExpression` is not registered, but the singleton `VersionConstraint` creates it and keeps it in `_Constraints`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_ExpressionString; e.g. `_ExpressionString` at line 226). — src/PSRule.Types/Data/SemanticVersion.cs:197
`FieldMap` is not registered, but the singleton `BindingOption` creates it and keeps it in `Field`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_Map; e.g. `_Map` at line 83). — src/PSRule/Configuration/FieldMap.cs:13
`BaselineOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Baseline`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Group; e.g. `Group` at line 89). — src/PSRule.Types/Options/BaselineOption.cs:15
`CapabilityOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Capabilities`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Items; e.g. `Items` at line 93). — src/PSRule.Types/Options/CapabilityOption.cs:14
`ExecutionOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Execution`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Break, HashAlgorithm, DuplicateResourceId, LanguageMode, InitialSessionState, NoMatchingRules; e.g. `Break` at line 375). — src/PSRule.Types/Options/ExecutionOption.cs:14
`OverrideOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Override`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Level; e.g. `Level` at line 94). — src/PSRule.Types/Options/OverrideOption.cs:16
`RunOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Run`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Category, Description; e.g. `Category` at line 109). — src/PSRule.Types/Options/RunOption.cs:15
`SuppressionOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Suppression`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_Rules; e.g. `_Rules` at line 42). — src/PSRule/Configuration/SuppressionOption.cs:11
`Environment` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_CurrentCulture, _GetWorkingPath; e.g. `_CurrentCulture` at line 76). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/PSRule.Types/Environment.cs:20
`BadgeResources` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_Char, _Width; e.g. `_Char` at line 36). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/PSRule.Badges/BadgeResources.cs:13
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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.
The namespaces PSRule ↔ PSRule.Badges ↔ PSRule.Configuration ↔ PSRule.Definitions ↔ PSRule.Definitions.Baselines ↔ PSRule.Definitions.Conventions ↔ PSRule.Definitions.Expressions ↔ PSRule.Definitions.ModuleConfigs ↔ PSRule.Definitions.Rules ↔ PSRule.Definitions.Selectors ↔ PSRule.Definitions.SuppressionGroups ↔ PSRule.Emitters ↔ PSRule.Help ↔ PSRule.Options ↔ PSRule.Pipeline ↔ PSRule.Pipeline.Dependencies ↔ PSRule.Pipeline.Formatters ↔ PSRule.Pipeline.Output ↔ PSRule.Pipeline.Runs ↔ PSRule.Rules ↔ PSRule.Runtime ↔ PSRule.Runtime.Binding ↔ PSRule.Runtime.ObjectPath ↔ PSRule.Runtime.Scripting depend on each other. The lightest dependency in the cycle is PSRule → PSRule.Definitions.Expressions (PSRule.ExpressionContextExtensions → PSRule.Definitions.Expressions.IExpressionContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/PSRule/Common/ExpressionContextExtensions.cs:4
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. 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.
`IExecutionOption` declares 16 members: `Break`, `DuplicateResourceId`, `HashAlgorithm`, `LanguageMode`, `InitialSessionState`, `NoMatchingRules`, `NoValidInput`, `NoValidSources`, `RestrictScriptSource`, `SuppressionGroupExpired`, `RuleExcluded`, `RuleSuppressed`, `AliasReference`, `RuleInconclusive`, `InvariantCulture`, `UnprocessedObject`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/PSRule.Types/Options/IExecutionOption.cs:12
`ILanguageScope` declares 16 members: `Name`, `GetBindingComparer`, `Culture`, `Configure`, `TryConfigurationValue`, `WithFilter`, `GetFilter`, `AddService`, `ConfigureServices`, `GetService`, `GetEmitters`, `Bind`, `TryGetType`, `TryGetName`, `TryGetOverride`, `ToConfiguration`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/PSRule/Runtime/ILanguageScope.cs:16
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
`Handlers.RunAnalysisCommandHandler` is a read (query) handler but its body writes persistent state 3 calls away, in PathBuilder.Add — a query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica. — src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in 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.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×14) — src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:21, src/PSRule/Common/JsonConverters.cs:236, src/PSRule/Common/YamlConverters.cs:67, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
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.
`ModuleListAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:220
`ModuleRemoveAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:313
`ReadJson` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:21
`WriteJson` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Common/JsonConverters.cs:236
`WriteYaml` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Common/YamlConverters.cs:67
`Invalid` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1207
`ReadAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Emitters/ReplaceTextReader.cs:52
`ReadLineAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Emitters/ReplaceTextReader.cs:57
`ReadBlock` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Emitters/ReplaceTextReader.cs:62
`ReadBlockAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Emitters/ReplaceTextReader.cs:67
`ReadToEndAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Emitters/ReplaceTextReader.cs:72
`ConfigureBinding` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/PSRule/Pipeline/PipelineBuilderBase.cs:502
The `default:` section (reached by `Unknown`, `SuppressionGroupExpired`, `AliasReference`, `RuleExcluded`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. — src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:117
The `default:` section (reached by `Unknown`, `SuppressionGroupExpired`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. (×2) — src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:90, src/PSRule/Runtime/LegacyRunspaceContext.cs:264
`Kind` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Runtime/LegacyRunspaceContext.cs:111
`LanguageScope` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Runtime/LegacyRunspaceContext.cs:113
`GetPathExpression` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Runtime/LegacyRunspaceContext.cs:478
`CachePathExpression` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/PSRule/Runtime/LegacyRunspaceContext.cs:483
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×21) — src/PSRule.CommandLine/Commands/ModuleCommand.cs:67, src/PSRule.CommandLine/Commands/ModuleCommand.cs:110, src/PSRule.Types/Data/ITargetObjectExtensions.cs:26, …
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning9.6 / 10Exemplary✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
`PSRule.EditorServices.Handlers.RunAnalysisCommandHandler` (src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19
`PSRule.EditorServices.Handlers.UpgradeDependencyCommandHandler` (src/PSRule.EditorServices/Handlers/UpgradeDependencyCommandHandler.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule.EditorServices/Handlers/UpgradeDependencyCommandHandler.cs:18
`PSRule.EditorServices.Handlers.WorkspaceChangeWatcherHandler` (src/PSRule.EditorServices/Handlers/WorkspaceChangeWatcherHandler.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule.EditorServices/Handlers/WorkspaceChangeWatcherHandler.cs:16
`PSRule.ReadOnlyHashtable` (src/PSRule/Common/ReadOnlyHashtable.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Common/ReadOnlyHashtable.cs:11
`PSRule.Configuration.BindTargetName` (src/PSRule/Configuration/PipelineHook.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Configuration/PipelineHook.cs:9
`PSRule.Definitions.IScopeConfig` (src/PSRule/Definitions/IScopeConfig.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Definitions/IScopeConfig.cs:13
`PSRule.Definitions.ResourceObject` (src/PSRule/Definitions/ResourceObject.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Definitions/ResourceObject.cs:13
`PSRule.Definitions.ResultReason` (src/PSRule/Definitions/ResultReason.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Definitions/ResultReason.cs:11
`PSRule.Rules.RuleSummaryRecord` (src/PSRule/Rules/RuleSummaryRecord.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Rules/RuleSummaryRecord.cs:15
`PSRule.Runtime.LocalizedData` (src/PSRule/Runtime/LocalizedData.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Runtime/LocalizedData.cs:13
`PSRule.Runtime.PSRule` (src/PSRule/Runtime/PSRule.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Runtime/PSRule.cs:18
`PSRule.Runtime.Rule` (src/PSRule/Runtime/Rule.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — src/PSRule/Runtime/Rule.cs:11
What to do
Make `PSRule.EditorServices.Handlers.RunAnalysisCommandHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.EditorServices.Handlers.UpgradeDependencyCommandHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.EditorServices.Handlers.WorkspaceChangeWatcherHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.ReadOnlyHashtable` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Configuration.BindTargetName` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Definitions.IScopeConfig` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Definitions.ResourceObject` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Definitions.ResultReason` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Rules.RuleSummaryRecord` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Runtime.LocalizedData` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Runtime.PSRule` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `PSRule.Runtime.Rule` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`cp.spawnSync` in `callback to window.withProgress` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/vscode-ps-rule/commands/initLock.ts:29, src/vscode-ps-rule/commands/restore.ts:29
`fse.existsSync` in `getOptionFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/vscode-ps-rule/commands/openOptionsFile.ts:47
`fse.readdirSync` in `callback to workspacePaths.map` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/vscode-ps-rule/features/scanQuickpick/scanQuickpick.ts:80
`cp.spawnSync` in `getLanguageServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/vscode-ps-rule/utils.ts:111
Only 0/18 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
`await FindVersionAsync(module, null, targetVersion, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:75
`await InstallVersionAsync(clientContext, module, idealVersion, kv.Value.Integrity, ...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:79
`await FindVersionAsync(includeModule, moduleConstraint, null, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — src/PSRule.CommandLine/Commands/ModuleCommand.cs:117, src/PSRule.CommandLine/Commands/ModuleCommand.cs:183
`await InstallVersionAsync(clientContext, includeModule, idealVersion, null, cancell...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — src/PSRule.CommandLine/Commands/ModuleCommand.cs:121, src/PSRule.CommandLine/Commands/ModuleCommand.cs:196
`await FindVersionAsync(module, moduleConstraint, targetVersion, null, cancellationT...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:270
`await InstallVersionAsync(clientContext, module, idealVersion, null, cancellationTo...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:280
`await FindVersionAsync(kv.Key, moduleConstraint, null, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:369
`await InstallVersionAsync(clientContext, kv.Key, idealVersion, null, cancellationTo...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:379
`await GetSourceRepositoryAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — src/PSRule.CommandLine/Commands/ModuleCommand.cs:507, src/PSRule.CommandLine/Commands/ModuleCommand.cs:535
`await resource.GetAllVersionsAsync(module, cache, logger, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:512
`await resource.CopyNupkgToStreamAsync( name, packageVersion, packageStream, cache, ...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:541
`await packageReader.GetNuspecReaderAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:551
`await repository.GetResourceAsync<FindPackageByIdResource>()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:624
`await ModuleCommand.ModuleRestoreAsync(new RestoreOptions { Path = operationOptions...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/RunCommand.cs:73
`await Task.FromResult(new CommandResult<IReadOnlyCollection<InvokeResult>>(exitCode...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — src/PSRule.CommandLine/Commands/RunCommand.cs:111
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
In library code, append .ConfigureAwait(false) to every await (or set <ConfigureAwait>false</ConfigureAwait> / use the analyzer CA2007) so the library never captures the host's context.
Do you agree with this assessment?
R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
src/vscode-ps-rule/dependencyLens.ts:26 · src/vscode-ps-rule/docLens.ts:38 — the two spans are one implementation copied and then locally edited — 301 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/vscode-ps-rule/dependencyLens.ts:26
src/vscode-ps-rule/commands/initLock.ts:14 · src/vscode-ps-rule/commands/restore.ts:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/vscode-ps-rule/commands/initLock.ts:14
src/vscode-ps-rule/extension.ts:255 · src/vscode-ps-rule/extension.ts:285 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/vscode-ps-rule/extension.ts:255
src/vscode-ps-rule/commands/createOptionsFile.ts:32 · src/vscode-ps-rule/commands/createOrEditDocumentation.ts:30 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/vscode-ps-rule/commands/createOptionsFile.ts:32
src/vscode-ps-rule/utils.ts:66 · src/vscode-ps-rule/utils.ts:87 — 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. — src/vscode-ps-rule/utils.ts:66
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
upgradeDependency has cyclomatic complexity 19 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/vscode-ps-rule/commands/upgradeDependency.ts:16
getCmdTooling has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/vscode-ps-rule/runner.ts:30
createOptionsFile has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/vscode-ps-rule/commands/createOptionsFile.ts:15
getOptionFile has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/vscode-ps-rule/commands/openOptionsFile.ts:30
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage9.2 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×2) — esbuild.mjs:1, src/vscode-ps-rule/main.ts:1
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
The root package declares the lint script `zzz_lint` (`eslint . --ext .ts,.tsx`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run zzz_lint` in `.` (or the workspace's task runner). — package.json:549
Do you agree with this assessment?
R7 · Dead Code9.8 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Nothing imports this binding — it is safe to review for removal. (×2) — src/vscode-ps-rule/extension.ts:30, src/vscode-ps-rule/extension.ts:31
This private field is assigned but never read: every reference in its class is a plain assignment, no string key or test reads it by name, and the instance never escapes as a whole (so nothing serialises or destructures it). The value it holds is dead state — read it where it was meant to take effect, or remove the field and its assignments. (×2) — src/vscode-ps-rule/dependencyLens.ts:35, src/vscode-ps-rule/docLens.ts:38
Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect. — src/vscode-ps-rule/tasks.ts:61
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
src/vscode-ps-rule/client.ts → src/vscode-ps-rule/extension.ts → src/vscode-ps-rule/client.ts (one verified cycle inside a mutually-dependent group of 17 files) — src/vscode-ps-rule/client.ts:9
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself — a page handed to a consumer runs in that consumer's origin.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`https://giscus.app/client.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 2 such include(s) across the repository's markup. — overrides/partials/giscus.html:11
What to do
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
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.
`ModuleCommand.Retry` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). (×2) — src/PSRule.CommandLine/Commands/ModuleCommand.cs:598, src/PSRule.CommandLine/Commands/ModuleCommand.cs:611
What to do
Blocking `ModuleCommand.Retry` inside an `async` method
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 · 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.
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.
`Writer` is never created by `PipelineContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 214). Its declared type `IPipelineWriter` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/PSRule/Pipeline/PipelineContext.cs:214
`_Inner` is never created by `PipelineWriter` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 81). Its declared type `IPipelineWriter` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/PSRule/Pipeline/PipelineWriter.cs:81
`Condition` is never created by `RuleBlock` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 143). Its declared type `ICondition` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/PSRule/Rules/RuleBlock.cs:143
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
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 async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 18/20 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`). — src/PSRule.Tool/Adapters/AdapterBuilder.cs:22
No CancellationToken parameter — this work can't be stopped early once started. — src/PSRule.CommandLine/Commands/ModuleCommand.cs:620
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
The guard on line 22 admits `module` only when `!string.IsNullOrEmpty(module)` holds, and its other branch, line 22, reports every rejection as `ArgumentNullException` — but that branch is also reached when `!string.IsNullOrEmpty(module)` is false, and it is false of an EMPTY `module`, which is not null. So a caller who passes a present but empty argument is told it was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule.Types/Data/ModuleConstraint.cs:22
The guard on line 58 rejects `scope` and line 58 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Emitters/EmitterBuilder.cs:58
The guard on line 74 rejects `scope` and line 74 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Emitters/EmitterBuilder.cs:74
The guard on line 92 rejects `scope` and line 92 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Emitters/EmitterBuilder.cs:92
The guard on line 20 rejects `basePath` and line 20 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(basePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `basePath`, and on that path `basePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Pipeline/ChangedFilesPathFilter.cs:20
The guard on line 299 rejects `expression` and line 300 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(expression)` is true of a value that is NOT null: it is satisfied by an EMPTY `expression`, and on that path `expression` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Pipeline/PathFilter.cs:300
The guard on line 53 rejects `ruleName` and line 54 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(ruleName)` is true of a value that is NOT null: it is satisfied by an EMPTY `ruleName`, and on that path `ruleName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Rules/SuppressionFilter.cs:54
The guard on line 56 rejects `targetName` and line 57 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(targetName)` is true of a value that is NOT null: it is satisfied by an EMPTY `targetName`, and on that path `targetName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Rules/SuppressionFilter.cs:57
The guard on line 41 rejects `name` and line 41 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Runtime/LanguageScopeSetBuilder.cs:41
The guard on line 33 rejects `scope` and line 33 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — src/PSRule/Runtime/RuntimeFactoryBuilder.cs:33
What to do
Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
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 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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items 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.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×4) — src/PSRule/Common/GitHelper.cs:268, src/PSRule/Pipeline/Output/CsvOutputWriter.cs:204, src/PSRule/Runtime/ObjectHelper.cs:238, …
What to do
Swallowed exception (empty catch)
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 nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `result`: line 237 writes `result?.Output`, which says `result` can be null, but line 228 then dereferences it directly as `result.Baseline` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `result` truly cannot be null here, the `?.` is misleading. Settle it one way — test `result` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/PSRule/Configuration/PSRuleOption.cs:228
This method contradicts itself about `context`: line 38 writes `context?.Pipeline`, which says `context` can be null, but line 34 then dereferences it directly as `context.Pipeline` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `context` truly cannot be null here, the `?.` is misleading. Settle it one way — test `context` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/PSRule/Host/HostHelper.cs:34
This method contradicts itself about `resourceIssue`: line 87 writes `resourceIssue?.`, which says `resourceIssue` can be null, but line 73 then dereferences it directly as `resourceIssue.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `resourceIssue` truly cannot be null here, the `?.` is misleading. Settle it one way — test `resourceIssue` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:73
This method contradicts itself about `k2`: line 76 assigns it with `as SuppressionKey`, which hands back null rather than throwing when the value is not a `SuppressionKey`, but line 77 then dereferences it directly as `k2._HashCode` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `k2` once before the first use and handle the null case, or cast with `(SuppressionKey)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/PSRule/Rules/SuppressionFilter.cs:77
This method contradicts itself about `issue`: line 261 writes `issue?.`, which says `issue` can be null, but line 247 then dereferences it directly as `issue.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `issue` truly cannot be null here, the `?.` is misleading. Settle it one way — test `issue` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/PSRule/Runtime/LegacyRunspaceContext.cs:247
6/8 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
~0.5 `!` suppressions per 1k syntax nodes — 94 suppression(s) across the 201978 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 47 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence) 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 85 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
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.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (4 CQRS handler(s))
ED5 Idempotency — 2 mutating command handler(s)/consumer(s) detected and 2 handler method(s) walked, but no persistent write was recognised in any of them — idempotency not assessed
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — Structured logging could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
WriteOnlyPrivateField src/PSRule.Badges/SvgBuilder.cs:18— private int _BorderPadding — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule.Types/Data/DateVersion.cs:67— private string _Value — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Definitions/DependencyGraphBuilder.cs:18— private bool _IncludeDisabled — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Definitions/Expressions/ExpressionInfo.cs:8— private string _Path — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Pipeline/OptionContextBuilder.cs:27— private List<string> _ConventionOrder — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Pipeline/PipelineContext.cs:37— private LanguageMode _LanguageMode — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Pipeline/PipelineLogger.cs:27— private bool _LogError — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Pipeline/PipelineLogger.cs:28— private bool _LogWarning — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/PSRule/Pipeline/PipelineLogger.cs:30— private bool _LogInformation — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
EmptyCatchBlock src/PSRule.EditorServices/Handlers/ConfigurationChangeHandler.cs:116— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/PSRule/Common/GitHelper.cs:268— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/PSRule/Pipeline/Output/CsvOutputWriter.cs:204— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/PSRule/Runtime/ObjectHelper.cs:238— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
NoWarnInCsproj src/PSRule.CommandLine/PSRule.CommandLine.csproj:14— NU5104 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj src/Directory.Build.props:25— IDE0250 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/Directory.Build.props:25— IDE0251 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
Namespace dependency cycle src/PSRule/Common/ExpressionContextExtensions.cs:4— The namespaces PSRule ↔ PSRule.Badges ↔ PSRule.Configuration ↔ PSRule.Definitions ↔ PSRule.Definitions.Baselines ↔ PSRule.Definitions.Conventions ↔ PSRule.Definitions.Expressions ↔ PSRule.Definitions.ModuleConfigs ↔ PSRule.Definitions.Rules ↔ PSRule.Definitions.Selectors ↔ PSRule.Definitions.SuppressionGroups ↔ PSRule.Emitters ↔ PSRule.Help ↔ PSRule.Options ↔ PSRule.Pipeline ↔ PSRule.Pipeline.Dependencies ↔ PSRule.Pipeline.Formatters ↔ PSRule.Pipeline.Output ↔ PSRule.Pipeline.Runs ↔ PSRule.Rules ↔ PSRule.Runtime ↔ PSRule.Runtime.Binding ↔ PSRule.Runtime.ObjectPath ↔ PSRule.Runtime.Scripting depend on each other. The lightest dependency in the cycle is PSRule → PSRule.Definitions.Expressions (PSRule.ExpressionContextExtensions → PSRule.Definitions.Expressions.IExpressionContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
AX9 · CQS / query purity· Query handler writes persistent state 3 calls away, in PathBuilder.Add · ×1
Query handler writes persistent state 3 calls away, in PathBuilder.Add: Handlers.RunAnalysisCommandHandler src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19— `Handlers.RunAnalysisCommandHandler` is a read (query) handler but its body writes persistent state 3 calls away, in PathBuilder.Add — a query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica.
Dead code: CaseInsensitiveDictionaryConverter src/PSRule/Common/JsonConverters.cs:518— NamedType CaseInsensitiveDictionaryConverter — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: TryValidateResourceAnnotation src/PSRule/Common/ResourceExtensions.cs:11— Method TryValidateResourceAnnotation — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: WarnPropertyObsolete src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:17— Method WarnPropertyObsolete — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: WarnDeprecatedOption src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:29— Method WarnDeprecatedOption — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: RequireAnnotation src/PSRule/Definitions/AnnotatedExtensions.cs:8— Method RequireAnnotation — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: FunctionReader src/PSRule/Definitions/Expressions/FunctionReader.cs:6— NamedType FunctionReader — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ArgumentsOutOfRange src/PSRule/Definitions/Expressions/Functions.cs:324— Method ArgumentsOutOfRange — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ArgumentFormatInvalid src/PSRule/Definitions/Expressions/Functions.cs:333— Method ArgumentFormatInvalid — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ArgumentInvalidInteger src/PSRule/Definitions/Expressions/Functions.cs:341— Method ArgumentInvalidInteger — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ArgumentInvalidBoolean src/PSRule/Definitions/Expressions/Functions.cs:349— Method ArgumentInvalidBoolean — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ArgumentInvalidString src/PSRule/Definitions/Expressions/Functions.cs:357— Method ArgumentInvalidString — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ResourceBuilder src/PSRule/Definitions/ResourceBuilder.cs:14— NamedType ResourceBuilder — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: MetadataLexer src/PSRule/Help/MetadataLexer.cs:6— NamedType MetadataLexer — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GetPSResources src/PSRule/Host/HostHelper.cs:82— Method GetPSResources — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ExecutionScope src/PSRule/Pipeline/ExecutionScope.cs:6— NamedType ExecutionScope — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ErrorPreference src/PSRule/Pipeline/PipelineContext.cs:25— Field ErrorPreference — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: WarningPreference src/PSRule/Pipeline/PipelineContext.cs:26— Field WarningPreference — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: VerbosePreference src/PSRule/Pipeline/PipelineContext.cs:27— Field VerbosePreference — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: DebugPreference src/PSRule/Pipeline/PipelineContext.cs:28— Field DebugPreference — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: PipelineLogger src/PSRule/Pipeline/PipelineLogger.cs:9— NamedType PipelineLogger — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: UseExecutionContext src/PSRule/Pipeline/PipelineLogger.cs:43— Method UseExecutionContext — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: TryBaselineRef src/PSRule/Pipeline/ResourceCache.cs:166— Method TryBaselineRef — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: RunRuleGraphBuilder src/PSRule/Pipeline/Runs/RunRuleGraphBuilder.cs:12— NamedType RunRuleGraphBuilder — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GetFiltered src/PSRule/Pipeline/Runs/RunRuleGraphBuilder.cs:18— Method GetFiltered — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: SourceScope src/PSRule/Pipeline/SourceScope.cs:11— NamedType SourceScope — Roslyn's SymbolFinder walked every project the solution loads, including PSRule, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Stateful shared instance: VersionConstraint src/PSRule.Types/Data/DateVersion.cs:64— `VersionConstraint` keeps one instance of itself in the static `Any`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_Constraints; e.g. `_Constraints` at line 127).
Stateful shared instance: VersionConstraint src/PSRule.Types/Data/SemanticVersion.cs:78— `VersionConstraint` keeps one instance of itself in the static `Any`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_ConstraintString, _Constraints; e.g. `_ConstraintString` at line 142).
Stateful shared instance: BaselineOption src/PSRule.Types/Options/BaselineOption.cs:15— `BaselineOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Group; e.g. `Group` at line 89).
Stateful shared instance: CapabilityOption src/PSRule.Types/Options/CapabilityOption.cs:14— `CapabilityOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Items; e.g. `Items` at line 93).
Stateful shared instance: ExecutionOption src/PSRule.Types/Options/ExecutionOption.cs:14— `ExecutionOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Break, HashAlgorithm, DuplicateResourceId, LanguageMode, InitialSessionState, NoMatchingRules; e.g. `Break` at line 375).
Stateful shared instance: OverrideOption src/PSRule.Types/Options/OverrideOption.cs:16— `OverrideOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Level; e.g. `Level` at line 94).
Stateful shared instance: RunOption src/PSRule.Types/Options/RunOption.cs:15— `RunOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Category, Description; e.g. `Category` at line 109).
Stateful shared instance: BindingOption src/PSRule/Configuration/BindingOption.cs:15— `BindingOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (IgnoreCase, NameSeparator, TargetName, TargetType, UseQualifiedName, Field; e.g. `IgnoreCase` at line 172).
Stateful shared instance: ConventionOption src/PSRule/Configuration/ConventionOption.cs:11— `ConventionOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Include; e.g. `Include` at line 80).
Stateful shared instance: IncludeOption src/PSRule/Configuration/IncludeOption.cs:11— `IncludeOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Path, Module; e.g. `Path` at line 95).
Stateful shared instance: InputOption src/PSRule/Configuration/InputOption.cs:13— `InputOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (FileObjects, StringFormat, IgnoreGitPath, IgnoreObjectSource, IgnoreRepositoryCommon, IgnoreUnchangedPath; e.g. `FileObjects` at line 192).
Stateful shared instance: OutputOption src/PSRule/Configuration/OutputOption.cs:12— `OutputOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (As, Banner, Culture, CsvDetailedColumns, Encoding, Footer; e.g. `As` at line 230).
Stateful shared instance: RepositoryOption src/PSRule/Configuration/RepositoryOption.cs:11— `RepositoryOption` keeps one instance of itself in the static `Default`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (BaseRef, Url; e.g. `BaseRef` at line 100).
Stateful shared instance: ConstraintExpression src/PSRule.Types/Data/SemanticVersion.cs:197— `ConstraintExpression` is not registered, but the singleton `VersionConstraint` creates it and keeps it in `_Constraints`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_ExpressionString; e.g. `_ExpressionString` at line 226).
Stateful shared instance: FieldMap src/PSRule/Configuration/FieldMap.cs:13— `FieldMap` is not registered, but the singleton `BindingOption` creates it and keeps it in `Field`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_Map; e.g. `_Map` at line 83).
Stateful shared instance: BaselineOption src/PSRule.Types/Options/BaselineOption.cs:15— `BaselineOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Baseline`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Group; e.g. `Group` at line 89).
Stateful shared instance: CapabilityOption src/PSRule.Types/Options/CapabilityOption.cs:14— `CapabilityOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Capabilities`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Items; e.g. `Items` at line 93).
Stateful shared instance: ExecutionOption src/PSRule.Types/Options/ExecutionOption.cs:14— `ExecutionOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Execution`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Break, HashAlgorithm, DuplicateResourceId, LanguageMode, InitialSessionState, NoMatchingRules; e.g. `Break` at line 375).
Stateful shared instance: OverrideOption src/PSRule.Types/Options/OverrideOption.cs:16— `OverrideOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Override`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Level; e.g. `Level` at line 94).
Stateful shared instance: RunOption src/PSRule.Types/Options/RunOption.cs:15— `RunOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Run`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Category, Description; e.g. `Category` at line 109).
Stateful shared instance: SuppressionOption src/PSRule/Configuration/SuppressionOption.cs:11— `SuppressionOption` is not registered, but the singleton `PSRuleOption` creates it and keeps it in `Suppression`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_Rules; e.g. `_Rules` at line 42).
Awaits without ConfigureAwait(false) — Only 0/18 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:75— `await FindVersionAsync(module, null, targetVersion, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:79— `await InstallVersionAsync(clientContext, module, idealVersion, kv.Value.Integrity, ...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:117— `await FindVersionAsync(includeModule, moduleConstraint, null, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:121— `await InstallVersionAsync(clientContext, includeModule, idealVersion, null, cancell...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:183— `await FindVersionAsync(includeModule, moduleConstraint, null, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:196— `await InstallVersionAsync(clientContext, includeModule, idealVersion, null, cancell...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:270— `await FindVersionAsync(module, moduleConstraint, targetVersion, null, cancellationT...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:280— `await InstallVersionAsync(clientContext, module, idealVersion, null, cancellationTo...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:369— `await FindVersionAsync(kv.Key, moduleConstraint, null, null, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:379— `await InstallVersionAsync(clientContext, kv.Key, idealVersion, null, cancellationTo...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:507— `await GetSourceRepositoryAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:512— `await resource.GetAllVersionsAsync(module, cache, logger, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:535— `await GetSourceRepositoryAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:541— `await resource.CopyNupkgToStreamAsync( name, packageVersion, packageStream, cache, ...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:551— `await packageReader.GetNuspecReaderAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/ModuleCommand.cs:624— `await repository.GetResourceAsync<FindPackageByIdResource>()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/RunCommand.cs:73— `await ModuleCommand.ModuleRestoreAsync(new RestoreOptions { Path = operationOptions...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) src/PSRule.CommandLine/Commands/RunCommand.cs:111— `await Task.FromResult(new CommandResult<IReadOnlyCollection<InvokeResult>>(exitCode...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Unfinished stub — throws NotImplementedException src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:21— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/JsonConverters.cs:236— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/YamlConverters.cs:67— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/YamlConverters.cs:406— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/YamlConverters.cs:461— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:52— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:57— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:62— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:67— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:72— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:111— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:113— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:478— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:483— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
TodoComment src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1339— // TODO: Propagate path — 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 src/PSRule/Help/MarkdownReader.cs:382— // TODO: Looks like error, double check, will position be lost — 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 src/PSRule/Host/HostHelper.cs:178— // TODO: Add scope wrapping for discovery. — 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 src/PSRule/Host/HostHelper.cs:249— // TODO: Add scope wrapping for discovery. — 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 src/PSRule/Host/HostHelper.cs:322— // TODO: Add scope wrapping for discovery. — 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 src/PSRule/Host/HostHelper.cs:433— // TODO: Exit scope — 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 src/PSRule/Pipeline/GetTargetPipeline.cs:23— // TODO: Temporary workaround to cast interface — 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 src/PSRule/Pipeline/InvokeRulePipeline.cs:75— // TODO: Temporary workaround to cast interface — 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 src/PSRule/Pipeline/PipelineWriterExtensions.cs:57— // TODO: Fix event id 0 — 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 src/PSRule/Pipeline/Runs/RunCollectionBuilder.cs:183— // TODO: We should provide a more flexible delegate to configure this. — 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 src/PSRule/Pipeline/SourcePipelineBuilder.cs:160— // TODO: Import dependencies — 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 src/PSRule/Runtime/LegacyRunspaceContext.cs:400— // TODO: Look at scope caching, and a scope stack. — 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 tests/PSRule.Tests/Pipeline/ConventionTests.cs:89— // TODO: Check that configuration that is in a run is also accessible within a begin block. — 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.
Unfinished stub — throws NotImplementedException src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:21— `ReadJson` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/JsonConverters.cs:236— `WriteJson` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Common/YamlConverters.cs:67— `WriteYaml` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:52— `ReadAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:57— `ReadLineAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:62— `ReadBlock` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:67— `ReadBlockAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Emitters/ReplaceTextReader.cs:72— `ReadToEndAsync` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:111— `Kind` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:113— `LanguageScope` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:478— `GetPathExpression` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:483— `CachePathExpression` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Duplicated block (8 lines × 2) src/PSRule/Host/HostHelper.cs:293— src/PSRule/Host/HostHelper.cs:293-300 | src/PSRule/Host/HostHelper.cs:364-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Host/HostHelper.cs:374` calls `TryConsume` and `src/PSRule/Host/HostHelper.cs:301` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PSRule.Types/Converters/TypeConverter.cs:101— src/PSRule.Types/Converters/TypeConverter.cs:101-108 | src/PSRule/Common/ExpressionHelpers.cs:242-249 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.Types/Converters/TypeConverter.cs:101` 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 (8 lines × 2) src/PSRule/Definitions/Expressions/Functions.cs:259— src/PSRule/Definitions/Expressions/Functions.cs:259-266 | src/PSRule/Definitions/Expressions/Functions.cs:278-285 — 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 `src/PSRule/Definitions/Expressions/Functions.cs:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/PSRule/Runtime/Assert.cs:453— src/PSRule/Runtime/Assert.cs:453-460 | src/PSRule/Runtime/Assert.cs:487-494 — 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 `src/PSRule/Runtime/Assert.cs:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Runtime/Assert.cs:495` calls `Fail`, `FromPath` and `src/PSRule/Runtime/Assert.cs:461` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PSRule/Runtime/Assert.cs:515— src/PSRule/Runtime/Assert.cs:515-522 | src/PSRule/Runtime/Assert.cs:549-556 — 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 `src/PSRule/Runtime/Assert.cs:515` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Runtime/Assert.cs:557` calls `Fail`, `FromPath` and `src/PSRule/Runtime/Assert.cs:523` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PSRule/Runtime/Assert.cs:577— src/PSRule/Runtime/Assert.cs:577-584 | src/PSRule/Runtime/Assert.cs:611-618 — 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 `src/PSRule/Runtime/Assert.cs:577` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Runtime/Assert.cs:619` calls `Fail`, `FromPath` and `src/PSRule/Runtime/Assert.cs:585` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PSRule/Runtime/Assert.cs:1218— src/PSRule/Runtime/Assert.cs:1218-1225 | src/PSRule/Runtime/Assert.cs:1245-1252 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Runtime/Assert.cs:1226` calls `Fail` and `src/PSRule/Runtime/Assert.cs:1253` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:108— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:108-115 | src/PSRule/Runtime/Configuration.cs:111-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:119— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:119-126 | src/PSRule/Runtime/Configuration.cs:122-129 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) src/PSRule.CommandLine/ClientHost.cs:45— src/PSRule.CommandLine/ClientHost.cs:45-52 | src/PSRule.EditorServices/Hosting/ServerHostContext.cs:34-41 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X20 · Mistyped argument guard· Argument guard throws the exception its own condition disproves · ×10
Argument guard throws the exception its own condition disproves src/PSRule.Types/Data/ModuleConstraint.cs:22— The guard on line 22 admits `module` only when `!string.IsNullOrEmpty(module)` holds, and its other branch, line 22, reports every rejection as `ArgumentNullException` — but that branch is also reached when `!string.IsNullOrEmpty(module)` is false, and it is false of an EMPTY `module`, which is not null. So a caller who passes a present but empty argument is told it was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Emitters/EmitterBuilder.cs:58— The guard on line 58 rejects `scope` and line 58 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Emitters/EmitterBuilder.cs:74— The guard on line 74 rejects `scope` and line 74 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Emitters/EmitterBuilder.cs:92— The guard on line 92 rejects `scope` and line 92 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Pipeline/ChangedFilesPathFilter.cs:20— The guard on line 20 rejects `basePath` and line 20 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(basePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `basePath`, and on that path `basePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Pipeline/PathFilter.cs:300— The guard on line 299 rejects `expression` and line 300 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(expression)` is true of a value that is NOT null: it is satisfied by an EMPTY `expression`, and on that path `expression` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Rules/SuppressionFilter.cs:54— The guard on line 53 rejects `ruleName` and line 54 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(ruleName)` is true of a value that is NOT null: it is satisfied by an EMPTY `ruleName`, and on that path `ruleName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Rules/SuppressionFilter.cs:57— The guard on line 56 rejects `targetName` and line 57 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(targetName)` is true of a value that is NOT null: it is satisfied by an EMPTY `targetName`, and on that path `targetName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Runtime/LanguageScopeSetBuilder.cs:41— The guard on line 41 rejects `name` and line 41 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/PSRule/Runtime/RuntimeFactoryBuilder.cs:33— The guard on line 33 rejects `scope` and line 33 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(scope)` is true of a value that is NOT null: it is satisfied by an EMPTY `scope`, and on that path `scope` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×9
Edited copy of a member (14 corresponding lines) src/PSRule/Common/BaselineJsonSerializationMapper.cs:145— src/PSRule/Common/BaselineJsonSerializationMapper.cs:145-158 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:147-160 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Runtime/Assert.cs:850— src/PSRule/Runtime/Assert.cs:850-863 | src/PSRule/Runtime/Assert.cs:874-887 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Common/HashSetExtensions.cs:65— src/PSRule/Common/HashSetExtensions.cs:65-78 | src/PSRule/Common/HashSetExtensions.cs:81-94 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Pipeline/Output/SarifBuilder.cs:179— src/PSRule/Pipeline/Output/SarifBuilder.cs:179-192 | src/PSRule/Pipeline/Output/SarifBuilder.cs:198-211 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Common/ExpressionHelpers.cs:558— src/PSRule/Common/ExpressionHelpers.cs:558-571 | src/PSRule/Common/ExpressionHelpers.cs:574-587 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Runtime/Assert.cs:139— src/PSRule/Runtime/Assert.cs:139-152 | src/PSRule/Runtime/Assert.cs:158-173 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:592— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:592-605 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:608-621 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:554— src/PSRule.Types/Data/DateVersion.cs:554-567 | src/PSRule.Types/Data/SemanticVersion.cs:774-791 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/PSRule/Commands/AssertAllOfCommand.cs:19— src/PSRule/Commands/AssertAllOfCommand.cs:19-32 | src/PSRule/Commands/AssertAnyOfCommand.cs:19-32 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×9
Edited copy of a member (9 corresponding lines) src/PSRule/Runtime/LegacyRunspaceContext.cs:146— src/PSRule/Runtime/LegacyRunspaceContext.cs:146-154 | src/PSRule/Runtime/LegacyRunspaceContext.cs:157-165 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:115— src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:115-123 | src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:173-183 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule/Pipeline/CommandLineBuilder.cs:29— src/PSRule/Pipeline/CommandLineBuilder.cs:29-37 | src/PSRule/Pipeline/CommandLineBuilder.cs:52-60 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule/Emitters/JsonEmitter.cs:32— src/PSRule/Emitters/JsonEmitter.cs:32-44 | src/PSRule/Emitters/YamlEmitter.cs:35-43 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule/Common/BaselineJsonSerializationMapper.cs:178— src/PSRule/Common/BaselineJsonSerializationMapper.cs:178-186 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:180-188 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:299— src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:299-310 | src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs:275-283 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule.CommandLine/ClientHost.cs:44— src/PSRule.CommandLine/ClientHost.cs:44-52 | src/PSRule.EditorServices/Hosting/ServerHostContext.cs:33-41 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:107— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:107-115 | src/PSRule/Runtime/Configuration.cs:110-118 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:118— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:118-126 | src/PSRule/Runtime/Configuration.cs:121-129 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 2) src/PSRule/Runtime/Assert.cs:630— src/PSRule/Runtime/Assert.cs:630-635 | src/PSRule/Runtime/Assert.cs:648-653 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) src/PSRule/Runtime/Assert.cs:1072— src/PSRule/Runtime/Assert.cs:1072-1077 | src/PSRule/Runtime/Assert.cs:1088-1093 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:379— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:379-384 | src/PSRule/Runtime/Assert.cs:1056-1061 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) src/PSRule/Runtime/Assert.cs:1151— src/PSRule/Runtime/Assert.cs:1151-1156 | src/PSRule/Runtime/Assert.cs:1279-1284 — 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 `src/PSRule/Runtime/Assert.cs:1151` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/PSRule/Runtime/Assert.cs:1279` calls `GuardNullParam`, `nameof` and `src/PSRule/Runtime/Assert.cs:1151` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) src/PSRule.CommandLine/ClientContextExtensions.cs:13— src/PSRule.CommandLine/ClientContextExtensions.cs:13-18 | src/PSRule.CommandLine/ClientContextExtensions.cs:22-27 — 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 `src/PSRule.CommandLine/ClientContextExtensions.cs:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) src/PSRule.Types/Data/DateVersion.cs:581— src/PSRule.Types/Data/DateVersion.cs:581-586 | src/PSRule.Types/Data/SemanticVersion.cs:805-810 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/PSRule.Types/Data/DateVersion.cs:732— src/PSRule.Types/Data/DateVersion.cs:732-737 | src/PSRule.Types/Data/SemanticVersion.cs:959-964 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/PSRule/Emitters/MarkdownEmitter.cs:46— src/PSRule/Emitters/MarkdownEmitter.cs:46-51 | src/PSRule/Emitters/PowerShellDataEmitter.cs:45-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/PSRule/Pipeline/Runs/Run.cs:81— src/PSRule/Pipeline/Runs/Run.cs:81-86 | src/PSRule/Runtime/LanguageScope.cs:85-90 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
TooManyMethods: LanguageExpressions src/PSRule/Definitions/Expressions/LanguageExpressions.cs— TooManyMethods — 924 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: Assert src/PSRule/Runtime/Assert.cs— TooManyMethods — 736 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: LegacyRunspaceContext src/PSRule/Runtime/LegacyRunspaceContext.cs— TooManyMethods — 414 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: AssertFormatterBase src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs— TooManyMethods — 364 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 30 methods; this is 22 over it, 1.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: ExpressionHelpers src/PSRule/Common/ExpressionHelpers.cs— TooManyMethods — 318 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: SourcePipelineBuilder src/PSRule/Pipeline/SourcePipelineBuilder.cs— TooManyMethods — 281 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; this is 9 over it, 1.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: PSRule src/PSRule.Benchmark/PSRule.cs— TooManyMethods — 190 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: PipelineBuilderBase src/PSRule/Pipeline/PipelineBuilderBase.cs— TooManyMethods — 300 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.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.
Deprecated: xunit tests/PSRule.Tests/PSRule.Tests.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/PSRule.Tool.Tests/PSRule.Tool.Tests.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/PSRule.CommandLine.Tests/PSRule.CommandLine.Tests.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/PSRule.Types.Tests/PSRule.Types.Tests.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/PSRule.EditorServices.Tests/PSRule.EditorServices.Tests.csproj:18— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×7
Edited copy of a member (16 corresponding lines) src/PSRule/Runtime/Assert.cs:1022— src/PSRule/Runtime/Assert.cs:1022-1037 | src/PSRule/Runtime/Assert.cs:1046-1064 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule/Emitters/PowerShellDataEmitter.cs:60— src/PSRule/Emitters/PowerShellDataEmitter.cs:60-75 | src/PSRule/Pipeline/PipelineReciever.cs:156-175 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule/Common/BaselineJsonSerializationMapper.cs:206— src/PSRule/Common/BaselineJsonSerializationMapper.cs:206-221 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:208-223 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:281— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:281-296 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:299-319 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule/Common/PSObjectExtensions.cs:203— src/PSRule/Common/PSObjectExtensions.cs:203-218 | src/PSRule/Common/PSObjectExtensions.cs:226-241 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule/Pipeline/Output/CsvOutputWriter.cs:84— src/PSRule/Pipeline/Output/CsvOutputWriter.cs:84-99 | src/PSRule/Pipeline/Output/CsvOutputWriter.cs:102-117 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/PSRule.Types/Converters/Yaml/CapabilityOptionYamlConverter.cs:24— src/PSRule.Types/Converters/Yaml/CapabilityOptionYamlConverter.cs:24-40 | src/PSRule.Types/Converters/Yaml/StringArrayConverter.cs:23-38 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×7
Edited copy of a member (7 corresponding lines) src/PSRule/Runtime/LegacyRunspaceContext.cs:185— src/PSRule/Runtime/LegacyRunspaceContext.cs:185-191 | src/PSRule/Runtime/LoggerExtensions.cs:349-355 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule.Types/HashtableExtensions.cs:19— src/PSRule.Types/HashtableExtensions.cs:19-26 | src/PSRule/Configuration/PSRuleOption.cs:540-546 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:731— src/PSRule.Types/Data/DateVersion.cs:731-737 | src/PSRule.Types/Data/SemanticVersion.cs:958-964 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule/Pipeline/Runs/Run.cs:80— src/PSRule/Pipeline/Runs/Run.cs:80-86 | src/PSRule/Runtime/LanguageScope.cs:84-90 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:580— src/PSRule.Types/Data/DateVersion.cs:580-586 | src/PSRule.Types/Data/SemanticVersion.cs:804-810 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule/Emitters/MarkdownEmitter.cs:45— src/PSRule/Emitters/MarkdownEmitter.cs:45-51 | src/PSRule/Emitters/PowerShellDataEmitter.cs:44-50 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:184— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:184-190 | src/PSRule/Pipeline/Formatters/VisualStudioCodeFormatter.cs:60-67 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (5 lines × 2) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:920— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:920-924 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:949-953 — 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 `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:920` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:925` calls `Pass` and `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:954` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:88— src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:88-92 | src/PSRule/Runtime/LegacyRunspaceContext.cs:262-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/PSRule/Runtime/Assert.cs:1023— src/PSRule/Runtime/Assert.cs:1023-1027 | src/PSRule/Runtime/Assert.cs:1047-1051 — 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 `src/PSRule/Runtime/Assert.cs:1023` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `false` to `bool unique =` in one and `bool caseSensitive =` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) src/PSRule.Types/Expressions/PathHelpers.cs:20— src/PSRule.Types/Expressions/PathHelpers.cs:20-24 | src/PSRule/Common/ExpressionHelpers.cs:427-431 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `string?` in one and `string` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) src/PSRule/Host/HostHelper.cs:71— src/PSRule/Host/HostHelper.cs:71-75 | src/PSRule/Host/HostHelper.cs:93-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Host/HostHelper.cs:98` calls `AddRange`, `GetPSLanguageBlocks` and `src/PSRule/Host/HostHelper.cs:76` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:261— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:261-266 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:283-287 — 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 `src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:261` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) src/PSRule.Types/Expressions/PathHelpers.cs:12— src/PSRule.Types/Expressions/PathHelpers.cs:12-16 | src/PSRule/Common/ExpressionHelpers.cs:419-423 — 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.
BarePragmaDisable src/PSRule.BuildTool/ClientBuilder.cs:72— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:30— #pragma warning disable IDE0001 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:31— #pragma warning disable IDE0001 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/PSRule/Common/YamlConverters.cs:96— #pragma warning disable IDE0001 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/PSRule/Common/YamlConverters.cs:158— #pragma warning disable IDE0001 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/PSRule.Types/Emitters/EmptyEmitterConfiguration.cs:6— #pragma warning disable CA1822 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×6
Edited copy of a member (17 corresponding lines) src/PSRule/Definitions/Expressions/Functions.cs:254— src/PSRule/Definitions/Expressions/Functions.cs:254-271 | src/PSRule/Definitions/Expressions/Functions.cs:274-290 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:195— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:195-211 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:214-235 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:322— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:322-338 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:341-362 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PSRule/Pipeline/AssertPipelineBuilder.cs:56— src/PSRule/Pipeline/AssertPipelineBuilder.cs:56-72 | src/PSRule/Pipeline/InvokePipelineBuilderBase.cs:94-110 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PSRule/Runtime/LanguageScope.cs:148— src/PSRule/Runtime/LanguageScope.cs:148-164 | src/PSRule/Runtime/LanguageScope.cs:168-184 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/PSRule/Pipeline/GetTargetPipeline.cs:17— src/PSRule/Pipeline/GetTargetPipeline.cs:17-33 | src/PSRule/Pipeline/InvokeRulePipeline.cs:69-92 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×6
Edited copy of a member (11 corresponding lines) src/PSRule.Types/Data/TargetIssueInfo.cs:68— src/PSRule.Types/Data/TargetIssueInfo.cs:68-78 | src/PSRule.Types/Data/TargetSourceInfo.cs:100-110 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:343— src/PSRule.Types/Data/DateVersion.cs:343-353 | src/PSRule.Types/Data/SemanticVersion.cs:520-531 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PSRule/Pipeline/PipelineHookActions.cs:196— src/PSRule/Pipeline/PipelineHookActions.cs:196-206 | src/PSRule/Pipeline/PipelineHookActions.cs:209-219 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs:83— src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs:83-93 | src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:94-104 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:28— src/PSRule.Types/Converters/Json/StringMapJsonConverter.cs:28-39 | src/PSRule/Common/JsonConverters.cs:371-381 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/PSRule.Tool/Adapters/AdapterBuilder.cs:42— src/PSRule.Tool/Adapters/AdapterBuilder.cs:42-52 | src/PSRule.Tool/Program.cs:53-63 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (10 lines × 2) src/PSRule/Commands/AssertExistsCommand.cs:27— src/PSRule/Commands/AssertExistsCommand.cs:27-36 | src/PSRule/Commands/AssertMatchCommand.cs:32-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Commands/AssertExistsCommand.cs:38` calls `Parameter`, `PSDefaultValue` and `src/PSRule/Commands/AssertMatchCommand.cs:43` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1126— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1126-1135 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1151-1160 — 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 `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/PSRule/Pipeline/Output/CsvOutputWriter.cs:90— src/PSRule/Pipeline/Output/CsvOutputWriter.cs:90-99 | src/PSRule/Pipeline/Output/CsvOutputWriter.cs:108-117 — 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 `src/PSRule/Pipeline/Output/CsvOutputWriter.cs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `record` to `RuleRecord` in one and `RuleSummaryRecord` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) src/PSRule.Types/Data/DateVersion.cs:590— src/PSRule.Types/Data/DateVersion.cs:590-599 | src/PSRule.Types/Data/SemanticVersion.cs:820-829 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) src/PSRule/Definitions/Baselines/BaselineFilter.cs:18— src/PSRule/Definitions/Baselines/BaselineFilter.cs:18-27 | src/PSRule/Definitions/Conventions/ConventionFilter.cs:16-25 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `include` to `string[]?` in one and `string[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) src/PSRule/Pipeline/Formatters/AzurePipelinesFormatter.cs:38— src/PSRule/Pipeline/Formatters/AzurePipelinesFormatter.cs:38-47 | src/PSRule/Pipeline/Formatters/GitHubActionsFormatter.cs:40-49 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) src/PSRule/Runtime/Assert.cs:970— src/PSRule/Runtime/Assert.cs:970-984 | src/PSRule/Runtime/Assert.cs:991-1012 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PSRule/Definitions/Expressions/Functions.cs:205— src/PSRule/Definitions/Expressions/Functions.cs:205-219 | src/PSRule/Definitions/Expressions/Functions.cs:222-236 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PSRule/Definitions/Rules/RuleExtensions.cs:470— src/PSRule/Definitions/Rules/RuleExtensions.cs:470-484 | src/PSRule/Host/HostHelper.cs:461-475 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:799— src/PSRule.Types/Data/DateVersion.cs:799-813 | src/PSRule.Types/Data/SemanticVersion.cs:1031-1046 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/PSRule.Types/Definitions/StringMap_T.cs:111— src/PSRule.Types/Definitions/StringMap_T.cs:111-129 | src/PSRule.Types/Definitions/StringMap_T.cs:135-149 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) src/PSRule/Runtime/Assert.cs:1071— src/PSRule/Runtime/Assert.cs:1071-1080 | src/PSRule/Runtime/Assert.cs:1087-1096 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PSRule.Types/Definitions/ResourceHelper.cs:53— src/PSRule.Types/Definitions/ResourceHelper.cs:53-63 | src/PSRule/Definitions/Rules/RuleExtensions.cs:487-496 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PSRule/Runtime/ObjectHelper.cs:153— src/PSRule/Runtime/ObjectHelper.cs:153-162 | src/PSRule/Runtime/ObjectHelper.cs:165-174 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PSRule.Types/Definitions/ResourceId.cs:161— src/PSRule.Types/Definitions/ResourceId.cs:161-175 | src/PSRule.Types/Definitions/ResourceHelper.cs:34-43 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/PSRule/Definitions/Rules/RuleExtensions.cs:458— src/PSRule/Definitions/Rules/RuleExtensions.cs:458-467 | src/PSRule/Host/HostHelper.cs:449-458 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Sync-over-async blocking src/vscode-ps-rule/commands/initLock.ts:29— `cp.spawnSync` in `callback to window.withProgress` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/vscode-ps-rule/commands/openOptionsFile.ts:47— `fse.existsSync` in `getOptionFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/vscode-ps-rule/commands/restore.ts:29— `cp.spawnSync` in `callback to window.withProgress` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/vscode-ps-rule/features/scanQuickpick/scanQuickpick.ts:80— `fse.readdirSync` in `callback to workspacePaths.map` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/vscode-ps-rule/utils.ts:111— `cp.spawnSync` in `getLanguageServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×5
Symbol treated as nullable, then dereferenced unguarded src/PSRule/Configuration/PSRuleOption.cs:228— This method contradicts itself about `result`: line 237 writes `result?.Output`, which says `result` can be null, but line 228 then dereferences it directly as `result.Baseline` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `result` truly cannot be null here, the `?.` is misleading. Settle it one way — test `result` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded src/PSRule/Host/HostHelper.cs:34— This method contradicts itself about `context`: line 38 writes `context?.Pipeline`, which says `context` can be null, but line 34 then dereferences it directly as `context.Pipeline` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `context` truly cannot be null here, the `?.` is misleading. Settle it one way — test `context` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:73— This method contradicts itself about `resourceIssue`: line 87 writes `resourceIssue?.`, which says `resourceIssue` can be null, but line 73 then dereferences it directly as `resourceIssue.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `resourceIssue` truly cannot be null here, the `?.` is misleading. Settle it one way — test `resourceIssue` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded src/PSRule/Rules/SuppressionFilter.cs:77— This method contradicts itself about `k2`: line 76 assigns it with `as SuppressionKey`, which hands back null rather than throwing when the value is not a `SuppressionKey`, but line 77 then dereferences it directly as `k2._HashCode` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `k2` once before the first use and handle the null case, or cast with `(SuppressionKey)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded src/PSRule/Runtime/LegacyRunspaceContext.cs:247— This method contradicts itself about `issue`: line 261 writes `issue?.`, which says `issue` can be null, but line 247 then dereferences it directly as `issue.Type` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `issue` truly cannot be null here, the `?.` is misleading. Settle it one way — test `issue` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Change coupling: NewRuleDefinitionCommand.cs ↔ HostHelper.cs src/PSRule/Commands/NewRuleDefinitionCommand.cs:1— `src/PSRule/Commands/NewRuleDefinitionCommand.cs` and `src/PSRule/Host/HostHelper.cs` change together 64% of the time (14 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `bea62ac5` Refactoring (#2982); `697c89fd` Context refactoring (#2617); `1fd2d7c3` Context refactoring (#2524) — run `git show` on any of them.
Change coupling: PipelineBuilderBase.cs ↔ LegacyRunspaceContext.cs src/PSRule/Pipeline/PipelineBuilderBase.cs:1— `src/PSRule/Pipeline/PipelineBuilderBase.cs` and `src/PSRule/Runtime/LegacyRunspaceContext.cs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `9b6a23cb` Refactoring resource cache (#3024); `c56ffbcd` Fixes bugs with change files #1465 #2777 (#2799) (at that commit the file was still `src/PSRule/Runtime/RunspaceContext.cs`); `454f0d8c` Code refactoring (#2647) (at that commit the file was still `src/PSRule/Runtime/RunspaceContext.cs`) — run `git show` on any of them.
Change coupling: HostHelper.cs ↔ LanguageScope.cs src/PSRule/Host/HostHelper.cs:1— `src/PSRule/Host/HostHelper.cs` and `src/PSRule/Runtime/LanguageScope.cs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `bea62ac5` Refactoring (#2982); `d2c41912` Refactoring of language scopes (#2601); `cb7bc0fc` Fixed problem when binding not set locally #1473 (#1474) — run `git show` on any of them.
Change coupling: HostState.cs ↔ PipelineContext.cs src/PSRule/Host/HostState.cs:1— `src/PSRule/Host/HostState.cs` and `src/PSRule/Pipeline/PipelineContext.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `9b6a23cb` Refactoring resource cache (#3024); `bb41e561` Use SHA-512 for name generation #1155 (#1575) (at that commit the file was still `src/PSRule/Host/Host.cs`); `cb799e15` Fixes could not load Microsoft.Management.Infrastructure #1249 (#1250) (at that commit the file was still `src/PSRule/Host/Host.cs`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:72— src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:72-92 | src/PSRule/Runtime/LegacyRunspaceContext.cs:246-266 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:428— src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:428-448 | src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:451-472 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PSRule/Runtime/Assert.cs:341— src/PSRule/Runtime/Assert.cs:341-361 | src/PSRule/Runtime/Assert.cs:1119-1140 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/PSRule.Tool/Program.cs:69— src/PSRule.Tool/Program.cs:69-91 | src/PSRule.EditorServices/Commands/ListenCommand.cs:110-130 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×4
Edited copy of a member (23 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:365— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:365-389 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:392-414 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1115— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1115-1137 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1140-1162 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/PSRule/Emitters/BaseEmitterContext.cs:50— src/PSRule/Emitters/BaseEmitterContext.cs:50-72 | src/PSRule/Pipeline/PipelineReciever.cs:178-200 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:177— src/PSRule.Types/Data/DateVersion.cs:177-199 | src/PSRule.Types/Data/SemanticVersion.cs:251-285 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×4
Edited copy of a member (22 corresponding lines) src/PSRule/Runtime/Assert.cs:791— src/PSRule/Runtime/Assert.cs:791-812 | src/PSRule/Runtime/Assert.cs:818-839 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:60— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:60-81 | src/PSRule/Common/YamlConverters.cs:113-134 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:772— src/PSRule.Types/Data/DateVersion.cs:772-793 | src/PSRule.Types/Data/SemanticVersion.cs:999-1025 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:69— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:69-90 | src/PSRule/Runtime/Configuration.cs:70-91 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) src/PSRule/Runtime/Assert.cs:1217— src/PSRule/Runtime/Assert.cs:1217-1238 | src/PSRule/Runtime/Assert.cs:1244-1262 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:255— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:255-273 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:276-295 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:417— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:417-436 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:439-457 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/PSRule.Types/Converters/TypeConverter.cs:128— src/PSRule.Types/Converters/TypeConverter.cs:128-151 | src/PSRule.Types/Converters/TypeConverter.cs:180-198 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×4
Edited copy of a member (12 corresponding lines) src/PSRule/Common/BaselineJsonSerializationMapper.cs:18— src/PSRule/Common/BaselineJsonSerializationMapper.cs:18-29 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:19-32 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PSRule/Pipeline/Formatters/AzurePipelinesFormatter.cs:50— src/PSRule/Pipeline/Formatters/AzurePipelinesFormatter.cs:50-61 | src/PSRule/Pipeline/Formatters/GitHubActionsFormatter.cs:52-65 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PSRule.Types/Data/KeyMap.cs:138— src/PSRule.Types/Data/KeyMap.cs:138-149 | src/PSRule.Types/Data/KeyMap.cs:157-168 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:126— src/PSRule.Types/Data/DateVersion.cs:126-137 | src/PSRule.Types/Data/SemanticVersion.cs:152-164 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) src/PSRule.Types/Expressions/PathHelpers.cs:19— src/PSRule.Types/Expressions/PathHelpers.cs:19-24 | src/PSRule/Common/ExpressionHelpers.cs:426-431 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:21— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:21-26 | src/PSRule/Runtime/Configuration.cs:43-48 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:36— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:36-41 | src/PSRule/Runtime/Configuration.cs:52-57 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/PSRule.Types/Runtime/IConfigurationExtensions.cs:51— src/PSRule.Types/Runtime/IConfigurationExtensions.cs:51-56 | src/PSRule/Runtime/Configuration.cs:61-66 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) src/PSRule/Host/HostHelper.cs:70— src/PSRule/Host/HostHelper.cs:70-77 | src/PSRule/Host/HostHelper.cs:92-100 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PSRule/Common/BaselineYamlSerializationMapper.cs:129— src/PSRule/Common/BaselineYamlSerializationMapper.cs:129-141 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:226-233 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PSRule.Types/Definitions/ResourceId.cs:143— src/PSRule.Types/Definitions/ResourceId.cs:143-151 | src/PSRule.Types/Definitions/ResourceIdReference.cs:105-112 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:570— src/PSRule.Types/Data/DateVersion.cs:570-577 | src/PSRule.Types/Data/SemanticVersion.cs:794-801 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:25— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:25-38 | src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:26-39 — before extracting anything, compare `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs` and `src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:43— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:43-56 | src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:45-58 — before extracting anything, compare `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs` and `src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) src/PSRule.Types/Data/DateVersion.cs:664— src/PSRule.Types/Data/DateVersion.cs:664-677 | src/PSRule.Types/Data/SemanticVersion.cs:891-904 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) src/PSRule/Emitters/MarkdownEmitter.cs:71— src/PSRule/Emitters/MarkdownEmitter.cs:71-84 | src/PSRule/Emitters/PowerShellDataEmitter.cs:79-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Swallowed exception (empty catch) src/PSRule/Common/GitHelper.cs:268— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/PSRule/Pipeline/Output/CsvOutputWriter.cs:204— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/PSRule/Runtime/ObjectHelper.cs:238— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/PSRule.EditorServices/Handlers/ConfigurationChangeHandler.cs:116— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
FileTooLong: Expressions/LanguageExpressions.cs src/PSRule/Definitions/Expressions/LanguageExpressions.cs— FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 431 over it, 1.86× 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: Runtime/Assert.cs src/PSRule/Runtime/Assert.cs— 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: Data/SemanticVersion.cs src/PSRule.Types/Data/SemanticVersion.cs— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) src/PSRule.CommandLine/ClientHost.cs:117— src/PSRule.CommandLine/ClientHost.cs:117-147 | src/PSRule.EditorServices/Hosting/ServerHostContext.cs:66-90 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1025— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1025-1049 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1052-1076 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/PSRule/Common/HashSetExtensions.cs:11— src/PSRule/Common/HashSetExtensions.cs:11-35 | src/PSRule/Common/HashSetExtensions.cs:38-62 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:65— src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:65-77 | src/PSRule/Runtime/LoggerExtensions.cs:358-370 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1291— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1291-1303 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1306-1318 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:363— src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:363-375 | src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:478-490 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:256— src/PSRule.Types/Data/DateVersion.cs:256-260 | src/PSRule.Types/Data/SemanticVersion.cs:357-361 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:266— src/PSRule.Types/Data/DateVersion.cs:266-270 | src/PSRule.Types/Data/SemanticVersion.cs:367-371 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/PSRule/Common/ExpressionContextExtensions.cs:20— src/PSRule/Common/ExpressionContextExtensions.cs:20-24 | src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs:298-303 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:202— src/PSRule.Types/Data/DateVersion.cs:202-204 | src/PSRule.Types/Data/SemanticVersion.cs:288-290 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:212— src/PSRule.Types/Data/DateVersion.cs:212-214 | src/PSRule.Types/Data/SemanticVersion.cs:298-300 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:404— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:404-407 | src/PSRule/Pipeline/PipelineWriterExtensions.cs:72-74 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) src/PSRule/Runtime/Assert.cs:792— src/PSRule/Runtime/Assert.cs:792-803 | src/PSRule/Runtime/Assert.cs:819-830 — 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 `src/PSRule/Runtime/Assert.cs:792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `type` to `Type[]` in one and `string[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) src/PSRule.Types/Data/DateVersion.cs:15— src/PSRule.Types/Data/DateVersion.cs:15-26 | src/PSRule.Types/Data/SemanticVersion.cs:19-30 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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 (12 lines × 2) src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:93— src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:93-104 | src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:53-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) src/PSRule/Definitions/Rules/RuleExtensions.cs:472— src/PSRule/Definitions/Rules/RuleExtensions.cs:472-480 | src/PSRule/Host/HostHelper.cs:463-471 — 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 (9 lines × 2) src/PSRule/Pipeline/Runs/Run.cs:129— src/PSRule/Pipeline/Runs/Run.cs:129-137 | src/PSRule/Runtime/LanguageScope.cs:65-73 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) src/PSRule.Types/Data/DateVersion.cs:469— src/PSRule.Types/Data/DateVersion.cs:469-477 | src/PSRule.Types/Data/SemanticVersion.cs:666-674 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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 `src/PSRule.Types/Data/DateVersion.cs:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/PSRule/Common/YamlConverters.cs:40— src/PSRule/Common/YamlConverters.cs:40-46 | src/PSRule/Common/YamlConverters.cs:54-60 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/PSRule/Emitters/PowerShellDataEmitter.cs:66— src/PSRule/Emitters/PowerShellDataEmitter.cs:66-72 | src/PSRule/Pipeline/PipelineReciever.cs:167-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:92— src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:92-98 | src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:128-134 — 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 `src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:92` 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.
Low cohesion: HostContext (LCOM4 4) src/PSRule/Pipeline/HostContext.cs:13— HostContext's methods fall into 4 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 4 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: PipelineLoggerBase (LCOM4 4) src/PSRule/Pipeline/PipelineLoggerBase.cs:9— PipelineLoggerBase's methods fall into 4 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 4 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: Run (LCOM4 4) src/PSRule/Pipeline/Runs/Run.cs:17— Run's methods fall into 4 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 4 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.
Unfinished branch — throws NotImplementedException src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:117— The `default:` section (reached by `Unknown`, `SuppressionGroupExpired`, `AliasReference`, `RuleExcluded`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:90— The `default:` section (reached by `Unknown`, `SuppressionGroupExpired`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException src/PSRule/Runtime/LegacyRunspaceContext.cs:264— The `default:` section (reached by `Unknown`, `SuppressionGroupExpired`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
X18 · Disposal-pattern correctness· Disposes a dependency it does not own · ×3
Disposes a dependency it does not own src/PSRule/Pipeline/PipelineContext.cs:214— `Writer` is never created by `PipelineContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 214). Its declared type `IPipelineWriter` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/PSRule/Pipeline/PipelineWriter.cs:81— `_Inner` is never created by `PipelineWriter` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 81). Its declared type `IPipelineWriter` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/PSRule/Rules/RuleBlock.cs:143— `Condition` is never created by `RuleBlock` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 143). Its declared type `ICondition` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
AX2 · Stateful singletons· Process-global static state · ×2
Process-global static state: Environment src/PSRule.Types/Environment.cs:20— `Environment` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_CurrentCulture, _GetWorkingPath; e.g. `_CurrentCulture` at line 76). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BadgeResources src/PSRule.Badges/BadgeResources.cs:13— `BadgeResources` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_Char, _Width; e.g. `_Char` at line 36). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
PR.CompareTo (cyclomatic 21) src/PSRule.Types/Data/DateVersion.cs:458— PR.CompareTo 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.
PR.CompareTo (cyclomatic 21) src/PSRule.Types/Data/SemanticVersion.cs:659— PR.CompareTo 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.
VersionConstraint.Accepts (cyclomatic 16) src/PSRule.Types/Data/DateVersion.cs:87— VersionConstraint.Accepts 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.
VersionConstraint.Accepts (cyclomatic 16) src/PSRule.Types/Data/SemanticVersion.cs:101— VersionConstraint.Accepts 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.
PR.CompareTo (cognitive 27) src/PSRule.Types/Data/DateVersion.cs:458— PR.CompareTo has cognitive complexity 27 (threshold 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.
PR.CompareTo (cognitive 27) src/PSRule.Types/Data/SemanticVersion.cs:659— PR.CompareTo has cognitive complexity 27 (threshold 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.
VersionConstraint.Accepts (cognitive 20) src/PSRule.Types/Data/DateVersion.cs:87— VersionConstraint.Accepts has cognitive complexity 20 (threshold 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.
VersionConstraint.Accepts (cognitive 20) src/PSRule.Types/Data/SemanticVersion.cs:101— VersionConstraint.Accepts has cognitive complexity 20 (threshold 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.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) src/PSRule/Runtime/Assert.cs:629— src/PSRule/Runtime/Assert.cs:629-641 | src/PSRule/Runtime/Assert.cs:647-659 | src/PSRule/Runtime/Assert.cs:1103-1112 | src/PSRule/Runtime/Assert.cs:1148-1170 | src/PSRule/Runtime/Assert.cs:1178-1211 | src/PSRule/Runtime/Assert.cs:1275-1294 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) src/PSRule/Runtime/Assert.cs:668— src/PSRule/Runtime/Assert.cs:668-683 | src/PSRule/Runtime/Assert.cs:692-705 | src/PSRule/Runtime/Assert.cs:714-725 | src/PSRule/Runtime/Assert.cs:734-745 | src/PSRule/Runtime/Assert.cs:754-765 | src/PSRule/Runtime/Assert.cs:774-785 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×2
Edited copies of one member (3 members, 18+ corresponding lines) src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:87— src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:87-104 | src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:47-64 | src/PSRule/Runtime/LegacyRunspaceContext.cs:680-697 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:117— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:117-134 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:140-157 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:163-181 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) src/PSRule/Common/BaselineYamlSerializationMapper.cs:35— src/PSRule/Common/BaselineYamlSerializationMapper.cs:35-45 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:48-58 | src/PSRule/Common/BaselineYamlSerializationMapper.cs:194-205 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/PSRule/Common/BaselineJsonSerializationMapper.cs:32— src/PSRule/Common/BaselineJsonSerializationMapper.cs:32-42 | src/PSRule/Common/BaselineJsonSerializationMapper.cs:45-55 | src/PSRule/Common/BaselineJsonSerializationMapper.cs:192-203 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:318— src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:318-335 | src/PSRule/Pipeline/Formatters/AssertFormatterBase.cs:338-355 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/PSRule.Types/DictionaryExtensions.cs:128— src/PSRule.Types/DictionaryExtensions.cs:128-146 | src/PSRule.Types/Environment.cs:217-234 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) src/PSRule/Pipeline/PipelineHookActions.cs:29— src/PSRule/Pipeline/PipelineHookActions.cs:29-40 | src/PSRule/Pipeline/PipelineHookActions.cs:44-55 | src/PSRule/Pipeline/PipelineHookActions.cs:59-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/PSRule/Definitions/Baselines/BaselineExtensions.cs:47— src/PSRule/Definitions/Baselines/BaselineExtensions.cs:47-58 | src/PSRule/Definitions/Conventions/ConventionExtensions.cs:48-59 | src/PSRule/Definitions/Selectors/SelectorExtensions.cs:61-72 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×2
Edited copies of one member (3 members, 7+ corresponding lines) src/PSRule.CommandLine/ClientContextExtensions.cs:13— src/PSRule.CommandLine/ClientContextExtensions.cs:13-19 | src/PSRule.CommandLine/ClientContextExtensions.cs:22-28 | src/PSRule.CommandLine/ClientContextExtensions.cs:31-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) src/PSRule/Pipeline/Output/HostPipelineWriter.cs:95— src/PSRule/Pipeline/Output/HostPipelineWriter.cs:95-104 | src/PSRule/Pipeline/PathBuilder.cs:41-47 | src/PSRule/Pipeline/SourcePipelineBuilder.cs:104-110 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:440— src/PSRule.Types/Data/DateVersion.cs:440-443 | src/PSRule.Types/Data/SemanticVersion.cs:641-644 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:762— src/PSRule.Types/Data/DateVersion.cs:762-765 | src/PSRule.Types/Data/SemanticVersion.cs:989-992 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (24 lines × 2) src/PSRule.Types/Converters/TypeConverter.cs:38— src/PSRule.Types/Converters/TypeConverter.cs:38-61 | src/PSRule/Common/ExpressionHelpers.cs:190-213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.Types/Converters/TypeConverter.cs:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `out string?` in one and `out string` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (24 lines × 2) src/PSRule.Types/Data/DateVersion.cs:637— src/PSRule.Types/Data/DateVersion.cs:637-660 | src/PSRule.Types/Data/SemanticVersion.cs:864-887 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (20 lines × 2) src/PSRule.Types/Data/DateVersion.cs:89— src/PSRule.Types/Data/DateVersion.cs:89-108 | src/PSRule.Types/Data/SemanticVersion.cs:103-122 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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 `src/PSRule.Types/Data/DateVersion.cs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) src/PSRule.EditorServices/Commands/ListenCommand.cs:111— src/PSRule.EditorServices/Commands/ListenCommand.cs:111-130 | src/PSRule.Tool/Program.cs:72-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.Tool/Program.cs:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) src/PSRule/Commands/AssertMatchCommand.cs:58— src/PSRule/Commands/AssertMatchCommand.cs:58-74 | src/PSRule/Commands/AssertWithinCommand.cs:60-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Commands/AssertMatchCommand.cs:58` 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) src/PSRule.Types/Data/DateVersion.cs:617— src/PSRule.Types/Data/DateVersion.cs:617-633 | src/PSRule.Types/Data/SemanticVersion.cs:844-860 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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 `src/PSRule.Types/Data/DateVersion.cs:617` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) src/PSRule.Types/Data/DateVersion.cs:685— src/PSRule.Types/Data/DateVersion.cs:685-697 | src/PSRule.Types/Data/SemanticVersion.cs:912-924 — before extracting anything, compare `src/PSRule.Types/Data/DateVersion.cs` and `src/PSRule.Types/Data/SemanticVersion.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) src/PSRule/Pipeline/Formatters/ClientFormatter.cs:40— src/PSRule/Pipeline/Formatters/ClientFormatter.cs:40-52 | src/PSRule/Pipeline/Formatters/PlainFormatter.cs:20-32 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 3) src/PSRule/Definitions/Rules/RuleExtensions.cs:55— src/PSRule/Definitions/Rules/RuleExtensions.cs:55-63 | src/PSRule/Definitions/Rules/RuleExtensions.cs:206-214 | src/PSRule/Definitions/Rules/RuleExtensions.cs:332-340 — 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 `src/PSRule/Definitions/Rules/RuleExtensions.cs:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Definitions/Rules/RuleExtensions.cs:215` calls `AddNames`, `AddIds` and `src/PSRule/Definitions/Rules/RuleExtensions.cs:64` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) src/PSRule/Definitions/Rules/RuleExtensions.cs:99— src/PSRule/Definitions/Rules/RuleExtensions.cs:99-107 | src/PSRule/Definitions/Rules/RuleExtensions.cs:263-271 | src/PSRule/Definitions/Rules/RuleExtensions.cs:389-397 — 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 `src/PSRule/Definitions/Rules/RuleExtensions.cs:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/PSRule/Definitions/Rules/RuleExtensions.cs:272` calls `AddNames`, `AddIds` and `src/PSRule/Definitions/Rules/RuleExtensions.cs:108` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:110— src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:110-115 | src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs:75-80 | src/PSRule/Runtime/LegacyRunspaceContext.cs:249-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:647— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:647-652 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:709-714 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:771-776 — 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 `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:647` 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.
Fake-async — async method never awaits src/PSRule.CommandLine/Commands/ModuleCommand.cs:220— `ModuleListAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits src/PSRule.CommandLine/Commands/ModuleCommand.cs:313— `ModuleRemoveAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
R4 · Test Coverage· No test reaches this file · ×2
No test reaches this file esbuild.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/vscode-ps-rule/main.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Blocking `ModuleCommand.Retry` inside an `async` method src/PSRule.CommandLine/Commands/ModuleCommand.cs:598— `ModuleCommand.Retry` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ModuleCommand.Retry` inside an `async` method src/PSRule.CommandLine/Commands/ModuleCommand.cs:611— `ModuleCommand.Retry` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Stateful singleton: ClientContext src/PSRule.CommandLine/ClientContext.cs:13— `ClientContext` is a singleton (one shared instance) but mutates instance state outside any lock (LastErrorCode, _OptionPath, Option; e.g. `LastErrorCode` at line 112).
GitHubActionsAdapter.GetArgs (cyclomatic 32) src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs:15— GitHubActionsAdapter.GetArgs has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AzurePipelinesAdapter.GetArgs (cyclomatic 30) src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:15— AzurePipelinesAdapter.GetArgs 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.
ModuleCommand.ModuleRestoreAsync (cyclomatic 26) src/PSRule.CommandLine/Commands/ModuleCommand.cs:49— ModuleCommand.ModuleRestoreAsync 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.
AssertWithinCommand.ProcessRecord (cyclomatic 23) src/PSRule/Commands/AssertWithinCommand.cs:58— AssertWithinCommand.ProcessRecord 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.
ObjectHelper.TryPropertyValue (cyclomatic 23) src/PSRule/Runtime/ObjectHelper.cs:33— ObjectHelper.TryPropertyValue 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.
ModuleCommand.ModuleAddAsync (cyclomatic 23) src/PSRule.CommandLine/Commands/ModuleCommand.cs:238— ModuleCommand.ModuleAddAsync 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.
RunCommand.RunAsync (cyclomatic 21) src/PSRule.CommandLine/Commands/RunCommand.cs:31— RunCommand.RunAsync 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.
LanguageExpressionJsonConverter.MapProperty (cyclomatic 20) src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:181— LanguageExpressionJsonConverter.MapProperty 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.
upgradeDependency.upgradeDependency (cyclomatic 20) src/vscode-ps-rule/commands/upgradeDependency.ts:16— upgradeDependency.upgradeDependency has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionHelpers.Equal (cyclomatic 19) src/PSRule/Common/ExpressionHelpers.cs:39— ExpressionHelpers.Equal 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.
InvokeRulePipeline.InvokeRun (cyclomatic 19) src/PSRule/Pipeline/InvokeRulePipeline.cs:148— InvokeRulePipeline.InvokeRun 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.
PathStream.TryConsumeComparisonOperator (cyclomatic 19) src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:229— PathStream.TryConsumeComparisonOperator 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.
Version.CompareTo (cyclomatic 18) src/PSRule.Types/Data/DateVersion.cs:377— Version.CompareTo 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.
PSObjectBaseConverter.ReadObject (cyclomatic 18) src/PSRule/Common/JsonConverters.cs:35— PSObjectBaseConverter.ReadObject 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.
LanguageExpressionDeserializer.MapProperty (cyclomatic 18) src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs:180— LanguageExpressionDeserializer.MapProperty 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.
runner.getAnalysisRunner::getCmdTooling (cyclomatic 18) src/vscode-ps-rule/runner.ts:30— runner.getAnalysisRunner::getCmdTooling 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.
ExecutionOption.Load (cyclomatic 17) src/PSRule.Types/Options/ExecutionOption.cs:372— ExecutionOption.Load 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. This shape REPEATS in the file: one other method here (ExecutionOption.Import) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ExecutionOption.Import (cyclomatic 17) src/PSRule.Types/Options/ExecutionOption.cs:424— ExecutionOption.Import 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. This shape REPEATS in the file: one other method here (ExecutionOption.Load) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ExpressionHelpers.Equal (cyclomatic 17) src/PSRule/Common/ExpressionHelpers.cs:83— ExpressionHelpers.Equal 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.
MarkdownReader.UnwrapStyleMarkers (cyclomatic 17) src/PSRule/Help/MarkdownReader.cs:243— MarkdownReader.UnwrapStyleMarkers 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.
ObjectHelper.TryIndexValue (cyclomatic 17) src/PSRule/Runtime/ObjectHelper.cs:97— ObjectHelper.TryIndexValue 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.
ModuleCommand.ModuleInitAsync (cyclomatic 17) src/PSRule.CommandLine/Commands/ModuleCommand.cs:155— ModuleCommand.ModuleInitAsync 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.
StringExtensions.SplitSemantic (cyclomatic 16) src/PSRule.Types/StringExtensions.cs:35— StringExtensions.SplitSemantic 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.
ResourceObjectJsonConverter.MapResource (cyclomatic 16) src/PSRule/Converters/Json/ResourceObjectJsonConverter.cs:47— ResourceObjectJsonConverter.MapResource 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.
LanguageExpressionJsonConverter.MapProperty (cognitive 41) src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:181— LanguageExpressionJsonConverter.MapProperty has cognitive complexity 41 (threshold 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.
ModuleCommand.ModuleRestoreAsync (cognitive 41) src/PSRule.CommandLine/Commands/ModuleCommand.cs:49— ModuleCommand.ModuleRestoreAsync has cognitive complexity 41 (threshold 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.
AzurePipelinesAdapter.GetArgs (cognitive 37) src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:15— AzurePipelinesAdapter.GetArgs has cognitive complexity 37 (threshold 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.
GitHubActionsAdapter.GetArgs (cognitive 37) src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs:15— GitHubActionsAdapter.GetArgs has cognitive complexity 37 (threshold 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.
InvokeRulePipeline.InvokeRun (cognitive 35) src/PSRule/Pipeline/InvokeRulePipeline.cs:148— InvokeRulePipeline.InvokeRun has cognitive complexity 35 (threshold 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.
ModuleCommand.ModuleAddAsync (cognitive 35) src/PSRule.CommandLine/Commands/ModuleCommand.cs:238— ModuleCommand.ModuleAddAsync has cognitive complexity 35 (threshold 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.
AssertWithinCommand.ProcessRecord (cognitive 33) src/PSRule/Commands/AssertWithinCommand.cs:58— AssertWithinCommand.ProcessRecord has cognitive complexity 33 (threshold 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.
MarkdownReader.UnwrapStyleMarkers (cognitive 32) src/PSRule/Help/MarkdownReader.cs:243— MarkdownReader.UnwrapStyleMarkers has cognitive complexity 32 (threshold 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.
ModuleCommand.ModuleInitAsync (cognitive 29) src/PSRule.CommandLine/Commands/ModuleCommand.cs:155— ModuleCommand.ModuleInitAsync has cognitive complexity 29 (threshold 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.
HostHelper.GetPSLanguageBlocks (cognitive 28) src/PSRule/Host/HostHelper.cs:167— HostHelper.GetPSLanguageBlocks has cognitive complexity 28 (threshold 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.
LanguageExpressionJsonConverter.MapOperator (cognitive 27) src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs:53— LanguageExpressionJsonConverter.MapOperator has cognitive complexity 27 (threshold 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.
HostHelper.GetJsonLanguageBlocks (cognitive 27) src/PSRule/Host/HostHelper.cs:320— HostHelper.GetJsonLanguageBlocks has cognitive complexity 27 (threshold 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.
upgradeDependency.upgradeDependency (cognitive 27) src/vscode-ps-rule/commands/upgradeDependency.ts:16— upgradeDependency.upgradeDependency has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 6 (nesting depth added 11). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LanguageExpressionDeserializer.MapProperty (cognitive 26) src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs:180— LanguageExpressionDeserializer.MapProperty has cognitive complexity 26 (threshold 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.
StringExtensions.SplitSemantic (cognitive 24) src/PSRule.Types/StringExtensions.cs:35— StringExtensions.SplitSemantic has cognitive complexity 24 (threshold 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.
LanguageExpressionBuilder.Operator (cognitive 24) src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs:202— LanguageExpressionBuilder.Operator has cognitive complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 221). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ResourceObjectJsonConverter.MapResource (cognitive 23) src/PSRule/Converters/Json/ResourceObjectJsonConverter.cs:47— ResourceObjectJsonConverter.MapResource has cognitive complexity 23 (threshold 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.
PSObjectBaseConverter.ReadObject (cognitive 21) src/PSRule/Common/JsonConverters.cs:35— PSObjectBaseConverter.ReadObject has cognitive complexity 21 (threshold 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.
RuleExtensions.ToRuleDependencyTargetCollection (cognitive 21) src/PSRule/Definitions/Rules/RuleExtensions.cs:157— RuleExtensions.ToRuleDependencyTargetCollection has cognitive complexity 21 (threshold 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. This shape REPEATS in the file: one other method here (RuleExtensions.ToRuleDependencyTargetCollectionV2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RuleExtensions.ToRuleDependencyTargetCollectionV2 (cognitive 21) src/PSRule/Definitions/Rules/RuleExtensions.cs:283— RuleExtensions.ToRuleDependencyTargetCollectionV2 has cognitive complexity 21 (threshold 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. This shape REPEATS in the file: one other method here (RuleExtensions.ToRuleDependencyTargetCollection) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ModuleCommand.ModuleUpgradeAsync (cognitive 21) src/PSRule.CommandLine/Commands/ModuleCommand.cs:346— ModuleCommand.ModuleUpgradeAsync has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
runner.getAnalysisRunner::getCmdTooling (cognitive 21) src/vscode-ps-rule/runner.ts:30— runner.getAnalysisRunner::getCmdTooling has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 7, loops 2 (4 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.
RuleKeyword.GetField (cognitive 20) src/PSRule/Commands/RuleKeyword.cs:29— RuleKeyword.GetField has cognitive complexity 20 (threshold 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.
DependencyGraphBuilder.Include (cognitive 20) src/PSRule/Definitions/DependencyGraphBuilder.cs:55— DependencyGraphBuilder.Include has cognitive complexity 20 (threshold 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.
HelpLexer.ReadText (cognitive 20) src/PSRule/Help/HelpLexer.cs:113— HelpLexer.ReadText has cognitive complexity 20 (threshold 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.
SourcePipelineBuilder.TryInstalledModule (cognitive 20) src/PSRule/Pipeline/SourcePipelineBuilder.cs:197— SourcePipelineBuilder.TryInstalledModule has cognitive complexity 20 (threshold 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.
RunCommand.RunAsync (cognitive 20) src/PSRule.CommandLine/Commands/RunCommand.cs:31— RunCommand.RunAsync has cognitive complexity 20 (threshold 15). 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.
ObjectHelper.TryPropertyValue (cognitive 19) src/PSRule/Runtime/ObjectHelper.cs:33— ObjectHelper.TryPropertyValue has cognitive complexity 19 (threshold 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.
PathStream.TryConsumeComparisonOperator (cognitive 19) src/PSRule/Runtime/ObjectPath/PathTokenizer.cs:229— PathStream.TryConsumeComparisonOperator has cognitive complexity 19 (threshold 15). 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.
ConfigurationChangeHandler.Handle (cognitive 19) src/PSRule.EditorServices/Handlers/ConfigurationChangeHandler.cs:24— ConfigurationChangeHandler.Handle has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExtensionManager.checkExtension (cognitive 19) src/vscode-ps-rule/extension.ts:217— ExtensionManager.checkExtension has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 259, 289, 312). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Version.CompareTo (cognitive 18) src/PSRule.Types/Data/DateVersion.cs:377— Version.CompareTo has cognitive complexity 18 (threshold 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.
ExpressionHelpers.Equal (cognitive 18) src/PSRule/Common/ExpressionHelpers.cs:39— ExpressionHelpers.Equal has cognitive complexity 18 (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.
LanguageExpressions.Subset (cognitive 18) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:391— LanguageExpressions.Subset has cognitive complexity 18 (threshold 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.
PathExpressionBuilder.GetAllField (cognitive 18) src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:413— PathExpressionBuilder.GetAllField has cognitive complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FieldMapJsonConverter.ReadFieldMap (cognitive 17) src/PSRule/Common/JsonConverters.cs:383— FieldMapJsonConverter.ReadFieldMap has cognitive complexity 17 (threshold 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.
SuppressionRuleYamlTypeConverter.ReadYaml (cognitive 17) src/PSRule/Common/YamlConverters.cs:35— SuppressionRuleYamlTypeConverter.ReadYaml has cognitive complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FieldMapYamlTypeConverter.ReadYaml (cognitive 17) src/PSRule/Common/YamlConverters.cs:83— FieldMapYamlTypeConverter.ReadYaml has cognitive complexity 17 (threshold 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.
LanguageExpressions.NotStartsWith (cognitive 17) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:638— LanguageExpressions.NotStartsWith has cognitive complexity 17 (threshold 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. This shape REPEATS in the file: 2 other methods here (LanguageExpressions.NotEndsWith, LanguageExpressions.NotContains) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LanguageExpressions.NotEndsWith (cognitive 17) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:700— LanguageExpressions.NotEndsWith has cognitive complexity 17 (threshold 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. This shape REPEATS in the file: 2 other methods here (LanguageExpressions.NotStartsWith, LanguageExpressions.NotContains) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LanguageExpressions.NotContains (cognitive 17) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:762— LanguageExpressions.NotContains has cognitive complexity 17 (threshold 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. This shape REPEATS in the file: 2 other methods here (LanguageExpressions.NotStartsWith, LanguageExpressions.NotEndsWith) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
HostHelper.GetYamlLanguageBlocks (cognitive 17) src/PSRule/Host/HostHelper.cs:247— HostHelper.GetYamlLanguageBlocks has cognitive complexity 17 (threshold 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.
ObjectHelper.TryIndexValue (cognitive 17) src/PSRule/Runtime/ObjectHelper.cs:97— ObjectHelper.TryIndexValue has cognitive complexity 17 (threshold 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.
DependencyLensProvider.provideCodeLenses (cognitive 17) src/vscode-ps-rule/dependencyLens.ts:66— DependencyLensProvider.provideCodeLenses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (5 pts), ternaries 1 (4 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.
TypeConverter.TryStringArray (cognitive 16) src/PSRule.Types/Converters/TypeConverter.cs:92— TypeConverter.TryStringArray has cognitive complexity 16 (threshold 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.
StringArrayMapConverter.ReadYaml (cognitive 16) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:23— StringArrayMapConverter.ReadYaml has cognitive complexity 16 (threshold 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.
StringMapYamlConverter.ReadYaml (cognitive 16) src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:24— StringMapYamlConverter.ReadYaml has cognitive complexity 16 (threshold 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.
VersionStream.TrySegments (cognitive 16) src/PSRule.Types/Data/DateVersion.cs:601— VersionStream.TrySegments has cognitive complexity 16 (threshold 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.
ExecutionOption.Load (cognitive 16) src/PSRule.Types/Options/ExecutionOption.cs:372— ExecutionOption.Load has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (ExecutionOption.Import) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ExecutionOption.Import (cognitive 16) src/PSRule.Types/Options/ExecutionOption.cs:424— ExecutionOption.Import has cognitive complexity 16 (threshold 15). 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. This shape REPEATS in the file: one other method here (ExecutionOption.Load) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ExpressionHelpers.Equal (cognitive 16) src/PSRule/Common/ExpressionHelpers.cs:83— ExpressionHelpers.Equal has cognitive 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.
PSObjectExtensions.ConvertTargetInfoProperty (cognitive 16) src/PSRule/Common/PSObjectExtensions.cs:146— PSObjectExtensions.ConvertTargetInfoProperty has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CommandLineBuilder.LoadModules (cognitive 16) src/PSRule/Pipeline/CommandLineBuilder.cs:62— CommandLineBuilder.LoadModules has cognitive complexity 16 (threshold 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.
LanguageScope.Dispose (cognitive 16) src/PSRule/Runtime/LanguageScope.cs:193— LanguageScope.Dispose has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ModuleCommand.InstallVersionAsync (cognitive 16) src/PSRule.CommandLine/Commands/ModuleCommand.cs:529— ModuleCommand.InstallVersionAsync has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
createOptionsFile.createOptionsFile (cognitive 16) src/vscode-ps-rule/commands/createOptionsFile.ts:15— createOptionsFile.createOptionsFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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.
Change-coupling hub: PipelineBuilder.cs → GetRuleHelpPipeline.cs, GetRulePipeline.cs, PipelineInputStream.cs, PipelineWriter.cs, RulePipeline.cs src/PSRule/Pipeline/PipelineBuilder.cs— `src/PSRule/Pipeline/PipelineBuilder.cs` changes together with 5 other files — `src/PSRule/Pipeline/GetRuleHelpPipeline.cs`, `src/PSRule/Pipeline/GetRulePipeline.cs`, `src/PSRule/Pipeline/PipelineInputStream.cs`, `src/PSRule/Pipeline/PipelineWriter.cs`, `src/PSRule/Pipeline/RulePipeline.cs` — 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.
D4 · Code Duplication· Near-duplicate member family (3 members, 40 shared lines) · ×1
Near-duplicate member family (3 members, 40 shared lines) src/PSRule/Definitions/Rules/RuleExtensions.cs:23— src/PSRule/Definitions/Rules/RuleExtensions.cs:23-115 | src/PSRule/Definitions/Rules/RuleExtensions.cs:158-281 | src/PSRule/Definitions/Rules/RuleExtensions.cs:284-407 — These 3 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:459— src/PSRule.Types/Data/DateVersion.cs:459-502 | src/PSRule.Types/Data/SemanticVersion.cs:660-699 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) src/PSRule/Runtime/Assert.cs:443— src/PSRule/Runtime/Assert.cs:443-465 | src/PSRule/Runtime/Assert.cs:478-499 | src/PSRule/Runtime/Assert.cs:505-527 | src/PSRule/Runtime/Assert.cs:540-561 | src/PSRule/Runtime/Assert.cs:567-589 | src/PSRule/Runtime/Assert.cs:602-623 | src/PSRule/Runtime/Assert.cs:1307-1325 — These 7 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 7 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 7 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) src/PSRule/Runtime/Assert.cs:895— src/PSRule/Runtime/Assert.cs:895-906 | src/PSRule/Runtime/Assert.cs:914-925 | src/PSRule/Runtime/Assert.cs:933-944 | src/PSRule/Runtime/Assert.cs:952-963 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (108 corresponding lines) · ×1
Edited copy of a member (108 corresponding lines) src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:16— src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:16-123 | src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs:16-123 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (125 corresponding lines) · ×1
Edited copy of a member (125 corresponding lines) src/PSRule.Tool/ClientBuilder.cs:237— src/PSRule.Tool/ClientBuilder.cs:237-370 | src/PSRule.EditorServices/ClientBuilder.cs:217-341 — These two members are one piece of code written twice and then edited apart: 125 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (100 corresponding lines) · ×1
Edited copy of a member (100 corresponding lines) src/PSRule.Tool/ClientBuilder.cs:47— src/PSRule.Tool/ClientBuilder.cs:47-171 | src/PSRule.EditorServices/ClientBuilder.cs:46-145 — These two members are one piece of code written twice and then edited apart: 100 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) src/PSRule.Types/Options/FormatOption.cs:54— src/PSRule.Types/Options/FormatOption.cs:54-106 | src/PSRule.Types/Options/FormatOption.cs:110-162 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) src/PSRule.Types/Converters/TypeConverter.cs:93— src/PSRule.Types/Converters/TypeConverter.cs:93-122 | src/PSRule/Common/ExpressionHelpers.cs:234-263 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:88— src/PSRule.Types/Data/DateVersion.cs:88-123 | src/PSRule.Types/Data/SemanticVersion.cs:102-137 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:912— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:912-938 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:941-967 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:24— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:24-56 | src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:25-58 | src/PSRule/Common/YamlConverters.cs:84-110 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 35+ corresponding lines) · ×1
Edited copies of one member (4 members, 35+ corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:460— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:460-494 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:497-531 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:534-568 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:571-605 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 25+ corresponding lines) · ×1
Edited copies of one member (8 members, 25+ corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:608— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:608-636 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:639-667 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:670-698 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:701-729 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:732-760 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:763-791 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:970-994 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:997-1022 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) src/PSRule.Types/Converters/Json/ResourceIdReferenceJsonConverter.cs:22— src/PSRule.Types/Converters/Json/ResourceIdReferenceJsonConverter.cs:22-49 | src/PSRule/Converters/Yaml/ResourceIdReferenceYamlConverter.cs:24-51 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) src/PSRule/Pipeline/PipelineReciever.cs:236— src/PSRule/Pipeline/PipelineReciever.cs:236-263 | src/PSRule/Pipeline/PipelineReciever.cs:266-291 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:89— src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:89-112 | src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:126-145 | src/PSRule/Runtime/ObjectPath/PathExpressionBuilder.cs:186-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) src/PSRule/Help/ResourceHelpLexer.cs:11— src/PSRule/Help/ResourceHelpLexer.cs:11-41 | src/PSRule/Help/RuleHelpLexer.cs:16-48 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) src/PSRule.Types/Converters/TypeConverter.cs:154— src/PSRule.Types/Converters/TypeConverter.cs:154-177 | src/PSRule/Common/ExpressionHelpers.cs:338-362 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) src/PSRule.Types/Data/DateVersion.cs:602— src/PSRule.Types/Data/DateVersion.cs:602-633 | src/PSRule.Types/Data/SemanticVersion.cs:832-860 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) src/PSRule/Runtime/Assert.cs:258— src/PSRule/Runtime/Assert.cs:258-273 | src/PSRule/Runtime/Assert.cs:279-302 | src/PSRule/Runtime/Assert.cs:308-330 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) src/PSRule/Definitions/Baselines/BaselineExtensions.cs:19— src/PSRule/Definitions/Baselines/BaselineExtensions.cs:19-44 | src/PSRule/Definitions/Conventions/ConventionExtensions.cs:19-45 | src/PSRule/Definitions/Selectors/SelectorExtensions.cs:34-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:830— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:830-846 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:849-865 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:868-886 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) src/PSRule/Runtime/Assert.cs:367— src/PSRule/Runtime/Assert.cs:367-383 | src/PSRule/Runtime/Assert.cs:389-402 | src/PSRule/Runtime/Assert.cs:422-437 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) src/PSRule/Host/HostHelper.cs:47— src/PSRule/Host/HostHelper.cs:47-54 | src/PSRule/Host/HostHelper.cs:57-64 | src/PSRule/Pipeline/Runs/RunCollectionBuilder.cs:267-274 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) src/PSRule/Runtime/LoggerExtensions.cs:249— src/PSRule/Runtime/LoggerExtensions.cs:249-261 | src/PSRule/Runtime/LoggerExtensions.cs:267-279 | src/PSRule/Runtime/LoggerExtensions.cs:303-315 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) src/PSRule/Runtime/LoggerExtensions.cs:55— src/PSRule/Runtime/LoggerExtensions.cs:55-72 | src/PSRule/Runtime/LoggerExtensions.cs:78-95 | src/PSRule/Runtime/LoggerExtensions.cs:161-178 | src/PSRule/Runtime/LoggerExtensions.cs:184-201 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) src/PSRule/Definitions/Expressions/Functions.cs:63— src/PSRule/Definitions/Expressions/Functions.cs:63-75 | src/PSRule/Definitions/Expressions/Functions.cs:78-90 | src/PSRule/Definitions/Expressions/Functions.cs:93-105 | src/PSRule/Definitions/Expressions/Functions.cs:191-202 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (84–86 lines × 2) src/PSRule.EditorServices/ClientBuilder.cs:217— src/PSRule.EditorServices/ClientBuilder.cs:217-302 | src/PSRule.Tool/ClientBuilder.cs:237-320 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.EditorServices/ClientBuilder.cs:217` 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 (81–83 lines × 2) src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:16— src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:16-96 | src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs:16-98 — before extracting anything, compare `src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs` and `src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:16` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (40–48 lines × 2) src/PSRule.EditorServices/ClientBuilder.cs:302— src/PSRule.EditorServices/ClientBuilder.cs:302-341 | src/PSRule.Tool/ClientBuilder.cs:323-370 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.EditorServices/ClientBuilder.cs:302` 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 (121 lines × 2) src/PSRule/Definitions/Rules/RuleExtensions.cs:161— src/PSRule/Definitions/Rules/RuleExtensions.cs:161-281 | src/PSRule/Definitions/Rules/RuleExtensions.cs:287-407 — 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 `src/PSRule/Definitions/Rules/RuleExtensions.cs:161` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–41 lines × 2) src/PSRule/Configuration/PSRuleOption.cs:130— src/PSRule/Configuration/PSRuleOption.cs:130-170 | src/PSRule/Pipeline/OptionScope.cs:62-78 — 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 (25 lines × 2) src/PSRule/Definitions/Rules/RuleExtensions.cs:30— src/PSRule/Definitions/Rules/RuleExtensions.cs:30-54 | src/PSRule/Definitions/Rules/RuleExtensions.cs:74-98 — 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 `src/PSRule/Definitions/Rules/RuleExtensions.cs:30` 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 (23 lines × 2) src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:101— src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:101-123 | src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs:101-123 — before extracting anything, compare `src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs` and `src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 3) src/PSRule/Runtime/Assert.cs:444— src/PSRule/Runtime/Assert.cs:444-459 | src/PSRule/Runtime/Assert.cs:506-521 | src/PSRule/Runtime/Assert.cs:568-583 — 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 `src/PSRule/Runtime/Assert.cs:444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) src/PSRule/Pipeline/GetTargetPipelineBuilder.cs:43— src/PSRule/Pipeline/GetTargetPipelineBuilder.cs:43-58 | src/PSRule/Pipeline/InvokePipelineBuilderBase.cs:29-44 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:67— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:67-81 | src/PSRule/Common/YamlConverters.cs:120-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 3) src/PSRule/Runtime/Assert.cs:480— src/PSRule/Runtime/Assert.cs:480-493 | src/PSRule/Runtime/Assert.cs:542-555 | src/PSRule/Runtime/Assert.cs:604-617 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Runtime/Assert.cs:480` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–15 lines × 2) src/PSRule/Emitters/YamlEmitter.cs:61— src/PSRule/Emitters/YamlEmitter.cs:61-75 | src/PSRule/Emitters/YamlEmitter.cs:110-123 — 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 `src/PSRule/Emitters/YamlEmitter.cs:61` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 6) src/PSRule/Definitions/Rules/RuleExtensions.cs:32— src/PSRule/Definitions/Rules/RuleExtensions.cs:32-42 | src/PSRule/Definitions/Rules/RuleExtensions.cs:76-86 | src/PSRule/Definitions/Rules/RuleExtensions.cs:183-193 | src/PSRule/Definitions/Rules/RuleExtensions.cs:240-250 | src/PSRule/Definitions/Rules/RuleExtensions.cs:309-319 | src/PSRule/Definitions/Rules/RuleExtensions.cs:366-376 — all 6 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 `src/PSRule/Definitions/Rules/RuleExtensions.cs:32` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `LegacyRunspaceContext` in one and `IRunBuilderContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 4) src/PSRule/Definitions/Rules/RuleExtensions.cs:211— src/PSRule/Definitions/Rules/RuleExtensions.cs:211-222 | src/PSRule/Definitions/Rules/RuleExtensions.cs:268-279 | src/PSRule/Definitions/Rules/RuleExtensions.cs:337-348 | src/PSRule/Definitions/Rules/RuleExtensions.cs:394-405 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/PSRule/Definitions/Rules/RuleExtensions.cs:211` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:28— src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:28-38 | src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs:29-39 | src/PSRule/Common/YamlConverters.cs:88-97 — before extracting anything, compare `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs` and `src/PSRule.Types/Converters/Yaml/StringMapYamlConverter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `src/PSRule.Types/Converters/Yaml/StringArrayMapConverter.cs:28` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 6) src/PSRule/Runtime/Assert.cs:669— src/PSRule/Runtime/Assert.cs:669-674 | src/PSRule/Runtime/Assert.cs:693-698 | src/PSRule/Runtime/Assert.cs:715-720 | src/PSRule/Runtime/Assert.cs:735-740 | src/PSRule/Runtime/Assert.cs:755-760 | src/PSRule/Runtime/Assert.cs:775-780 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 4) src/PSRule/Runtime/Assert.cs:479— src/PSRule/Runtime/Assert.cs:479-484 | src/PSRule/Runtime/Assert.cs:541-546 | src/PSRule/Runtime/Assert.cs:603-608 | src/PSRule/Runtime/Assert.cs:1308-1313 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 4) src/PSRule/Runtime/Assert.cs:896— src/PSRule/Runtime/Assert.cs:896-902 | src/PSRule/Runtime/Assert.cs:915-921 | src/PSRule/Runtime/Assert.cs:934-940 | src/PSRule/Runtime/Assert.cs:953-959 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) src/PSRule/Definitions/Expressions/LanguageExpressions.cs:616— src/PSRule/Definitions/Expressions/LanguageExpressions.cs:616-622 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:678-684 | src/PSRule/Definitions/Expressions/LanguageExpressions.cs:740-746 — 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 `src/PSRule/Definitions/Expressions/LanguageExpressions.cs:616` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 5) src/PSRule/Runtime/Assert.cs:630— src/PSRule/Runtime/Assert.cs:630-635 | src/PSRule/Runtime/Assert.cs:648-653 | src/PSRule/Runtime/Assert.cs:1104-1109 | src/PSRule/Runtime/Assert.cs:1149-1154 | src/PSRule/Runtime/Assert.cs:1179-1184 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `false` to `bool requireLetters =` in one and `bool caseSensitive =` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (47 lines × 3) src/PSRule/Definitions/Expressions/ExpressionException.cs:17— src/PSRule/Definitions/Expressions/ExpressionException.cs:17-66 | src/PSRule/Definitions/Expressions/ExpressionParseException.cs:18-64 | src/PSRule/Definitions/Expressions/ExpressionReferenceException.cs:18-64 — 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.
Duplicated block (11 lines × 2) src/PSRule.Types/Definitions/StringMap_T.cs:156— src/PSRule.Types/Definitions/StringMap_T.cs:156-166 | src/PSRule/Common/KeyMapDictionary.cs:216-226 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 4) src/PSRule/Emitters/JsonEmitter.cs:111— src/PSRule/Emitters/JsonEmitter.cs:111-115 | src/PSRule/Emitters/MarkdownEmitter.cs:98-102 | src/PSRule/Emitters/PowerShellDataEmitter.cs:106-110 | src/PSRule/Emitters/YamlEmitter.cs:91-95 — 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. 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.
Hollow method — returns a constant without doing the work src/PSRule/Definitions/Expressions/LanguageExpressions.cs:1207— `Invalid` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body — does nothing with its inputs src/PSRule/Pipeline/PipelineBuilderBase.cs:502— `ConfigureBinding` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
R10 · Code Duplication· Duplicated block with local edits (40 matched lines × 2 locations) · ×1
Duplicated block with local edits (40 matched lines × 2 locations) src/vscode-ps-rule/dependencyLens.ts:26— src/vscode-ps-rule/dependencyLens.ts:26 · src/vscode-ps-rule/docLens.ts:38 — the two spans are one implementation copied and then locally edited — 301 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (38 lines × 2 locations) src/vscode-ps-rule/commands/initLock.ts:14— src/vscode-ps-rule/commands/initLock.ts:14 · src/vscode-ps-rule/commands/restore.ts:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (14 lines × 2 locations) src/vscode-ps-rule/extension.ts:255— src/vscode-ps-rule/extension.ts:255 · src/vscode-ps-rule/extension.ts:285 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) src/vscode-ps-rule/commands/createOptionsFile.ts:32— src/vscode-ps-rule/commands/createOptionsFile.ts:32 · src/vscode-ps-rule/commands/createOrEditDocumentation.ts:30 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) src/vscode-ps-rule/utils.ts:66— src/vscode-ps-rule/utils.ts:66 · src/vscode-ps-rule/utils.ts:87 — 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.
Complex function upgradeDependency (cyclomatic 19, cognitive 30) src/vscode-ps-rule/commands/upgradeDependency.ts:16— upgradeDependency has cyclomatic complexity 19 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getCmdTooling (cyclomatic 18, cognitive 21) src/vscode-ps-rule/runner.ts:30— getCmdTooling has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createOptionsFile (cyclomatic 12, cognitive 16) src/vscode-ps-rule/commands/createOptionsFile.ts:15— createOptionsFile has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getOptionFile (cyclomatic 11, cognitive 9) src/vscode-ps-rule/commands/openOptionsFile.ts:30— getOptionFile has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R6 · Tooling· This package's lint script runs in no CI job · ×1
This package's lint script runs in no CI job package.json:549— The root package declares the lint script `zzz_lint` (`eslint . --ext .ts,.tsx`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run zzz_lint` in `.` (or the workspace's task runner).
Third-party script without Subresource Integrity overrides/partials/giscus.html:11— `https://giscus.app/client.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 2 such include(s) across the repository's markup.
X2 · Cancellation propagation· Async delegate without CancellationToken · ×1
Async delegate without CancellationToken: TryAdapter src/PSRule.Tool/Adapters/AdapterBuilder.cs:22— Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`).
X2 · Cancellation propagation· Async method without CancellationToken · ×1
Async method without CancellationToken: GetSourceRepositoryAsync src/PSRule.CommandLine/Commands/ModuleCommand.cs:620— No CancellationToken parameter — this work can't be stopped early once started.
Duplicated predicate src/PSRule.Types/Data/DateVersion.cs:647— `!EOF && IsPrereleaseChar(_Current, ref numeric)` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule/Pipeline/AssertPipelineBuilder.cs:59— `!RequireModules() || !RequireWorkspaceCapabilities() || !RequireSources()` appears character-identically in 2 files — src/PSRule/Pipeline/AssertPipelineBuilder.cs, src/PSRule/Pipeline/InvokePipelineBuilderBase.cs. 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 src/PSRule.Types/Data/DateVersion.cs:223— `!_IncludePrerelease && Stable && !IsStable(prid)` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs:93— `!_RaisedUsingInvariantCulture && (cultures == null || cultures.Length == 0)` appears character-identically in 3 files — src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs, src/PSRule/Pipeline/Runs/RunCollectionBuilderContext.cs, src/PSRule/Runtime/LegacyRunspaceContext.cs. 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 src/PSRule.Types/Data/KeyMap.cs:61— `!string.IsNullOrEmpty(key) && _Map.TryGetValue(key, out var value)` appears character-identically in 2 files — src/PSRule.Types/Data/KeyMap.cs, src/PSRule.Types/Data/StringArrayMap.cs. 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 src/PSRule.Types/Data/DateVersion.cs:686— `(_Current == SPACE || _Current == PIPE) && !EOF` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule.Types/Data/DateVersion.cs:764— `(nc >= 0x41 && nc <= 0x5a) || (nc >= 0x61 && nc <= 0x7a)` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:26— `Environment.TryString("INPUT_BASELINE", out var baseline) && !string.IsNullOrWhiteSpace(baseline)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:19— `Environment.TryString("INPUT_INCLUDEPATH", out var includePath) && !string.IsNullOrWhiteSpace(includePath)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:47— `Environment.TryString("INPUT_INPUTPATH", out var inputPath) && !string.IsNullOrWhiteSpace(inputPath)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:68— `Environment.TryString("INPUT_OPTION", out var option) && !string.IsNullOrWhiteSpace(option)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:75— `Environment.TryString("INPUT_OUTCOME", out var outcome) && !string.IsNullOrWhiteSpace(outcome)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:82— `Environment.TryString("INPUT_OUTPUTFORMAT", out var outputFormat) && !string.IsNullOrWhiteSpace(outputFormat)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:89— `Environment.TryString("INPUT_OUTPUTPATH", out var outputPath) && !string.IsNullOrWhiteSpace(outputPath)` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:33— `Environment.TryStringArray("INPUT_CONVENTIONS", [COMMA], out var conventions) && conventions != null` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:54— `Environment.TryStringArray("INPUT_FORMATS", [COMMA], out var formats) && formats != null` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs:106— `Environment.TryStringArray("INPUT_MODULES", [COMMA], out var modules) && modules != null` appears character-identically in 2 files — src/PSRule.Tool/Adapters/AzurePipelinesAdapter.cs, src/PSRule.Tool/Adapters/GitHubActionsAdapter.cs. 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 src/PSRule.Types/Data/DateVersion.cs:575— `HasFlag(FLAG_PRE) || HasFlag(FLAG_PRERELEASE)` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule.Types/Data/DateVersion.cs:726— `IsVersionDigit(c) || IsSeparator(c) || IsWildcard(c) || IsIdentifier(c)` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule/Commands/RuleKeyword.cs:98— `LegacyRunspaceContext.CurrentThread.IsScope(RunspaceScope.Rule) || LegacyRunspaceContext.CurrentThread.IsScope(RunspaceScope.Precondition)` appears character-identically in 2 files — src/PSRule/Commands/RuleKeyword.cs, src/PSRule/Runtime/Assert.cs. 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 src/PSRule/Rules/RuleRecord.cs:219— `Outcome == RuleOutcome.Pass || Outcome == RuleOutcome.None` appears character-identically in 2 files — src/PSRule/Rules/RuleRecord.cs, src/PSRule/Rules/RuleSummaryRecord.cs. 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 src/PSRule.Types/Data/DateVersion.cs:402— `Prerelease != null && !Prerelease.Stable` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule/Pipeline/GetTargetPipelineBuilder.cs:50— `TryChangedFiles(out var files) && files != null` appears character-identically in 2 files — src/PSRule/Pipeline/GetTargetPipelineBuilder.cs, src/PSRule/Pipeline/InvokePipelineBuilderBase.cs. 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 src/PSRule.Types/Data/DateVersion.cs:90— `_Constraints == null || _Constraints.Count == 0` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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 src/PSRule.Types/Data/DateVersion.cs:108— `_Constraints[i].Join == JoinOperator.Or && ++i < _Constraints.Count` appears character-identically in 2 files — src/PSRule.Types/Data/DateVersion.cs, src/PSRule.Types/Data/SemanticVersion.cs. 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.
redundant comment src/PSRule.CommandLine/ClientHost.cs:139— "If the error is a pipeline exception, set the last error code." repeats the code it sits on: 6 of its 6 words (error, pipeline, exception, set, last, code) are already in `_Context.SetLastErrorCode(pipelineException.EventId);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.CommandLine/Commands/ModuleCommand.cs:116— "Find the ideal version." repeats the code it sits on: 3 of its 3 words (find, ideal, version) are already in `var idealVersion = await FindVersionAsync(includeModule, moduleConstraint, null, null, cancellationToken);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.CommandLine/Commands/ModuleCommand.cs:256— "Get a constraint if set from options." repeats the code it sits on: 4 of its 4 words (get, constraint, set, options) are already in `var moduleConstraint = requires.TryGetValue(module, out var c) ? c : ModuleConstraint.Any(module, includePrerelease: ope …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.CommandLine/Commands/ModuleCommand.cs:269— "Find the ideal version." repeats the code it sits on: 3 of its 3 words (find, ideal, version) are already in `var idealVersion = await FindVersionAsync(module, moduleConstraint, targetVersion, null, cancellationToken);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.CommandLine/Commands/ModuleCommand.cs:368— "Find the ideal version." repeats the code it sits on: 3 of its 3 words (find, ideal, version) are already in `var idealVersion = await FindVersionAsync(kv.Key, moduleConstraint, null, null, cancellationToken);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.EditorServices/Handlers/ConfigurationChangeHandler.cs:31— "Extract PSRule configuration from the settings" repeats the code it sits on: 5 of its 5 words (extract, ps, rule, configuration, settings) are already in `var psruleConfig = ExtractPSRuleConfiguration(settings);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule.EditorServices/Handlers/WorkspaceChangeWatcherHandler.cs:63— "Get the configured options path from context" repeats the code it sits on: 4 of its 5 words (configured, options, path, context) are already in `var configuredPath = _Context.OptionsPath;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Help/MarkdownReader.cs:219— "Set the line ending" repeats the code it sits on: 3 of its 3 words (set, line, ending) are already in `var ending = GetEnding(_Stream.SkipLineEnding(max: 2));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Host/HostState.cs:61— "Set execution policy" repeats the code it sits on: 3 of its 3 words (set, execution, policy) are already in `SetExecutionPolicy(state, executionPolicy: Microsoft.PowerShell.ExecutionPolicy.RemoteSigned);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Host/HostState.cs:64— "Set the language mode." repeats the code it sits on: 3 of its 3 words (set, language, mode) are already in `state.LanguageMode = languageMode == LanguageMode.FullLanguage ? PSLanguageMode.FullLanguage : PSLanguageMode.Constraine …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Pipeline/Output/SarifBuilder.cs:141— "Add the result to the run." repeats the code it sits on: 3 of its 3 words (add, result, run) are already in `runData.Results.Add(result);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Pipeline/Output/SarifBuilder.cs:297— "Get the rule descriptor." repeats the code it sits on: 3 of its 3 words (get, rule, descriptor) are already in `var id = record.Ref ?? record.RuleId;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Pipeline/Output/SarifBuilder.cs:301— "Get the tool component." repeats the code it sits on: 3 of its 3 words (get, tool, component) are already in `if (string.IsNullOrEmpty(record.Info.ModuleName) || !_Extensions.TryGetValue(record.Info.ModuleName, out var toolCompone …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Pipeline/SourcePipelineBuilder.cs:54— "Include paths from options" repeats the code it sits on: 3 of its 3 words (include, paths, options) are already in `if (!_UseDefaultPath && option?.Include != null)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/PSRule/Runtime/Binding/TargetBindingContext.cs:55— "Use qualified name" repeats the code it sits on: 3 of its 3 words (use, qualified, name) are already in `if (_UseQualifiedName)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/client.ts:36— "Create the language client." repeats the code it sits on: 3 of its 3 words (create, language, client) are already in `const client = new lsp.LanguageClient(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/client.ts:44— "Get current options path" repeats the code it sits on: 4 of its 4 words (get, current, options, path) are already in `this._currentOptionsPath = configuration.get().optionsPath;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/client.ts:50— "Register proposed features" repeats the code it sits on: 3 of its 3 words (register, proposed, features) are already in `client.registerProposedFeatures();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/extension.ts:236— "Get last version" repeats the code it sits on: 3 of its 3 words (get, last, version) are already in `const lastVersion = context.globalState.get(extensionVersionKey);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/tasks.ts:76— "Register a task provider" repeats the code it sits on: 3 of its 3 words (register, task, provider) are already in `this.providerRegistration = vscode.tasks.registerTaskProvider(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/vscode-ps-rule/utils.ts:133— "Check if the language server binary exists." repeats the code it sits on: 4 of its 5 words (check, language, server, exists) are already in `if (!existsSync(languageServerPath))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/PSRule.EditorServices.Tests/HotReloadTests.cs:30— "Create client context" repeats the code it sits on: 3 of its 3 words (create, client, context) are already in `var context = CreateClientContext(optionsPath, testDir);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/PSRule.EditorServices.Tests/HotReloadTests.cs:78— "Create client context with first options" repeats the code it sits on: 4 of its 5 words (create, client, context, options) are already in `var context = CreateClientContext(optionsPath1, testDir);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/PSRule.EditorServices.Tests/HotReloadTests.cs:114— "Create client context with custom options path" repeats the code it sits on: 5 of its 6 words (create, client, context, options, path) are already in `var context = CreateClientContext(optionsPath, testDir);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/PSRule.EditorServices.Tests/HotReloadTests.cs:153— "Create client context with first options" repeats the code it sits on: 4 of its 5 words (create, client, context, options) are already in `var context = CreateClientContext(optionsPath1, testDir);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Commented-out code src/PSRule.CommandLine/Commands/ModuleCommand.cs:67— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule.CommandLine/Commands/ModuleCommand.cs:110— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule.Types/Data/ITargetObjectExtensions.cs:26— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule.Types/Data/ITargetObjectExtensions.cs:45— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Commands/ExportConventionCommand.cs:69— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Commands/NewRuleDefinitionCommand.cs:109— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/MarkdownEmitter.cs:91— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/MarkdownEmitter.cs:92— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/MarkdownEmitter.cs:93— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/MarkdownEmitter.cs:94— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/PowerShellDataEmitter.cs:99— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/PowerShellDataEmitter.cs:100— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/PowerShellDataEmitter.cs:101— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/PowerShellDataEmitter.cs:102— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/YamlEmitter.cs:70— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/YamlEmitter.cs:87— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/YamlEmitter.cs:157— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Emitters/YamlEmitter.cs:158— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Host/HostHelper.cs:179— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Host/HostHelper.cs:274— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/PSRule/Host/HostHelper.cs:340— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
P10 · Library API & versioning· Public type used only inside its own library · ×12
Public type used only inside its own library src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19— `PSRule.EditorServices.Handlers.RunAnalysisCommandHandler` (src/PSRule.EditorServices/Handlers/RunAnalysisCommandHandler.cs:19) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule.EditorServices/Handlers/UpgradeDependencyCommandHandler.cs:18— `PSRule.EditorServices.Handlers.UpgradeDependencyCommandHandler` (src/PSRule.EditorServices/Handlers/UpgradeDependencyCommandHandler.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule.EditorServices/Handlers/WorkspaceChangeWatcherHandler.cs:16— `PSRule.EditorServices.Handlers.WorkspaceChangeWatcherHandler` (src/PSRule.EditorServices/Handlers/WorkspaceChangeWatcherHandler.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.EditorServices.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Common/ReadOnlyHashtable.cs:11— `PSRule.ReadOnlyHashtable` (src/PSRule/Common/ReadOnlyHashtable.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Configuration/PipelineHook.cs:9— `PSRule.Configuration.BindTargetName` (src/PSRule/Configuration/PipelineHook.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Definitions/IScopeConfig.cs:13— `PSRule.Definitions.IScopeConfig` (src/PSRule/Definitions/IScopeConfig.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Definitions/ResourceObject.cs:13— `PSRule.Definitions.ResourceObject` (src/PSRule/Definitions/ResourceObject.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Definitions/ResultReason.cs:11— `PSRule.Definitions.ResultReason` (src/PSRule/Definitions/ResultReason.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Rules/RuleSummaryRecord.cs:15— `PSRule.Rules.RuleSummaryRecord` (src/PSRule/Rules/RuleSummaryRecord.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Runtime/LocalizedData.cs:13— `PSRule.Runtime.LocalizedData` (src/PSRule/Runtime/LocalizedData.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Runtime/PSRule.cs:18— `PSRule.Runtime.PSRule` (src/PSRule/Runtime/PSRule.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library src/PSRule/Runtime/Rule.cs:11— `PSRule.Runtime.Rule` (src/PSRule/Runtime/Rule.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `PSRule.Benchmark`, `PSRule.CommandLine`, `PSRule.CommandLine.Tests`, `PSRule.EditorServices`, `PSRule.EditorServices.Tests`, `PSRule.SDK`, `PSRule.Tests`, `PSRule.Tool`, `PSRule.Tool.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Documentation: no build, run or usage example src/PSRule/README.md:1— `PSRule` is a package (`PackageId`) and neither `src/PSRule/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.Badges/README.md:1— `PSRule.Badges` is a package (`PackageId`) and neither `src/PSRule.Badges/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.Benchmark/README.md:1— `PSRule.Benchmark` is an executable (`OutputType Exe`) and neither `src/PSRule.Benchmark/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.BuildTool/README.md:1— `PSRule.BuildTool` is an executable (`OutputType Exe`) and neither `src/PSRule.BuildTool/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.EditorServices/README.md:1— `PSRule.EditorServices` is an executable (`OutputType Exe`) and neither `src/PSRule.EditorServices/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.SDK/README.md:1— `PSRule.SDK` is a package (`PackageId`) and neither `src/PSRule.SDK/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.Tool/README.md:1— `PSRule.Tool` is an executable (`OutputType Exe`) and neither `src/PSRule.Tool/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example src/PSRule.Types/README.md:1— `PSRule.Types` is a package (`PackageId`) and neither `src/PSRule.Types/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Silent fallback default on parse failure src/PSRule.Types/Definitions/ResourceId.cs:128— `Parse` falls back to `default` when `TryParse(id, kind, out var value) && value != null` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/PSRule/Converters/Json/SemanticVersionJsonConverter.cs:16— `ReadJson` falls back to `default` when `reader.TokenType == JsonToken.String && SemanticVersion.TryParseVersion(reader.V…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/PSRule/Pipeline/ModulePathComparer.cs:19— `Compare` falls back to `0` when `SemanticVersion.TryParseVersion(y_name, out _)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure REDACTED:114— `VisitFixture` falls back to `"Failure"` when `fixture.Success` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure REDACTED:137— `VisitTestCase` falls back to `"Failure"` when `testCase.Success` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/PSRule.CommandLine/StringExtensions.cs:36— `ToOutputFormat` falls back to `OutputFormat.None` when `value != null && Enum.TryParse<OutputFormat>(value, true, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Deprecated: System.Collections.Immutable src/PSRule/packages.lock.json:594— System.Collections.Immutable 5.0.0 — Other,Legacy. It is resolved transitively in src/PSRule/packages.lock.json: no project of this repository references it directly, so the move is on the reference that pulls it in.
Deprecated: System.Collections.Immutable src/PSRule.SDK/packages.lock.json:520— System.Collections.Immutable 5.0.0 — Other,Legacy. It is resolved transitively in src/PSRule.SDK/packages.lock.json: no project of this repository references it directly, so the move is on the reference that pulls it in.
Deprecated: glob REDACTED:1898— glob 10.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: prebuild-install REDACTED:5716— prebuild-install 7.1.3 is resolved in REDACTED and is marked deprecated by its publisher: "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: whatwg-encoding REDACTED:7087— whatwg-encoding 3.1.1 is resolved in REDACTED and is marked deprecated by its publisher: "Use @exodus/bytes instead for a more spec-conformant and faster implementation". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Silent fallback default in catch src/PSRule/Pipeline/InvokePipelineBuilderBase.cs:141— `IsBlocked` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/PSRule.Tool/Program.cs:85— `WaitForDebuggerAsync` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/PSRule.EditorServices/Commands/ListenCommand.cs:124— `WaitForDebuggerAsync` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Fat interface: IExecutionOption (16 members) src/PSRule.Types/Options/IExecutionOption.cs:12— `IExecutionOption` declares 16 members: `Break`, `DuplicateResourceId`, `HashAlgorithm`, `LanguageMode`, `InitialSessionState`, `NoMatchingRules`, `NoValidInput`, `NoValidSources`, `RestrictScriptSource`, `SuppressionGroupExpired`, `RuleExcluded`, `RuleSuppressed`, `AliasReference`, `RuleInconclusive`, `InvariantCulture`, `UnprocessedObject`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ILanguageScope (16 members) src/PSRule/Runtime/ILanguageScope.cs:16— `ILanguageScope` declares 16 members: `Name`, `GetBindingComparer`, `Culture`, `Configure`, `TryConfigurationValue`, `WithFilter`, `GetFilter`, `AddService`, `ConfigureServices`, `GetService`, `GetEmitters`, `Bind`, `TryGetType`, `TryGetName`, `TryGetOverride`, `ToConfiguration`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
R7 · Dead Code· Write-only private field 'context' · ×2
Write-only private field 'context' src/vscode-ps-rule/dependencyLens.ts:35— This private field is assigned but never read: every reference in its class is a plain assignment, no string key or test reads it by name, and the instance never escapes as a whole (so nothing serialises or destructures it). The value it holds is dead state — read it where it was meant to take effect, or remove the field and its assignments.
Write-only private field 'context' src/vscode-ps-rule/docLens.ts:38— This private field is assigned but never read: every reference in its class is a plain assignment, no string key or test reads it by name, and the instance never escapes as a whole (so nothing serialises or destructures it). The value it holds is dead state — read it where it was meant to take effect, or remove the field and its assignments.
Thin analysable surface across projects: PSRule.MSBuild src/PSRule.MSBuild/PSRule.MSBuild.csproj— 1 project(s) carry only a thin slice of real code; `PSRule.MSBuild` has 29 significant line(s). The mean analysable-surface weight is 83 %; this project lowers Solution Shape by about 1.4 point(s). Consolidate it or grow it into a substantial, well-scoped assembly.
No ADRs found src/PSRule.BuildTool/PSRule.BuildTool.csproj:3— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `src/PSRule.BuildTool/PSRule.BuildTool.csproj` makes this repository a deployable product (line 3).
D21 · Naming Consistency· `GetRelatedResourceID` spells `ID` where 52 names in the project spell it `Id` · ×1
`GetRelatedResourceID` spells `ID` where 52 names in the project spell it `Id` src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs:369— 52 of 53 names in project PSRule spell the token `Id` (52 of 53; unit: names in project PSRule containing `Id`). Peers: RunspaceContextDiagnosticExtensions.DuplicateResourceId (src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:42); RunspaceContextDiagnosticExtensions.DuplicateResourceId(duplicateId) (src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:42); RunspaceContextDiagnosticExtensions.SuppressionGroupExpired(suppressionGroupId) (src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:47); RunspaceContextDiagnosticExtensions.RuleExcluded(ruleId) (src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:56); RunspaceContextDiagnosticExtensions.WarnAliasReference(targetId) (src/PSRule/Common/RunspaceContextDiagnosticExtensions.cs:87). Rename to `GetRelatedResourceId`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion src/PSRule/PSRule.csproj:1— `PSRule` overshoots its size bounds (35222 LoC, 136 public types across 15 namespaces). 1 of 15 project(s) overshoot their size bounds, lowering Project Cohesion to 8.7/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
R7 · Dead Code· Unused export 'docLensProvider' · ×1
Unused export 'docLensProvider' src/vscode-ps-rule/extension.ts:30— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'lockLensProvider' · ×1
Unused export 'lockLensProvider' src/vscode-ps-rule/extension.ts:31— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused private field 'sharedState' · ×1
Unused private field 'sharedState' src/vscode-ps-rule/tasks.ts:61— Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect.
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 18/20 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 6/8 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Null-forgiving operator (`!`) suppressions override nullable warnings — ~0.5 `!` suppressions per 1k syntax nodes — 94 suppression(s) across the 201978 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
doc comments repeat the names src/PSRule/Badges/BadgeType.cs:6— 5 of 310 documented parameters and 66 of 1411 summaries in `PSRule` only repeat the member or parameter name (e.g. "The type of badge." for `BadgeType`). 9 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names src/PSRule.CommandLine/ClientContext.cs:86— 0 of 20 documented parameters and 4 of 88 summaries in `PSRule.CommandLine` only repeat the member or parameter name (e.g. "The current working path." for `WorkingPath`). 17 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names src/PSRule.EditorServices/Commands/ListenCommand.cs:93— 0 of 0 documented parameters and 5 of 48 summaries in `PSRule.EditorServices` only repeat the member or parameter name (e.g. "Connect to a named pipe client stream." for `ConnectNamedPipeClientStreamAsync`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names tests/PSRule.EditorServices.Tests/LspServerTests.cs:10— 0 of 0 documented parameters and 1 of 3 summaries in `PSRule.EditorServices.Tests` only repeat the member or parameter name (e.g. "Tests for ." for `LspServerTests`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names tests/PSRule.Tests/BaseTests.cs:16— 0 of 0 documented parameters and 21 of 77 summaries in `PSRule.Tests` only repeat the member or parameter name (e.g. "A base class for all tests." for `BaseTests`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names src/PSRule.Types/Converters/Json/CapabilityOptionJsonConverter.cs:9— 6 of 171 documented parameters and 35 of 552 summaries in `PSRule.Types` only repeat the member or parameter name (e.g. "A JSON converter for ." for `CapabilityOptionJsonConverter`). 67 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names tests/PSRule.Types.Tests/Data/DateVersionTests.cs:6— 0 of 0 documented parameters and 3 of 13 summaries in `PSRule.Types.Tests` only repeat the member or parameter name (e.g. "Tests for and ." for `DateVersionTests`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names src/vscode-ps-rule/commands/createOptionsFile.ts:11— 0 of 26 documented parameters and 4 of 60 summaries in `vscode-ps-rule` only repeat the member or parameter name (e.g. "Create a new options file." for `createOptionsFile`). Delete the restating tags, or add what the name does not say.
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 85 file(s) — `src/PSRule.BuildTool/ClientContext.cs`, `src/PSRule.CommandLine/Commands/CommandResult.cs`, `src/PSRule.CommandLine/Commands/CommandResult_T.cs`, `src/PSRule.CommandLine/Console.cs`, `src/PSRule.CommandLine/Models/RunCommandOutput.cs`, … (+80 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1eaa7-e560-7a1d-8415-a944d083ef73 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 3 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 32 · Warnings: 521 · Recommendations: 153 · Info: 31 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 17:57 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.