-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
In the Swift generator, we generate a deepEquals and deepHash method with a file-specific suffix to avoid collisions in multi-output use cases.
However, we don't do any validation or transformation on it to follow Swift conventions, and that bit us in in_app_purchase:
sk2_pigeon.g.swift:76: [AlwaysUseLowerCamelCase] rename 'deepEqualssk2_pigeon' using lowerCamelCase
sk2_pigeon.g.swift:117: [AlwaysUseLowerCamelCase] rename 'deepHashsk2_pigeon' using lowerCamelCase
The issue is that in_app_purchase uses sk2_pigeon as its file name, and we're including the underscore without adding a // swift-format-ignore: AlwaysUseLowerCamelCase like we already do in cases where unconditionally emit underscores.
We should either transform to remove underscores (potentially dangerous; e.g., in theory someone could have foo_bar and fooBar as different output filenames, although I'm not convinced that's a case we actually need to worry about), or we should look for style violations and annotate them.