Skip to content
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
5 changes: 4 additions & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
--rules redundantRawValues
--rules redundantVoidReturnType
--rules semicolons
--rules sortedImports
--rules sortImports
--rules spaceAroundBraces
--rules spaceAroundBrackets
--rules spaceAroundComments
Expand Down Expand Up @@ -78,3 +78,6 @@
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first

# Exclude paths
--exclude Sources/StreamCore/Generated,Sources/StreamCore/generated,vendor/bundle,Pods,spm_cache,derived_data,.build
7 changes: 0 additions & 7 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ excluded:
- .ruby-lsp
- .swiftpm
- derived_data
- fastlane
- Package.swift
- Scripts
- Sources/StreamCore/Generated
- Sources/StreamCore/generated
- spm_cache
Expand Down Expand Up @@ -50,7 +47,6 @@ only_rules:
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- unneeded_break_in_switch
- unneeded_override
- unused_closure_parameter
Expand All @@ -62,8 +58,5 @@ only_rules:
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true

trailing_whitespace:
ignores_empty_lines: true

file_name_no_space:
severity: error
11 changes: 4 additions & 7 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,9 @@ desc 'Run source code formatting/linting'
lane :run_swift_format do |options|
Dir.chdir('..') do
strict = options[:strict] ? '--lint' : nil
sources_matrix[:swiftformat].each do |path|
sh("swiftformat #{strict} --config .swiftformat #{path}")
sh("swiftlint lint --config .swiftlint.yml --fix --progress --reporter json #{path}") unless strict
sh("swiftlint lint --config .swiftlint.yml --strict --progress --reporter json #{path}")
end
sh("swiftformat #{strict} --config .swiftformat .")
sh("swiftlint lint --config .swiftlint.yml --fix --progress --reporter json") unless strict
sh("swiftlint lint --config .swiftlint.yml --strict --progress --reporter json")
end
end

Expand All @@ -153,8 +151,7 @@ lane :sources_matrix do
{
llc: ['Sources/StreamCore/', 'Tests/StreamCoreTests'],
ui: ['Sources/StreamCoreUI/', 'Tests/StreamCoreUITests'],
ruby: ['fastlane', 'Gemfile', 'Gemfile.lock'],
swiftformat: ['Sources', 'Tests', 'Package.swift']
ruby: ['fastlane', 'Gemfile', 'Gemfile.lock']
}
end

Expand Down
6 changes: 0 additions & 6 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ pre-commit:
- run: swiftlint lint --config .swiftlint.yml --fix --progress --reporter json {staged_files}
glob: "*.{swift}"
stage_fixed: true
exclude:
- "**/generated/**"
- "**/Generated/**"
skip:
- merge
- rebase
Expand All @@ -22,8 +19,5 @@ pre-push:
jobs:
- run: swiftlint lint --config .swiftlint.yml --strict --progress --reporter json {push_files}
glob: "*.{swift}"
exclude:
- "**/generated/**"
- "**/Generated/**"
skip:
- merge-commit
Loading