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

Lint error for "masterCard" inclusive_language #165

Closed
apps4everyone opened this issue Aug 18, 2021 · 7 comments
Closed

Lint error for "masterCard" inclusive_language #165

apps4everyone opened this issue Aug 18, 2021 · 7 comments

Comments

@apps4everyone
Copy link
Collaborator

apps4everyone commented Aug 18, 2021

On local Xcode Setup (https://github.com/realm/SwiftLint 0.43.1) the inclusive_language has masterCard in the allowance list.

But on CI I get:
Declaration masterCard contains the term "master" which is not considered inclusive.

for:
case masterCard = "MASTERCARD"

@apps4everyone
Copy link
Collaborator Author

.swiftlint.yml:

inclusive_language:
  override_allowed_terms: ["mastercard", "MASTERCARD"]

@mokagio
Copy link
Collaborator

mokagio commented Aug 19, 2021

I'd say this is safe to close. I haven't searched for those usages, but being in the override_allowed_terms list, they clearly represent an intentional compromise.

@apps4everyone
Copy link
Collaborator Author

Hey, thx for the fast reply. Tested with disabling:
- inclusive_language
and the error is gone on CI.

What version of https://github.com/realm/SwiftLint is used as binary or what is the default path for swiftlint.binary_path?

@apps4everyone
Copy link
Collaborator Author

Looks like the problem is the outdated version: 0.41.0 here:

SWIFTLINT_VERSION = '0.41.0'

and Mastercard was fixed with 0.42.0 see here:
https://github.com/realm/SwiftLint/blob/master/CHANGELOG.md#0420-he-chutes-he-scores

Latest version: https://github.com/realm/SwiftLint/releases/tag/0.43.1

@apps4everyone
Copy link
Collaborator Author

apps4everyone commented Aug 19, 2021

best would be to add the functionality to specify the version in the danger file e.g.:
swiftlint.swiftlint_version = '0.43.1'
and use by default the latest?

@ashfurrow
Copy link
Owner

You can set the SWIFTLINT_VERSION environment variable to whatever you want, and danger-swiftlint will install that version. The version we specify in version.rb is a fallback if you don't specific one with the SWIFTLINT_VERSION env var.

@mokagio
Copy link
Collaborator

mokagio commented Aug 20, 2021

@apps4everyone thank you for your research work 😄

Sounds like you've done most of the hard work already, how would you feel about opening a PR that updates the fallback version to the latest stable SwiftLint to see if everything works fine with that?

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

No branches or pull requests

3 participants