Skip to content

Commit

Permalink
Append to .swiftlint.yml config file in OSS check (#5385)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyDanny authored Dec 10, 2023
1 parent 06287d5 commit 0b7a6f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/oss-check
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ def setup_repos
swiftlint_config = "#{dir}/.swiftlint.yml"
FileUtils.rm_rf(swiftlint_config)
if repo.name == 'Wire'
File.open(swiftlint_config, 'w') do |file|
file.puts('excluded: wire-ios/Templates/Viper')
File.open(swiftlint_config, 'a') do |file|
file.puts('excluded:')
file.puts(' - wire-ios/Templates/Viper')
end
end
if @only_rules_changed && @rules_changed
File.open(swiftlint_config, 'w') do |file|
File.open(swiftlint_config, 'a') do |file|
file.puts('only_rules:')
file.puts(@rules_changed.map { |rule| " - #{rule}" })
end
Expand Down

0 comments on commit 0b7a6f7

Please sign in to comment.