-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting attributes restrictions on more targets, i.e. properties #224
Comments
4 is also fine 😂 But really, I haven't added support for other targets because it was more work at the time and the extension doesn't support properties elsewhere (which I admit is more of an excuse). But I thought I had at least documented it which turned out that I haven't, sorry! I'm fine with adding support for just properties plus document the limitation, or add full support, and then probably no documentation changes needed. Not sure what's easier now 😅 Duck typing doesn't sound like something I'd like to see but may be needed, I don't know right now. PR is always welcome! |
Hey @francescolaffi I got somehow interested more now (= can't sleep) 😄 and created #225. It's marked as Draft because there are more nodes (in |
This adds support for properties, class constants, params, enums Close #224
This adds support for properties, class constants, params, enums Close #224
All targets are now supported, would still like to add tests for attributes for arrow function, closure, function, interface, trait. |
This adds support for properties, class constants, params, enums Close #224
This adds support for properties, class constants, params, enums Close #224
This adds support for properties, class constants, params, enums Close #224
Currently
disallowedAttributes
support only on attributes that target classes/interfaces/... or functions/methods (byAttributeUsages::processNode
)But attributes can have other targets, I discovered this limitation while trying to restrict an attributes that is used on class properties.
I think it should be possible for
AttributeUsages
to support nodes for the other targets, but I'd like to know where @spaze stands on this:I'd go for 2, let me know what you thing and if you'd welcome a PR (probably in a few weeks) or if you'd like to handle it directly
The text was updated successfully, but these errors were encountered: