saveourtool/diktat

The literals used to `@Suppress` Diktat checks should be configurable via `diktat-analysis.yml`

Open

#1,628 opened on Mar 16, 2023

View on GitHub
 (0 comments) (0 reactions) (1 assignee)Kotlin (40 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (571 stars)
PR merge metrics
 (PR metrics pending)

Description

The literals used to @Suppress Diktat checks should be configurable via diktat-analysis.yml, e.g.:

- name: MAGIC_NUMBER
  aliases: [ MagicNumber ]
  enabled: true

Then the following code should trigger no warnings:

@Suppress("MagicNumber")
fun f() {
    g(42)
}

Environment information

  • diktat version: 1.2.4.2

Related

  • #1627
  • #1530

@nulls, @petertrr, feel free to comment.

Contributor guide