Organizational Lint Policies
Share producer policies through local files or verified, pinned Git modules.
Each section of easyp.yaml first comes from its nearest definition in the directory tree. That section may explicitly extend a base. Lint and breaking inheritance are independent; a lint base does not import its breaking or issues section.
Local base
Create .policies/lint.yaml inside the workspace:
version: v1
linters:
default: STANDARD
disable: [PACKAGE_VERSION_SUFFIX]
linters-settings:
SERVICE_SUFFIX:
suffix: ServiceThen use it from the repository's easyp.yaml:
version: v1
linters:
extends: ./.policies/lint.yaml
enable: [PACKAGE_VERSION_SUFFIX]
disable: [RPC_REQUEST_RESPONSE_UNIQUE]A local reference begins with ./ or ../ and resolves from the file containing it. A directory means its easyp.yaml. References cannot escape the workspace, including through symlinks. Recursive bases are supported, with cycle detection and a limit of 16 base policies.
Pinned shared module
Declare the policy module as an ordinary dependency. The following organization identity is illustrative; substitute a published module you control.
module github.com/acme/service
require github.com/acme/proto-policy v1.2.3Resolve and review its lock with easyp mod tidy. Reference the policy without duplicating the version:
version: v1
linters:
extends: github.com/acme/proto-policy#lint/base.yaml
breaking:
extends: github.com/acme/proto-policy#breaking/easyp.yaml
ignore: []The explicit form is declared-module#policy-path. An exact module identity selects its easyp.yaml. The form declared-module/path uses the longest matching identity already present in the consumer graph; it does not discover a new repository. A nested or major-version module resolves paths from its actual manifest directory, not its proto import roots.
Execution may download an exact missing locked commit, but does not re-resolve a tag, choose HEAD, add dependencies or write the lock. A moved tag cannot silently change an existing base. Relative references made by a dependency policy stay inside that module. The main module's local replacement can supply a policy in normal mode; all remote edges still require existing pins. --frozen rejects replacements and verifies the complete locked graph.
Precedence
The resolved base is applied before explicit local values. A local preset replaces the base preset without discarding inherited explicit rule adjustments. A local enable can undo a base disable, including one supplied by a group. Disable wins over enable in the same layer; repeated rules do not duplicate diagnostics.
Linter settings merge by rule and key. An explicit empty linters-settings map clears inherited settings; an empty rule map clears that rule. Explicit false and empty breaking lists remain overrides. YAML aliases and merge keys preserve these distinctions.
Nearest-directory cascading is unchanged: a child section without extends replaces its ancestor section, rather than partially merging with it. Only explicit inheritance merges base and local adjustments.
Consumer-relative breaking behavior
The inherited baseline is a Git reference in the consuming repository. Inherited ignore paths are relative to the consuming policy file, never to the Git cache. Local ignore lists replace the inherited list, including an explicitly empty list. An explicit --against still overrides the effective baseline.
A common ancestor policy is resolved independently for each checked module, using that module's dependency graph. Different modules can therefore use different pinned versions or local replacements of the same policy. Deleted modules are checked against historical snapshots. For a wholly deleted module whose base exists only in its old dependency graph, pass --against to identify the historical revision.
Validation
easyp validate-config --cfg easyp.yaml
easyp lint
easyp breaking --against mainThe parser validates reference syntax without network access. The CLI additionally follows local references and verifies already cached dependency content. Missing cached policies produce an actionable error: run easyp mod download, then validate again. Validation itself does not download dependencies. Invalid bases, cycles and boundary violations include the consuming field and the reference chain.
Loading policies never runs generation plugins or imports a base's issues.exclude-rules. Environment variables are expanded once in each original file, not again after merging. See the policy reference.