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

redundant_objc_attribute false positives after updating 0.49.1->0.50.1 #4633

Closed
2 tasks done
Cyberbeni opened this issue Dec 8, 2022 · 2 comments · Fixed by #4742
Closed
2 tasks done

redundant_objc_attribute false positives after updating 0.49.1->0.50.1 #4633

Cyberbeni opened this issue Dec 8, 2022 · 2 comments · Fixed by #4742
Labels
bug Unexpected and reproducible misbehavior.

Comments

@Cyberbeni
Copy link
Contributor

Cyberbeni commented Dec 8, 2022

New Issue Checklist

Describe the bug

redundant_objc_attribute false positives after updating 0.49.1->0.50.1

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.50.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? pre-commit
  • Paste your configuration file:
# insert yaml contents here
  • Are you using nested configurations?
    If so, paste their relative paths and respective contents. No
  • Which Xcode version are you using (check xcodebuild -version)? 14.0.1
  • Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
    to quickly test if your example is really demonstrating the issue. If your example is more
    complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.
@objc public extension Foo {
  // This shouldn't trigger the warning
  @objc enum Bar: Int {
    case bar
  }
  // This will have compiler error without the @objc
  var bar: Bar { .bar }
  // This also triggers a warning and also causes compiler error but a better fix would be to mark other private interfaces @nonobjc
  @objc private enum Baz: Int {
    case baz
  }
  private var baz: Baz { .baz }
}
@Cyberbeni
Copy link
Contributor Author

Cyberbeni commented Dec 8, 2022

Missed one more false positive:

@objcMembers public class Foo: NSObject {
  // Can't be used with #selector(...) without @objc annotation
  @objc private func dateChanged(_ sender: UIDatePicker) {
    //
  }
}

@markltownsend
Copy link

Any time frame on this PR being released? I also just updated to the latest SwiftLint and getting all these false positives that get compile errors if you fix the lint issues.

mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 20, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 20, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 20, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 26, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 26, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Feb 26, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 4, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 4, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 4, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Mar 5, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue Apr 27, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 6, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 6, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 6, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 8, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 8, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 8, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 11, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 12, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 12, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 12, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 15, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 15, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 15, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 17, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 17, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 17, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 18, 2023
@SimplyDanny SimplyDanny added the bug Unexpected and reproducible misbehavior. label May 19, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 20, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 20, 2023
mildm8nnered added a commit to mildm8nnered/SwiftLint that referenced this issue May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
3 participants