Service-Lint CLI Usage

The Service-Lint CLI runs the same checks as the Maven plugin without requiring a Maven build. It’s useful for ad-hoc checks, scripting, and CI steps that aren’t Maven-driven.

Prerequisites

  • Java 17 or higher.

  • The service-lint-cli jar (built with mvn clean package, produced at service-lint-cli/target/service-lint-cli-<version>.jar).

Interactive Mode

Start the shell with no arguments:

java -jar service-lint-cli-1.4.4.jar

Then run commands at the prompt:

service-lint:> check
service-lint:> list-rules
service-lint:> help

Direct Command Execution

Pass the command (and options) as arguments — ideal for CI/CD:

# Check the current directory
java -jar service-lint-cli-1.4.4.jar check

# Check a specific directory
java -jar service-lint-cli-1.4.4.jar check --project-path /path/to/project

# Use a specific configuration file
java -jar service-lint-cli-1.4.4.jar check --config-file /path/to/servicelint-config.yml

# Disable specific rules (comma-separated, case-insensitive)
java -jar service-lint-cli-1.4.4.jar check --disable-rules ChangelogVersion,DependencyUpdates

# Run sequentially (disable parallel execution)
java -jar service-lint-cli-1.4.4.jar check --parallel false

# List all available rules
java -jar service-lint-cli-1.4.4.jar list-rules

Commands

check

Runs Service-Lint rules against a project.

Option Description Default

--project-path

Path to the project to check.

current directory (.)

--config-file

Path to the configuration file.

servicelint-config.yml in project root

--parallel

Execute rules in parallel. Set false under memory constraints.

true

--disable-rules

Comma-separated rule names to disable (case-insensitive).

(empty)

list-rules

Lists all available rules discovered via ServiceLoader. Use this to see the exact rule names to pass to --disable-rules or to reference in servicelint-config.yml.

help

Displays help for the available commands.

Exit Codes

  • 0 — Success (no ERROR-level violations).

  • 1 — Failure (one or more ERROR-level violations found).

WARNING and INFO violations are reported but do not affect the exit code. This makes the CLI easy to gate CI on. See Understanding Reports for details.