Uploaded image for project: 'SonarSwift'
  1. SonarSwift
  2. SONARSWIFT-426

Change default value for S119 parameter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: Rules
    • Labels:
      None

      Description

      Current default value for S119 parameter is more Java-oriented.
      That's what's said in Swift docs:

      In most cases, type parameters have descriptive names, such as Key and Value in Dictionary<Key, Value> and Element in Array<Element>, which tells the reader about the relationship between the type parameter and the generic type or function it’s used in. However, when there isn’t a meaningful relationship between them, it’s traditional to name them using single letters such as T, U, and V, such as T in the swapTwoValues(: function above.
      Always give type parameters upper camel case names (such as T and MyTypeParameter) to indicate that they’re a placeholder for a type, not a value.

        Attachments

          Activity

            People

            Assignee:
            guillaume.dequenne Guillaume Dequenne
            Reporter:
            elena.vilchik Elena Vilchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: