Skip to content

Crash with swiftlint directive after emoji with skin tone #5945

@KeithBauerANZ

Description

@KeithBauerANZ

New Issue Checklist

Bug Description

This crashes swiftlint:

"🤵🏼‍♀️" // swiftlint:disable:this nonexistent_rule

(whether the rule exists or not isn't relevant, only the directive following the emoji on the same line)

The crash is here:

https://github.com/realm/SwiftLint/blob/main/Source/SwiftLintCore/Extensions/String%2BSwiftLint.swift#L31

(My swiftlint doesn't have debug info, so the backtrace is useless, but that's the assertion message)

Just without any config at all:

$ swiftlint test.swift

Environment

  • SwiftLint version (run swiftlint version to be sure)
    0.57.1

  • Xcode version (run xcodebuild -version to be sure)
    Xcode 16.2
    Build version 16C5032a

  • Installation method used (Homebrew, CocoaPods, building from source, etc)
    Downloaded from release tag

  • Configuration file:
    n/a

Metadata

Metadata

Assignees

Labels

bugUnexpected and reproducible misbehavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions