- Reduce adapter business-logic noise: domain calls and mutations are weak evidence, fresh local decoding is not mutation, and decision context distinguishes policy from transport.
8
+
- Apply the business-logic package cap after suppression bookkeeping and report the hidden count with `business-logic-diagnostics-hidden` (warn).
9
+
10
+
### Added
11
+
12
+
- Report inline ignore rules that suppress nothing as `unused-ignore-directive` (warn), including directives beyond the business-logic reporting cap.
13
+
3
14
## v0.3.1
4
15
5
16
### Fixed
@@ -1,5 +1,16 @@
1
# Changelog
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Fixed
6
+
7
+
- Reduce adapter business-logic noise: domain calls and mutations are weak evidence, fresh local decoding is not mutation, and decision context distinguishes policy from transport.
8
+
- Apply the business-logic package cap after suppression bookkeeping and report the hidden count with `business-logic-diagnostics-hidden` (warn).
9
+
10
+
### Added
11
+
12
+
- Report inline ignore rules that suppress nothing as `unused-ignore-directive` (warn), including directives beyond the business-logic reporting cap.
13
+
3
## v0.3.1
14
## v0.3.1
4
15
5
### Fixed
16
### Fixed
MREADME.md+5-1
@@ -115,12 +115,16 @@ Business-logic diagnostics include a confidence level. `audit` mode reports find
115
115
| `no-infra-types-in-ports` | error | port interface method exposes an adapter or framework type |
| `suspicious-business-logic-in-adapter` | warn | adapter or entrypoint function looks like business logic |
118
+
| `business-logic-diagnostics-hidden` | warn | package exceeds the business-logic diagnostic cap; reports the hidden count |
119
+
| `unused-ignore-directive` | warn | inline ignore rule suppresses no diagnostics in this run |
118
120
| `no-local-fakes-for-ports` | warn | test defines a fake for a port that has a generated mock |
119
121
| `missing-generated-mock-for-port` | warn | port interface has no generated mock |
120
122
| `prefer-generated-mocks` | warn | usecase/core test imports a concrete adapter |
121
123
122
124
Type-leak rules look through pointers, slices, maps, channels, function signatures, inline structs, aliases, and generic type arguments.
123
125
126
+
Business-logic evidence treats domain calls and mutations as weak signals. Field-by-field construction of fresh local domain values is not mutation evidence. Domain predicates (methods or package-level boolean functions) driving decisions, numeric domain operands in ordering comparisons, guarded domain errors (other than common storage sentinels), and domain-derived set membership (including comma-ok checks) provide stronger evidence with branching. `String`/`Error` formatting and `IsZero` checks alone do not. Business keywords need decision context rather than merely a domain-typed parameter (except explicit computation/scoring or validation with mutation). The per-package cap applies after inline suppression; one `business-logic-diagnostics-hidden` warning states how many additional findings it hides.
127
+
124
128
The config is strict: unknown keys and unknown rule names are errors.
125
129
126
130
## Suppressing a finding
@@ -134,7 +138,7 @@ type Rows interface {
134
138
}
135
139
```
136
140
137
-
The directive covers its own line and the next one. It accepts a comma-separated rule list. A directive without a reason, or with an unknown rule, is reported as `invalid-ignore-directive`.
141
+
The directive covers its own line and the next one. It accepts a comma-separated rule list. A directive without a reason, or with an unknown rule, is reported as `invalid-ignore-directive`. Each listed rule that suppresses nothing in the current run produces `unused-ignore-directive` (warn by default), including when its rule is disabled or excluded. Business-logic suppression usage is tracked even beyond the package reporting cap. Unclassified, ignored, and generated files are not checked for unused directives.
138
142
139
143
## Standalone CLI
140
144
@@ -115,12 +115,16 @@ Business-logic diagnostics include a confidence level. `audit` mode reports find
115
| `no-infra-types-in-ports` | error | port interface method exposes an adapter or framework type |
115
| `no-infra-types-in-ports` | error | port interface method exposes an adapter or framework type |
| `suspicious-business-logic-in-adapter` | warn | adapter or entrypoint function looks like business logic |
117
| `suspicious-business-logic-in-adapter` | warn | adapter or entrypoint function looks like business logic |
118
+
| `business-logic-diagnostics-hidden` | warn | package exceeds the business-logic diagnostic cap; reports the hidden count |
119
+
| `unused-ignore-directive` | warn | inline ignore rule suppresses no diagnostics in this run |
118
| `no-local-fakes-for-ports` | warn | test defines a fake for a port that has a generated mock |
120
| `no-local-fakes-for-ports` | warn | test defines a fake for a port that has a generated mock |
119
| `missing-generated-mock-for-port` | warn | port interface has no generated mock |
121
| `missing-generated-mock-for-port` | warn | port interface has no generated mock |
120
| `prefer-generated-mocks` | warn | usecase/core test imports a concrete adapter |
122
| `prefer-generated-mocks` | warn | usecase/core test imports a concrete adapter |
121
123
122
Type-leak rules look through pointers, slices, maps, channels, function signatures, inline structs, aliases, and generic type arguments.
124
Type-leak rules look through pointers, slices, maps, channels, function signatures, inline structs, aliases, and generic type arguments.
123
125
126
+
Business-logic evidence treats domain calls and mutations as weak signals. Field-by-field construction of fresh local domain values is not mutation evidence. Domain predicates (methods or package-level boolean functions) driving decisions, numeric domain operands in ordering comparisons, guarded domain errors (other than common storage sentinels), and domain-derived set membership (including comma-ok checks) provide stronger evidence with branching. `String`/`Error` formatting and `IsZero` checks alone do not. Business keywords need decision context rather than merely a domain-typed parameter (except explicit computation/scoring or validation with mutation). The per-package cap applies after inline suppression; one `business-logic-diagnostics-hidden` warning states how many additional findings it hides.
127
+
124
The config is strict: unknown keys and unknown rule names are errors.
128
The config is strict: unknown keys and unknown rule names are errors.
125
129
126
## Suppressing a finding
130
## Suppressing a finding
@@ -134,7 +138,7 @@ type Rows interface {
134
}
138
}
135
```
139
```
136
140
137
-
The directive covers its own line and the next one. It accepts a comma-separated rule list. A directive without a reason, or with an unknown rule, is reported as `invalid-ignore-directive`.
141
+
The directive covers its own line and the next one. It accepts a comma-separated rule list. A directive without a reason, or with an unknown rule, is reported as `invalid-ignore-directive`. Each listed rule that suppresses nothing in the current run produces `unused-ignore-directive` (warn by default), including when its rule is disabled or excluded. Business-logic suppression usage is tracked even beyond the package reporting cap. Unclassified, ignored, and generated files are not checked for unused directives.