diffplug / diffplug/spotless

Indicate users what specific rule gets triggered when running check or apply

Open
#1,278 2 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

* When we add `replaceRegex` with `Spotless`, it takes effect silently when running `mvn spotless:apply`. If we use `mvn spotless:check`, it will point out the specific line which violates the rule but will not tell which specific rule the code violates. If we could have the `name` of `replaceRegex` printed as well, it would help.
* For example, if we use the following configuration, and there are some `wildcard imports` in the code, it would be better if users could see some message like `triggering Remove wildcard imports rule` when running `mvn spotless:apply` or `mvn spotless:check`.

```xml

Remove wildcard imports
import\s+[^\*\s]+\*;(\r\n|\r|\n)
$1

```

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.