You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use array with module field for allowed and blocked config
Replace map-based Allowed/Blocked config types with ordered slices of
AllowedModule/BlockedModule structs, each with an explicit module field.
Rename match_type to match-type to follow YAML kebab-case conventions.
| `allowed` | map | *(none)* | Modules that are permitted. When non-empty, anything not matched is blocked. |
97
-
| `blocked` | map | *(none)* | Modules that are explicitly blocked. |
96
+
| `allowed` | list | *(none)* | Modules that are permitted. When non-empty, anything not matched is blocked. |
97
+
| `blocked` | list | *(none)* | Modules that are explicitly blocked. |
98
98
| `local_replace_directives` | bool | `false` | Block any module whose `replace` directive points to a local filesystem path. Multi-module repo aware: sibling modules whose replacement path contains a matching `go.mod` are not blocked. |
99
99
100
-
#### `allowed` / `blocked` rule fields
100
+
#### `allowed` / `blocked` entry fields
101
101
102
102
| Field | Type | Description |
103
103
|---|---|---|
104
-
| `match_type` | `exact` \| `prefix` \| `regex` | How the rule key is matched against a module path. Defaults to `exact`. |
104
+
| `module` | string | The module path to match against. |
105
+
| `match-type` | `exact` \| `prefix` \| `regex` | How `module` is matched against dependency paths. Defaults to `exact`. |
105
106
| `version` | semver constraint string | Restricts the rule to specific versions (e.g. `<= 1.2.0`, `>= 2.0.0`). When omitted, all versions match. |
106
107
| `recommendations` | list of module paths | *(blocked only)* Alternative modules to suggest in the lint error. If the module being linted is itself in this list, the block is skipped. |
107
108
| `reason` | string | *(blocked only)* Human-readable explanation appended to the lint error. |
0 commit comments