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

NSRangeException crash in swiftlint #294

Closed
Sega-Zero opened this issue Dec 25, 2015 · 0 comments
Closed

NSRangeException crash in swiftlint #294

Sega-Zero opened this issue Dec 25, 2015 · 0 comments
Labels

Comments

@Sega-Zero
Copy link
Contributor

This code produces crash in the very latest master source code

//
//  Experiments.swift
//  Modules
//
//  Created by Сергей Галездинов on 25.12.15.
//  Copyright © 2015 Сергей Галездинов. All rights reserved.
//

import Foundation

/**
 Test description

 - ValueOne   Значение раз
 - ValueTwo   Значение два
 - ValueThree Значение три
 - ValueFour  Значение четыре
 */
public struct TestFlags: OptionSetType {
    /// Поле, хранящее целочисленное представление флагов
    /// - seealso: `RawRepresentable`
    public let rawValue: Int

    /// Значение раз
    public static let Delivered    = TestFlags(rawValue: 0)

    /// Значение два
    public static let Queued = TestFlags(rawValue: 1 << 0)

    /// Значение три
    public static let DeletePending = TestFlags(rawValue: 1 << 1)

    /// Значение четыре
    public static let Edited  = TestFlags(rawValue: 1 << 2)

    /// Конструктор
    /// - Parameter rawValue: "Сырое" представление множества
    public init(rawValue: Int) {
        self.rawValue = rawValue
    }
}

produces crash:

* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: Range or index out of bounds'

full stack trace:
http://pastie.org/10651819

@jpsim jpsim added the bug label Dec 27, 2015
scottrhoyt added a commit to scottrhoyt/SwiftLint that referenced this issue Dec 31, 2015
* realm/master:
  use SourceKitten 0.7.3 release
  [README] `excluded` overrides `included`
  only generate violations once for triggering examples in verifyRule()
  Support command comment modifiers
  [CHANGELOG] Fix entry
  [CHANGELOG] add entry
  Fix realm#295
  Add failing test to ValidDocsRule.swift
  [CHANGELOG] Fix entry
  test violation locations
  [CHANGELOG] add entry
  Fix realm#294

# Conflicts:
#	CHANGELOG.md
#	README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants