Skip to content

Support for typealiases in valid_ibinspectable #1925

@cprovatas

Description

@cprovatas

New Issue Checklist

Rule Request

I have a case where I am creating an IBDesignable Map View, where the developer can input individual coordinates as IBInspectable properties. To keep consistent with the CoreLocation API, It would be ideal to have these IBInspectable properties be of type CLLocationDegrees instead of type Double (CLLocationDegrees is a typealias for Double). Because swiftlint doesn't recognize that CLLocationDegrees as a Double, it produces a warning saying it is a declaration violation. I am sure there are numerous other cases where this type of issue could come up.

I am proposing that any new whitelisted types for valid_ibinspectable be opt-in, and configurable in the yaml file as a new type to support for the rule. I think this would be easier to implement than having to have the linter manually cross-reference any types or do any extra work.

Thanks for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions