Skip to content
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

Rule Request: Enforce bundle parameter to NSLocalizedString #2595

Closed
2 tasks done
lilyball opened this issue Jan 26, 2019 · 1 comment
Closed
2 tasks done

Rule Request: Enforce bundle parameter to NSLocalizedString #2595

lilyball opened this issue Jan 26, 2019 · 1 comment
Labels
rule-request Requests for a new rules.

Comments

@lilyball
Copy link

New Issue Checklist

New rule request

When writing frameworks that have localized strings, it's really easy to forget the bundle: parameter to NSLocalizedString. Unfortunately this isn't something that can be solved in code; adding my own override of NSLocalizedString for the bundle-less case trips up genstrings, and adding a custom function with a different name isn't compatible with xcodebuild -exportLocalizations.

The goal of the rule here is to catch all calls to NSLocalizedString and enforce that the bundle: parameter is present. It doesn't matter what the value is, it should just be specified.

This would be opt-in. I don't think there's any configuration for it.

@marcelofabri marcelofabri added the rule-request Requests for a new rules. label Jan 26, 2019
@marcelofabri
Copy link
Collaborator

This seems a great candidate for a first contribution! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

2 participants