saveourtool/diktat

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

Open

#1.628 aberto em 16 de mar. de 2023

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

Métricas do repositório

Stars
 (571 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador