Skip to content

Commit

Permalink
Merge branch 'master' into no-fallthrough-only
Browse files Browse the repository at this point in the history
  • Loading branch information
dabelknap authored Jun 10, 2018
2 parents 7ebc611 + e6c1cae commit dc25cc3
Show file tree
Hide file tree
Showing 58 changed files with 1,916 additions and 333 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2
4.0
49 changes: 28 additions & 21 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,40 @@ included:
excluded:
- Tests/SwiftLintFrameworkTests/Resources
opt_in_rules:
- empty_count
- file_header
- explicit_init
- closure_spacing
- overridden_super_call
- redundant_nil_coalescing
- private_outlet
- nimble_operator
- array_init
- attributes
- operator_usage_whitespace
- closure_end_indentation
- first_where
- sorted_imports
- object_literal
- number_separator
- prohibited_super_call
- closure_spacing
- contains_over_first_not_nil
- empty_count
- explicit_init
- extension_access_modifier
- fatal_error_message
- vertical_parameter_alignment_on_call
- file_header
- file_name
- first_where
- joined_default_parameter
- let_var_whitespace
- unneeded_parentheses_in_closure_argument
- extension_access_modifier
- pattern_matching_keywords
- array_init
- literal_expression_end_indentation
- joined_default_parameter
- contains_over_first_not_nil
- nimble_operator
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- private_action
- private_outlet
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- redundant_nil_coalescing
- single_test_class
- sorted_first_last
- sorted_imports
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
- yoda_condition

identifier_name:
Expand All @@ -45,6 +46,12 @@ identifier_name:
line_length: 120
number_separator:
minimum_length: 5
file_name:
excluded:
- main.swift
- LinuxMain.swift
- TestHelpers.swift
- shim.swift

custom_rules:
rule_id:
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#### Breaking

* SwiftLint now requires Swift 4.0 or higher to build.
[JP Simard](https://github.com/jpsim)

* `fallthrough` rule is now opt-in.
[Marcelo Fabri](https://github.com/marcelofabri)
[#1892](https://github.com/realm/SwiftLint/issues/1892)
Expand All @@ -12,6 +15,9 @@
only a `fallthrough`.
[Austin Belknap](https://github.com/dabelknap)

* Updates the `untyped_error_in_catch` rule to support autocorrection.
[Daniel Metzing](https://github.com/dirtydanee)

* Add `indented_cases` support to `switch_case_alignment` rule.
[Shai Mishali](https://github.com/freak4pc)
[#2119](https://github.com/realm/SwiftLint/issues/2119)
Expand All @@ -34,11 +40,21 @@
[Marcelo Fabri](https://github.com/marcelofabri)
[#2127](https://github.com/realm/SwiftLint/issues/2127)

* Updates the `closure_end_indentation` rule to support autocorrection.
[Eric Horacek](https://github.com/erichoracek)

* Updates the `literal_expression_end_indentation` rule to support
autocorrection.
[Eric Horacek](https://github.com/erichoracek)

* Fixes a case where the `closure_end_indentation` rule wouldn't lint the end
indentation of non-trailing closure parameters.
[Eric Horacek](https://github.com/erichoracek)
[#2121](https://github.com/realm/SwiftLint/issues/2121)]

* Improves the `mark` rule's autocorrection.
[Eric Horacek](https://github.com/erichoracek)

* Add `redundant_set_access_control` rule to warn against using redundant
setter ACLs on variable declarations.
[Marcelo Fabri](https://github.com/marcelofabri)
Expand All @@ -49,19 +65,69 @@
[Michael Gray](https://github.com/mishagray)
[#2100](https://github.com/realm/SwiftLint/pull/2100)

* Add a new `ignores_default_parameters` config parameter to the
`function_parameter_count` rule to ignore default parameter when calculating
parameter count. True by default.
[Varun P M](https://github.com/varunpm1)
[#2171](https://github.com/realm/SwiftLint/issues/2171)

* Add `empty_xctest_method` opt-in rule which warns against empty
XCTest methods.
[Ornithologist Coder](https://github.com/ornithocoder)
[#2190](https://github.com/realm/SwiftLint/pull/2190)

* Add `function_default_parameter_at_end` opt-in rule to validate that
parameters with defaults are located toward the end of the parameter list in a
function declaration.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2176](https://github.com/realm/SwiftLint/issues/2176)

* Add `file_name` opt-in rule validating that file names contain the name of a
type or extension declared in the file (if any).
[JP Simard](https://github.com/jpsim)
[#1420](https://github.com/realm/SwiftLint/issues/1420)

#### Bug Fixes

* Update `LowerACLThanParent` rule to not lint extensions.
[Keith Smiley](https://github.com/keith)
[#2164](https://github.com/realm/SwiftLint/pull/2164)

* Fix operator usage spacing nested generics false positive.
[Eric Horacek](https://github.com/erichoracek)
[#1341](https://github.com/realm/SwiftLint/issues/1341)
[#1897](https://github.com/realm/SwiftLint/issues/1897)

* Fix autocorrection for several rules
(`empty_parentheses_with_trailing_closure`, `explicit_init`,
`joined_default_parameter`, `redundant_optional_initialization` and
`unused_closure_parameter `) when used with preprocessor macros.
[John Szumski](https://github.com/jszumski)
[Marcelo Fabri](https://github.com/marcelofabri)

* Fix `unneeded_parentheses_in_closure_argument` false negatives when multiple
violations are nested.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2188](https://github.com/realm/SwiftLint/issues/2188)

* Fix false negatives in `implicit_return` rule when using closures as
function arguments.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2187](https://github.com/realm/SwiftLint/issues/2187)

* Fix false positives in `attributes` rule when `@testable` is used.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2211](https://github.com/realm/SwiftLint/issues/2211)

* Fix false positives in `prohibited_super_call` rule.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2212](https://github.com/realm/SwiftLint/issues/2212)

* Fix a false positive in `unused_closure_parameter` rule when a parameter
is used in a string interpolation.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2062](https://github.com/realm/SwiftLint/issues/2062)

## 0.25.1: Lid Locked

This is the last release to support building with Swift 3.2 and Swift 3.3.
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Carthage/Commandant" ~> 0.13.0
github "jspahrsummers/xcconfigs" "master"
github "jspahrsummers/xcconfigs" ~> 0.12.0
github "jpsim/Yams" ~> 0.7
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "Carthage/Commandant" "0.13.0"
github "antitypical/Result" "3.2.4"
github "drmohundro/SWXMLHash" "4.6.0"
github "drmohundro/SWXMLHash" "4.7.0"
github "jpsim/SourceKitten" "0.21.0"
github "jpsim/Yams" "0.7.0"
github "jspahrsummers/xcconfigs" "bb795558a76e5daf3688500055bbcfe243bffa8d"
github "jspahrsummers/xcconfigs" "0.12"
github "scottrhoyt/SwiftyTextTable" "0.8.0"
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ let package = Package(
"Resources",
]
)
],
swiftLanguageVersions: [3, 4]
]
)
Loading

0 comments on commit dc25cc3

Please sign in to comment.