KT.FUNCTION_NAMING

Function name does not follow the specified naming convention

Reports function names that do not follow the specified naming convention. One exception are factory functions used to create instances of classes. These factory functions can have the same name as the class being created.

Options

  • excludes (default: ['**/test/**', '**/androidtest/**', '**/commontest/**', '**/jvmtest/**', '**/jstest/**', '**/iostest/**'])

    path filter

  • functionPattern (default: [a-z][a-zA-Z0-9]*)

    naming pattern

  • excludeClassPattern (default: $^)

    ignores functions in classes which match this regex

  • ignoreOverridden (default: True)

    ignores functions that have the override modifier

The content on this page is adapted from the Detekt Docs. Copyright ©2022 The Detekt Team. All rights reserved. https://detekt.dev/comments.html