Thread
#detekt
    PJ Walstrom

    PJ Walstrom

    4 months ago
    Is it possible to configure detekt to allow characters outside of the
    a-z
    range in e.g. function names? I see that parameterPattern: '[a-z][A-Za-z0-9]*'is used, but I would like to use the Norwegian characters
    æ
    ,
    ø
    and
    å
    in function names, too. Any help would be highly appreciated!
    fun vilkårsØnske() {}
    gammax

    gammax

    4 months ago
    Can't you extend the regex to include those chars? Also using non ASCII chars in the source code sounds like a bad idea to be 😅
    PJ Walstrom

    PJ Walstrom

    4 months ago
    yes, you are right, thank you. The solution is
    parameterPattern: '[a-zæøå][A-ZÆØÅa-zæøå0-9]*'
    Regarding using non-ASCII characters in the source code: our domain is heavily related to formal writings of several legal texts. It just makes sense to keep the definitions also in the source code to avoid confusion. Norwegian characters are part of the extended ASCII Codes and Java/Kotlin supports the entire Unicode character set for just this reason (ref Java Language Specification section 3.8)