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

Swiftlint 0.31 & some new rules #116

Merged
merged 5 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
swiftlint_version: 0.30.1
swiftlint_version: 0.31.0

opt_in_rules:
- anyobject_protocol
Expand All @@ -8,13 +8,16 @@ opt_in_rules:
- closure_end_indentation
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- duplicate_imports
- empty_count
- empty_string
- empty_xctest_method
- fallthrough
- fatal_error_message
- file_header
Expand All @@ -23,10 +26,8 @@ opt_in_rules:
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- inert_defer
- joined_default_parameter
- last_where
- legacy_hashing
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
Expand All @@ -47,23 +48,27 @@ opt_in_rules:
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- redundant_objc_attribute
- sorted_first_last
- sorted_imports
- static_operator
- strong_iboutlet
- switch_case_on_newline
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unused_control_flow_label
- unused_setter_value
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- weak_computed_property
- xct_specific_matcher
- yoda_condition

# Rules customization
conditional_returns_on_newline:
if_only: true

file_header:
required_pattern: |
\/\/
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ _None_

### Internal Changes

_None_
* Update to SwiftLint 0.31.0 and enable some extra SwiftLint rules.
[David Jennes](https://github.com/djbe)
[#116](https://github.com/SwiftGen/StencilSwiftKit/pull/116)

## 2.7.2

Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ end

# In addition to :build, for contributing
group :development do
gem 'cocoapods', '~> 1.6.0.rc.1'
gem 'rubocop', '~> 0.63'
gem 'cocoapods', '~> 1.6.0'
gem 'rubocop', '~> 0.65'
end

# For releasing to GitHub
Expand Down
30 changes: 16 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ GEM
ast (2.4.0)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.6.0.rc.1)
cocoapods (1.6.1)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.0.rc.1)
cocoapods-core (= 1.6.1)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -25,17 +25,17 @@ GEM
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.1.0)
fourflusher (>= 2.2.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.3, >= 1.3.1)
xcodeproj (>= 1.8.0, < 2.0)
cocoapods-core (1.6.0.rc.1)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.1, < 2.0)
cocoapods-core (1.6.1)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-deintegrate (1.0.3)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
nap
Expand All @@ -50,7 +50,7 @@ GEM
escape (0.0.4)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
fourflusher (2.1.0)
fourflusher (2.2.0)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
Expand All @@ -64,23 +64,25 @@ GEM
netrc (0.11.0)
octokit (4.13.0)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.13.0)
parallel (1.14.0)
parser (2.6.0.0)
ast (~> 2.4.0)
powerpack (0.1.2)
psych (3.1.0)
public_suffix (3.0.3)
rainbow (3.0.0)
rake (12.3.2)
rouge (2.0.7)
rubocop (0.63.1)
rubocop (0.65.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
psych (>= 3.1.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-macho (1.3.1)
ruby-macho (1.4.0)
ruby-progressbar (1.10.0)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
Expand All @@ -89,7 +91,7 @@ GEM
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.1)
xcodeproj (1.8.0)
xcodeproj (1.8.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -102,10 +104,10 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.6.0.rc.1)
cocoapods (~> 1.6.0)
octokit (~> 4.13)
rake (~> 12.3)
rubocop (~> 0.63)
rubocop (~> 0.65)
xcpretty

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ raise 'Please use bundle exec to run the pod command' unless defined?(Bundler)

target 'Tests' do
pod 'StencilSwiftKit', path: '.'
pod 'SwiftLint', '~> 0.30'
pod 'SwiftLint', '~> 0.31'
end
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ PODS:
- PathKit (~> 0.9.0)
- StencilSwiftKit (2.7.2):
- Stencil (~> 0.13.1)
- SwiftLint (0.30.1)
- SwiftLint (0.31.0)

DEPENDENCIES:
- StencilSwiftKit (from `.`)
- SwiftLint (~> 0.30)
- SwiftLint (~> 0.31)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
Expand All @@ -24,8 +24,8 @@ SPEC CHECKSUMS:
PathKit: 273f59a38e3218eb95abd9f6a61730a8bcfd2f06
Stencil: b5128a0a43ece9225db5cbd94d6569fe6fba609b
StencilSwiftKit: 9ebd42556b6c7396440f286b6c9aca1549c963ff
SwiftLint: a54bf1fe12b55c68560eb2a7689dfc81458508f7
SwiftLint: 7a0227733d786395817373b2d0ca799fd0093ff3

PODFILE CHECKSUM: 3b7a88190f628a5b558919e2cdb79ba9e9a27c2f
PODFILE CHECKSUM: ea156eb15e31a283c83a103d9155c8b32b3598c1

COCOAPODS: 1.6.0.rc.1
COCOAPODS: 1.6.1
10 changes: 5 additions & 5 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Pods/SwiftLint/swiftlint
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Sources/StencilSwiftKit/Parameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ public enum Parameters {
}
case let array as [Any]:
values += array.flatMap { flatten(object: $0, keyPrefix: keyPrefix) }
default: break
default:
break
}
return values
}
Expand Down
Loading