Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
71 lines (61 loc) · 4.27 KB
/
Copy pathphpcs.xml
File metadata and controls
71 lines (61 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="humaniq" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>
humaniq — SEMANTICS ONLY. Formatting belongs to php-cs-fixer via
conduction/coding-standard; see .php-cs-fixer.dist.php.
This file used to be a ~300-line standalone PEAR/Squiz ruleset carrying
four documented groups of "pre-existing debt" exclusions — 3,991
violations' worth. Most of that debt was FORMATTING, and it is now GONE
rather than merely excluded: php-cs-fixer owns those tokens (269 of 269
files reformatted in this change), so the sniffs that used to argue with
it are not in the ruleset to be excluded from.
What remains below is the debt that OUTLIVED the formatter, because it
is semantic and no formatter can close it. Every entry is measured, not
assumed: the counts are from `phpcs --report=source lib` against this
tree AFTER the reformat. Excluding a sniff here does NOT disable it for
new code in other apps, and each one is a burn-down item, not an amnesty.
</description>
<!-- The scanned tree MUST be declared here, not centrally: phpcs resolves
the file element relative to the ruleset that declares it.
`lib` only, matching all 15 other fleet apps. The previous ruleset also
named `tests`, but under a standard with most sniffs switched off, so
that was breadth without depth. Under the central ruleset `tests` adds
4,614 findings, almost all NamedParameters on PHPUnit builder calls. -->
<file>lib</file>
<rule ref="vendor/conduction/hydra-gates/quality-config/phpcs.xml">
<!-- 1,418 findings. The fleet mandates named parameters on internal
calls; humaniq predates the sniff and was never written to it. This is
a real, wanted rule and a genuinely large mechanical refactor —
1,418 call sites across NL payroll/tax services. Tracked as debt so
the OTHER ten sniffs in this ruleset start failing the build today
instead of waiting for that refactor to land. -->
<exclude name="CustomSniffs.Functions.NamedParameters.RequireNamedParameters"/>
<!-- 304 findings. DisallowInlineIf bans ternaries outright; humaniq's
payroll and tax calculation code uses short ternaries pervasively
and safely. Carried forward from the previous ruleset with the same
rationale — this is a style disagreement, not a defect signal. -->
<exclude name="Squiz.PHP.DisallowInlineIf.Found"/>
<!-- 139 findings. The 150-character limit is exceeded by descriptive
conditionals and array literals in domain logic; NL payroll/tax
field names run long (e.g. `$vrijeRuimteDeclared`). Wrapping these
is a cosmetic mass-edit, not a defect fix. Down from 189 before the
reformat — php-cs-fixer closed 50 of them on its own. -->
<exclude name="Generic.Files.LineLength.MaxExceeded"/>
<!-- 51 + 6 findings. Comment-CONTENT capitalisation. Not fixable by any
formatter; closing it means hand-editing prose across the tree. -->
<exclude name="Squiz.Commenting.InlineComment.NotCapital"/>
<exclude name="Generic.Commenting.DocComment.LongNotCapital"/>
<exclude name="Squiz.Commenting.InlineComment.SpacingAfterAtFunctionEnd"/>
<!-- 14 + 14 findings. Missing/ mismatched @param tags. Real debt, and
hand-written prose to close. The docblock PRESENCE requirement
(PEAR.Commenting.FunctionComment.Missing) is deliberately NOT
excluded — a method with no docblock at all still fails. -->
<exclude name="PEAR.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="PEAR.Commenting.FunctionComment.ParamNameNoMatch"/>
<!-- 11 findings. ImplicitTrue wants `if ($x === true)` over `if ($x)`.
Implicit truthy checks are idiomatic, safe PHP here — this is not
the `==` vs `===` coercion risk the parent sniff exists to catch,
and that part of ComparisonOperatorUsage stays ON. -->
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue"/>
</rule>
</ruleset>