Open 0x6675636b796f75676974687562 opened 1 year ago
Maybe not get attached specifically to detekt
, but support some common configuration/interface for all rules, which will currently contain at least one field aliases
, as suggested for literals
in https://github.com/saveourtool/diktat/issues/1628?
Thus, we can add aliases not only for detekt
but for some other tools?
Also, we could add some short names for long suppressions via such configuration
@Suppress("SOME_UGLY_AND_LONG_WARNING")
fun foo() {
}
@Suppress("SHORT_NAME")
fun foo() {
}
where SHORT_NAME
could be the short alias for SOME_UGLY_AND_LONG_WARNING
?
@kgevorkyan, #1628 is not literal-specific, so if we proceed and implement it, each check will support aliases.
This particular task (#1627) is about the pre-defined list of aliases some checks may have.
Oh, now I got it, good
There's a lot of similarity between Diktat and Detekt checks, but the literals they're
@Suppress
'ed with are different, e.g.:MAGIC_NUMBER
MagicNumber
TOO_MANY_PARAMETERS
LongParameterList
TOO_LONG_FUNCTION
LongMethod
LONG_LINE
MaxLineLength
When both syntax checkers are enabled in the same project, this leads to extra verbose lists of
@Suppress
arguments, e.g.:Diktat should be Detekt-compatible and understand Detekt-specific check names.
Environment information
Related
1628
1530
@petertrr, @nulls, feel free to comment.