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

'nslocalizedstring_key' now validates the comment argument in addition to the key argument #3373

Merged
merged 3 commits into from
Nov 7, 2020

Conversation

daltonclaybrook
Copy link
Contributor

This PR resolves #3334

@SwiftLintBot
Copy link

SwiftLintBot commented Oct 7, 2020

2 Warnings
⚠️ This PR may need tests.
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTest/I18n.swift:5:30: warning: NSLocalizedString Key Violation: Static strings should be used as key/comment in NSLocalizedString in order for genstrings to work. (nslocalizedstring_key)
13 Messages
📖 Linting Aerial with this PR took 0.83s vs 0.81s on master (2% slower)
📖 Linting Alamofire with this PR took 0.99s vs 1.0s on master (1% faster)
📖 Linting Firefox with this PR took 3.8s vs 3.87s on master (1% faster)
📖 Linting Kickstarter with this PR took 6.49s vs 6.42s on master (1% slower)
📖 Linting Moya with this PR took 0.52s vs 0.51s on master (1% slower)
📖 Linting Nimble with this PR took 0.61s vs 0.6s on master (1% slower)
📖 Linting Quick with this PR took 0.34s vs 0.32s on master (6% slower)
📖 Linting Realm with this PR took 1.34s vs 1.35s on master (0% faster)
📖 Linting SourceKitten with this PR took 0.5s vs 0.5s on master (0% slower)
📖 Linting Sourcery with this PR took 2.58s vs 2.63s on master (1% faster)
📖 Linting Swift with this PR took 8.16s vs 8.2s on master (0% faster)
📖 Linting WordPress with this PR took 7.36s vs 7.37s on master (0% faster)
📖 This PR fixed a violation in WordPress: /WordPress/WordPressTest/I18n.swift:5:30: warning: NSLocalizedString Key Violation: Static strings should be used as key in NSLocalizedString in order to genstrings work. (nslocalizedstring_key)

Generated by 🚫 Danger

@codecov-io
Copy link

codecov-io commented Oct 7, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@da408b5). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3373   +/-   ##
=========================================
  Coverage          ?   90.54%           
=========================================
  Files             ?      417           
  Lines             ?    20523           
  Branches          ?        0           
=========================================
  Hits              ?    18583           
  Misses            ?     1940           
  Partials          ?        0           
Impacted Files Coverage Δ
...ramework/Rules/Lint/NSLocalizedStringKeyRule.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da408b5...22c9d6b. Read the comment docs.

@jpsim
Copy link
Collaborator

jpsim commented Nov 7, 2020

Fantastic, thanks for the PR! I'll be rebasing this and merging when CI passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update 'nslocalizedstring_key' rule to also require static strings for the 'comment' field
4 participants