Obj-C ffigen creates a bunch of `The declaration '_sel_...' isn't referenced` warnings
My generated FFI bindings file has about 15 unreferenced private selector warnings, which causes a lot of noise in the analyzer output and makes the IDE problem inspector much harder to use. Either they should be generated only as-needed, or if over-generating and letting tree shaking handle it is intentional (to make the generator logic simpler), the file should be generated with a file-level ignore for that warning.
If the solution will be the former, it looks like this is selectors from NSOjbect maybe? I see all the following unused: _sel_class, _sel_self, _sel_performSelector_, _sel_performSelector_withObject_, _sel_performSelector_withObject_withObject_, _sel_isMemberOfClass_, _sel_conformsToProtocol_, _sel_retain, _sel_release, _sel_autorelease, _sel_retainCount, _sel_zone, _sel_hash, _sel_superclass, _sel_debugDescription.
In theory they're only generated as needed, but there's probably a bug somewhere where I'm deleting a method for one reason or another and not cleaning this up. Bugs like this should go away (or be easier to fix) once the transformer refactor is done.
The pattern in the meantime has been to add a bunch of file ignores to the preamble: option in the config. But maybe it would make sense to do this automatically. The typical set is:
// ignore_for_file: camel_case_types
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unnecessary_non_null_assertion
// ignore_for_file: unused_element
// ignore_for_file: unused_field