Skip to content

Commit

Permalink
Don't allow the usage of ` in function names
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Jan 2, 2022
1 parent eb0f1cf commit a1181a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion detekt-core/src/main/resources/default-detekt-config.yml
Expand Up @@ -446,7 +446,7 @@ naming:
FunctionNaming:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
functionPattern: '[a-z][a-zA-Z0-9]*'
excludeClassPattern: '$^'
ignoreOverridden: true
FunctionParameterNaming:
Expand Down
Expand Up @@ -32,7 +32,7 @@ class FunctionNaming(config: Config = Config.empty) : Rule(config) {
)

@Configuration("naming pattern")
private val functionPattern: Regex by config("([a-z][a-zA-Z0-9]*)|(`.*`)", String::toRegex)
private val functionPattern: Regex by config("[a-z][a-zA-Z0-9]*", String::toRegex)

@Configuration("ignores functions in classes which match this regex")
private val excludeClassPattern: Regex by config("$^", String::toRegex)
Expand Down

0 comments on commit a1181a2

Please sign in to comment.