Skip to content

Commit

Permalink
Merge branch 'master' into Exluding-by-prefix-option
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnReeze authored Sep 16, 2020
2 parents e75dbc9 + ea311ba commit b66f853
Show file tree
Hide file tree
Showing 16 changed files with 280 additions and 165 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ SwiftLint.pkg
SwiftLintFramework.framework.zip
benchmark_*
portable_swiftlint.zip
swiftlint_linux.zip
osscheck/
docs/
rule_docs/
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@
[JohnReeze](https://github.com/JohnReeze)
[#3304](https://github.com/realm/SwiftLint/issues/3304)

* Make the `unused_declaration` rule run 3-5 times faster, and
enable it to detect more occurrences of unused declarations.
[JP Simard](https://github.com/jpsim)

#### Bug Fixes

* None.

## 0.40.2: Demo Unit

#### Breaking

* None.

#### Experimental

* None.

#### Enhancements

* Improve description for `empty_enum_arguments`.
[Lukas Schmidt](https://github.com/lightsprint09)

* Add support for `excluded_match_kinds` custom rule config parameter.
[Ryan Demo](https://github.com/ryandemo)

#### Bug Fixes

* None.
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ portable_zip: installables
cp -f "$(LICENSE_PATH)" "$(TEMPORARY_FOLDER)"
(cd "$(TEMPORARY_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./portable_swiftlint.zip"

zip_linux:
$(eval TMP_FOLDER := $(shell mktemp -d))
docker run -v `pwd`:`pwd` -w `pwd` --rm swift:latest swift build -c release
mv .build/release/swiftlint "$(TMP_FOLDER)"
cp -f "$(LICENSE_PATH)" "$(TMP_FOLDER)"
(cd "$(TMP_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./swiftlint_linux.zip"

package: installables
pkgbuild \
--identifier "io.realm.swiftlint" \
Expand All @@ -119,7 +126,7 @@ archive:
carthage build --no-skip-current --platform mac
carthage archive SwiftLintFramework

release: package archive portable_zip
release: package archive portable_zip zip_linux

docker_test:
docker run -v `pwd`:`pwd` -w `pwd` --name swiftlint --rm norionomura/swift:5.2.4 swift test --parallel
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "2b1809051b4a65c1d7f5233331daa24572cd7fca",
"version": "8.1.1"
"revision": "7a46a5fc86cb917f69e3daf79fcb045283d8f008",
"version": "8.1.2"
}
},
{
Expand Down
2 changes: 2 additions & 0 deletions Source/SwiftLintFramework/Models/ConfigurationError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
public enum ConfigurationError: Error {
/// The configuration didn't match internal expectations.
case unknownConfiguration
/// The configuration had both `match_kind` and `excluded_match_kind` parameters.
case ambiguousMatchKindParameters
}
6 changes: 5 additions & 1 deletion Source/SwiftLintFramework/Models/RuleStorage.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import Dispatch

/// A storage mechanism for aggregating the results of `CollectingRule`s.
public class RuleStorage {
public class RuleStorage: CustomStringConvertible {
private var storage: [ObjectIdentifier: [SwiftLintFile: Any]]
private let access = DispatchQueue(label: "io.realm.swiftlint.ruleStorageAccess", attributes: .concurrent)

public var description: String {
storage.description
}

/// Creates a `RuleStorage` with no initial stored data.
public init() {
storage = [:]
Expand Down
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Models/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public struct Version {
public let value: String

/// The current SwiftLint version.
public static let current = Version(value: "0.40.1")
public static let current = Version(value: "0.40.2")
}
6 changes: 0 additions & 6 deletions Source/SwiftLintFramework/Rules/Lint/ArrayInitRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,3 @@ public struct ArrayInitRule: ASTRule, ConfigurationProviderRule, OptInRule, Auto
}
}
}

private extension Array where Element == SyntaxKind {
static func ~= (array: [SyntaxKind], value: [SyntaxKind]) -> Bool {
return array == value
}
}
Loading

0 comments on commit b66f853

Please sign in to comment.