Skip to content

Accept variable names starting with more than one capital letter in Variable Name Rule #566

Closed
@eaigner

Description

Consider the following variable names

- ID
- URL
- XMLString
- APIHost
- HTTPVersion
- MIMEType
- JSONBody
- URLField
- URLStackView

Those would be considered a violation because they start with an uppercase letter, but in those examples they are abbreviations which would be valid.

I know those can be excluded manually, but I don't think it is necessary. Those cases could be detected if the 2nd character is also upper case and contains only alphanumeric characters (thus eliminating cases such as MY_CONST)

I'm using swiftlint version 0.9.1

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.good first issueIssue to be taken up by new contributors yet unfamiliar with the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions