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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Comma Spacing Violation: Should not be checked in String #234
Also for : Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
I have a problem like this, let url: String = "https://www.google.com" will fail, but let url = "https://www.google.com" will success
$ echo"let reg = try! NSRegularExpression(pattern: \"[a-z]{2,5}\", options: NSRegularExpressionOptions.CaseInsensitive)"| swiftlint lint --use-stdin
<nopath>:1:11: error: Force Try Violation: Force tries should be avoided. (force_try)
<nopath>:1: warning: Line Length Violation: Line should be 100 characters or less: currently 110 characters (line_length)
Done linting! Found 2 violations, 1 serious in 1 file.
$ echo"let reg = try! NSRegularExpression(pattern: \"[a-z]{2, 5}\", options: NSRegularExpressionOptions.CaseInsensitive)"| swiftlint lint --use-stdin
<nopath>:1:11: error: Force Try Violation: Force tries should be avoided. (force_try)
<nopath>:1: warning: Line Length Violation: Line should be 100 characters or less: currently 111 characters (line_length)
Done linting! Found 2 violations, 1 serious in 1 file.
Activity
arsonik commentedon Nov 24, 2015
Also for : Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
bjzhou commentedon Nov 26, 2015
I have a problem like this,
let url: String = "https://www.google.com"will fail, butlet url = "https://www.google.com"will successjpsim commentedon Nov 26, 2015
@arsonik I can't reproduce your issue:
@bjzhou I also can't reproduce your issue:
bjzhou commentedon Nov 27, 2015
@jpsim Don't try in command line, this issue only occurred in Xcode.
jpsim commentedon Nov 27, 2015
SwiftLint doesn't behave differently on the command line versus Xcode.
SokichiFujita commentedon Nov 30, 2015
@jpsim I could reproduce it. The string is for the scope string of OAuth 2.0.
hankbao commentedon Dec 2, 2015
Same issue here.
arsonik commentedon Dec 2, 2015
Looks like its happening only when checked in a large file&or project.
Sent from my iPhone
jpsim commentedon Dec 2, 2015
I'm still waiting for steps to reproduce this issue, as the details shared so far are insufficient to trigger it.
bjzhou commentedon Dec 3, 2015
@jpsim I reproduced my issue again, maybe the key is the comment. Please check it
jpsim commentedon Dec 3, 2015
Thanks for sharing that @bjzhou, I can now reproduce the issue. I've reduced it even further:
Now I can investigate this.
Fix issues with multi-byte characters. Fixes #234.
jpsim commentedon Dec 3, 2015
Should be fixed now. Thanks for reporting all! Next time, sharing a repro case really helps.