Closed nicolas-miari closed 6 years ago
(Of course, adding space around ...
triggers a Swift syntax error)
@nicolas-miari are you sure the violation is not because of the extra space between =
and String
?
Changed here to let last = String(text[startIndex...])
and the violation went away. I'm closing this, but feel free to reopen if you have any other questions.
New Issue Checklist
Bug Report
I can't get rid of this warning after migrating to Swift4 and adopting rrange operators for substrings (slices).
Complete output when running SwiftLint, including the stack trace and command used
(Can't paste complete output; source file names are confidential)
Environment
SwiftLint version (run
swiftlint version
to be sure)? 0.25.1Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
Paste your configuration file:
Are you using nested configurations? If so, paste their relative paths and respective contents. No.
Which Xcode version are you using (check
xcode-select -p
)? 9.4.1Do 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 useswiftlint lint --path [file here] --no-cache --enable-all-rules
.