realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.7k stars 2.23k forks source link

Support for typealiases in valid_ibinspectable #1925

Open cprovatas opened 7 years ago

cprovatas commented 7 years ago

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.

marcelofabri commented 6 years ago

If anyone is looking for something that would be a good first contribution, this is a good candidate 💯

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

cprovatas commented 4 years ago

Still an issue i presume?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

cprovatas commented 3 years ago

bumping