You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea which validates runtime attributes looks good. But all valid keys and classes definitions make .iblinter.yml too complex. So we extract the definitions to another file. IBAnimatable‘s valid key map .yml file may be published as IBDecodable plugin.
I am interested with this feature. I am thinking about generating the file using sourcery if @IBInspectable annotation is accessible. Each framework must provide its own file.
How about having a rule, similar to custom_module_rule which would take as a param list of files where each IBInspectable will provide valid values in a comment.
Since IBLiner already has SourceKitten as a dependency it (probably?) can be done.
At IBAnimatable we have a ton of UIKit subclasses with
@IBInspectable
properties. Some of these areString
's and can be very error prone to work with.Example:
The border property accepts a
String
of either:solid
ordash
If the user writes something like
dotted
, we should show an errorI think this is possible but the user has to tell us:
a) All valid keys
b) All classes/subclasses this property is used on
Probably in a
.yml
file?That may seem like a lot of work but if
IBAnimatable
were to publish this.yml
file on their docs, it could be reusable.The text was updated successfully, but these errors were encountered: