Skip to content

Feature request - limit number of lines for an issue to 1 #2699

Closed
@pinkasey

Description

@pinkasey

Expected Behavior

When a rule finds a warning, the warning never spans more than one line.
If the rule "misbehaves" and reports entity that spans multiple lines -
detekt will narrow the issue to a sub-entity that spans 1 line.

I would put this behaviour under a configuration in detekt-config.yml, something like:
limitIssueToOneLine: true

Current Behavior

Some rules mark entire files, classes, or methods as warning - and you can hardly see in IntelliJ that there are additional warnings on the file/class/method.

Context

This is mostly relevant to the IntelliJ plugin -
There are some rules that mark an entire file/class/method as the issue entity.
e.g MatchingDeclarationName
This makes it impossible to continue working without addressing the warning somehow
(And what if it's a file I'm just visiting, and wasn't planning on modifying? It's all yellow and hard to read).

Example of what I want to prevent:
image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions