to avoid having to lock calls to mutating functions that don't
actually perform mutating operations.
This fixes races seen "in the wild" causing crashes.
`fatalError` prints the full path of the file, which leaks filesystem information from the machine that built the binary. Now that we release via CocoaPods, this is more critical.
* master: (41 commits)
Fix formatting in CHANGELOG.md
release 0.13.0
Update CHANGELOG.md
Fix check for trailing whitespace to return early
Fix checks for some inline comments
Replace check for comments to use SyntaxKind
Add configuration for trailing_whitespace to ignore comments
Unwanted space removed
- Lint issues fixed
Updated HTML Reporter
PR feedback
Add check on autocorrect for disabled range
Use `utf8.count` instead of `utf16.count` to byte range
Re-write `ExplicitInitRule` to `ASTRule`
added ExplicitInitRule
Updated CHANGELOG
HTML Reporter added
HTML Reporter added
Adds information about SwiftLint plugin for AppCode into README.md
added reasons why a new rule should be opt in
...
# Conflicts:
# Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
# Source/SwiftLintFramework/Extensions/Structure+SwiftLint.swift
# Source/SwiftLintFramework/Rules/ColonRule.swift
# Source/SwiftLintFramework/Rules/CommaRule.swift
# Source/SwiftLintFramework/Rules/LegacyCGGeometryFunctionsRule.swift
# Source/SwiftLintFramework/Rules/LegacyConstantRule.swift
# Source/SwiftLintFramework/Rules/LegacyConstructorRule.swift
# Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
# Source/SwiftLintFramework/Rules/LineLengthRule.swift
# Source/SwiftLintFramework/Rules/OperatorFunctionWhitespaceRule.swift
# Source/SwiftLintFramework/Rules/ReturnArrowWhitespaceRule.swift
# Source/SwiftLintFramework/Rules/RuleConfigurations/StatementPositionConfiguration.swift
# Source/SwiftLintFramework/Rules/StatementPositionRule.swift
# Source/SwiftLintFramework/Rules/TrailingWhitespaceRule.swift
# Tests/SwiftLintFramework/RuleConfigurationTests.swift
Sometime `ObjectIdentifier(self)` might collide between tests in SourceKitCrashTests.
The collision caused fail on `testAssertHandlerIsNotCalledOnNormalFile`.
Because XCTest does not have functions that expecting assert happens.
That will be used only when sourcekitd failed, so performance regression by this is ignorable.
This depends on https://github.com/jpsim/SourceKitten/pull/152
The duration of linting Carthage 0.11 is reduced from 17sec to 16sec
SwiftLint(32b325b) with SourceKitten(0f54e19):
```
swiftlint lint --config ~/.swiftlint-test.yml 17.48s user 1.12s system 83% cpu 22.182 total
```
SwiftLint(this) with SourceKitten(d7f9266):
```
swiftlint lint --config ~/.swiftlint-test.yml 16.05s user 1.05s system 85% cpu 20.051 total
```
It rebuilds `_allDeclarationsByType` incrementally.
By applying this, the duration of linting Carthage is reduced from:
```
swiftlint lint --config ~/.swiftlint-test.yml 23.05s user 1.85s system 82% cpu 30.338 total
```
to:
```
swiftlint lint --config ~/.swiftlint-test.yml 20.09s user 1.34s system 84% cpu 25.329 total
```
This depends on https://github.com/jpsim/SourceKitten/pull/135
By applying this, the duration of linting Carthage is reduced from:
```
swiftlint lint 27.85s user 1.98s system 77% cpu 38.538 total
```
to:
```
swiftlint lint 21.15s user 1.26s system 80% cpu 27.743 total
```