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

nimble_operator rule is not triggered for `beTrue()` #2613

Closed
Igor-Palaguta opened this Issue Jan 30, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Igor-Palaguta
Copy link

Igor-Palaguta commented Jan 30, 2019

Describe the bug

nimble_operator rule is not triggered for beTrue() Nimble's predicate

Environment

  • SwiftLint version (run swiftlint version to be sure)?
    0.30.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)?
    package file from github
  • Paste your configuration file:
opt_in_rules:
  - nimble_operator
  • Which Xcode version are you using (check xcode-select -p)?
    Version 10.0 (10A255)
  • Do you have a sample that shows the issue?

echo "expect(success).to(beTrue())" | swiftlint lint --no-cache --use-stdin --enable-all-rules

// This triggers a violation:
expect(success).to(beTrue())

// This does not trigger a violation:
expect(success) == true
@marcelofabri

This comment has been minimized.

Copy link
Collaborator

marcelofabri commented Jan 30, 2019

I think it was a conscious decision when I first wrote that rule because I personally preferred to use to(beTrue()) at that time.

But we should catch this though. PRs are welcome!

@marcelofabri

This comment has been minimized.

Copy link
Collaborator

marcelofabri commented Feb 3, 2019

Implemented in #2622.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.