Uploaded image for project: 'SonarSlang'
  1. SonarSlang
  2. SONARSLANG-348

[Kotlin] FP S100 (BadFunctionNameCheck) on factory functions

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8
    • Component/s: Kotlin
    • Labels:
      None

      Description

      According to kotlin coding-conventions - naming-rules, factory function names match the returned type name so usually start with an uppercase. Currently S100 generates FP on those cases.
      For example:

      fun Foo(): Foo { return FooImpl() } // FP
      //  ^^^
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              margarita.nedzelska Margarita Nedzelska
              Reporter:
              alban.auzeill Alban Auzeill
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: