Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWrite a lint that ensures that no_jsmanaged_fields is used correctly #5386
Comments
|
To add some more detail, it seems one would want to look for the jstraceable attribute, as defined in https://github.com/servo/servo/blob/master/components/plugins/jstraceable.rs An existing lint which checks for attributes is https://github.com/servo/servo/blob/master/components/plugins/lints/privatize.rs This new lint would need to find calls to the no_jsmanaged_fields macro, and then look at the fields of any structs passed to it to see if the jstraceable attribute is defined on any of the fields. I think (Servo newbie) |
|
Whoops, I meant |
We should be able to check all of the fields of the target of the no_jsmanaged_fields macro and ensure that none of them are marked jsmanaged. This will prevent misuse of the macro.