Skipping and Disabling Service-Lint
There are three distinct mechanisms for reducing what Service-Lint enforces. They are easy to confuse, so pick the narrowest one that solves your problem.
| Mechanism | Scope | Use when |
|---|---|---|
Skip |
Skips Service-Lint entirely — no rules run. |
You need a temporary escape hatch (e.g. an unrelated hotfix build) and want zero lint output. |
Disable rule |
Turns off specific rules everywhere in the project. |
A rule doesn’t apply to this component at all, or is a persistent false positive. |
Ignore module |
Suppresses violations from specific paths for a rule; the rule still runs elsewhere. |
A rule is valid for the repo but flags a path that legitimately should not comply. |
|
Prefer fixing violations over silencing them. Reach for these mechanisms only for genuine exceptions, and prefer the narrowest scope (ignore module < disable rule < skip). |
1. Skip Service-Lint Entirely
Set the service-lint.skip property. Nothing runs and the build proceeds.
In pom.xml:
<properties>
<service-lint.skip>true</service-lint.skip>
</properties>
On the command line:
mvn verify -Dservice-lint.skip=true
|
In a multi-module build the property is honored when declared on any reactor module (for example
the |
This is best used as a short-lived, local or emergency override — not as permanent policy.
2. Disable Specific Rules
Rules can be turned off two ways. Both match the rule name (as shown by list-rules),
case-insensitively.
Via the config file (durable policy)
rules:
- name: DependencyUpdates
enabled: false
- name: ServiceLintVersion
enabled: false
Rules not listed remain enabled, so you only need to name the ones you want off.
Via disabledRules / --disable-rules (quick override)
Maven:
<configuration>
<disabledRules>
<disabledRule>DependencyUpdates</disabledRule>
<disabledRule>ServiceLintVersion</disabledRule>
</disabledRules>
</configuration>
Command line:
mvn service-lint:check -DdisabledRules=DependencyUpdates,ServiceLintVersion
CLI:
java -jar service-lint-cli-1.4.4.jar check --disable-rules DependencyUpdates,ServiceLintVersion
Use the config file for choices your team always wants; use disabledRules / --disable-rules for
temporary, per-invocation overrides.
3. Ignore Specific Paths (Modules)
When a rule is valid for the repo but flags a path that should be exempt, suppress just those paths with gitignore-style globs instead of disabling the whole rule:
rules:
- name: SL011
enabled: true
ignoredModules:
- "**/generated/**"
The rule still runs; only matching violations are dropped. Full syntax, examples, and the Maven
ignoredModulesByRule form are documented in Ignoring Modules.