diff --git a/BuildTools/.gitignore b/BuildTools/.gitignore new file mode 100644 index 000000000000..389a2b20c85b --- /dev/null +++ b/BuildTools/.gitignore @@ -0,0 +1 @@ +Pods/ diff --git a/BuildTools/BuildTools.xcworkspace/contents.xcworkspacedata b/BuildTools/BuildTools.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000000..f7cc7eaf663d --- /dev/null +++ b/BuildTools/BuildTools.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/BuildTools/Podfile b/BuildTools/Podfile new file mode 100644 index 000000000000..03724f19ea58 --- /dev/null +++ b/BuildTools/Podfile @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +install! 'cocoapods', warn_for_multiple_pod_sources: false +source 'https://cdn.cocoapods.org/' + +platform :macos, '14.7' + +workspace 'BuildTools.xcworkspace' + +raise 'Please run CocoaPods via `bundle exec`' unless %w[BUNDLE_BIN_PATH BUNDLE_GEMFILE].any? { |k| ENV.key?(k) } + +def swiftlint_version + require 'yaml' + + YAML.load_file(File.join(__dir__, '..', '.swiftlint.yml'))['swiftlint_version'] +end + +abstract_target 'Tools' do + pod 'SwiftLint', swiftlint_version +end diff --git a/BuildTools/Podfile.lock b/BuildTools/Podfile.lock new file mode 100644 index 000000000000..1cb6e787a59e --- /dev/null +++ b/BuildTools/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - SwiftLint (0.54.0) + +DEPENDENCIES: + - SwiftLint (= 0.54.0) + +SPEC REPOS: + trunk: + - SwiftLint + +SPEC CHECKSUMS: + SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211 + +PODFILE CHECKSUM: 7730df0264c48e50b44d012d182d69ab1535a3f0 + +COCOAPODS: 1.16.2 diff --git a/Gemfile b/Gemfile index 5a695848f690..d76b841ff82f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,7 @@ source 'https://rubygems.org' +gem 'cocoapods' gem 'danger-dangermattic', '~> 1.2' gem 'dotenv' # 2.223.1 includes a fix for an ASC-interfacing issue diff --git a/Gemfile.lock b/Gemfile.lock index 1e61f63a071a..fc98b295b356 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,6 +19,9 @@ GEM tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) artifactory (3.0.17) ast (2.4.2) atomos (0.1.3) @@ -50,6 +53,43 @@ GEM cork nap open4 (~> 1.3) + cocoapods (1.16.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.16.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.27.0, < 2.0) + cocoapods-core (1.16.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) colored (1.2) colored2 (3.1.2) commander (4.6.0) @@ -90,6 +130,9 @@ GEM dotenv (2.8.1) drb (2.2.1) emoji_regex (3.2.3) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) excon (0.112.0) faraday (1.10.4) faraday-em_http (~> 1.0) @@ -186,6 +229,9 @@ GEM xcodeproj (~> 1.22) fastlane-sirp (1.0.0) sysrandom (~> 1.0) + ffi (1.17.1) + fourflusher (2.3.1) + fuzzy_match (2.0.4) gh_inspector (1.1.3) git (1.19.1) addressable (~> 2.8) @@ -247,11 +293,13 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.8) minitest (5.25.4) + molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.4.1) nanaimo (0.4.0) nap (1.1.0) naturally (2.2.1) + netrc (0.11.0) nkf (0.2.0) nokogiri (1.17.2) mini_portile2 (~> 2.8.2) @@ -304,6 +352,7 @@ GEM parser (>= 3.3.1.0) rubocop-rake (0.6.0) rubocop (~> 1.0) + ruby-macho (2.5.1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.3.2) @@ -329,6 +378,8 @@ GEM tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) + typhoeus (1.4.1) + ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) @@ -350,6 +401,7 @@ PLATFORMS ruby DEPENDENCIES + cocoapods danger-dangermattic (~> 1.2) dotenv fastlane (~> 2.226) diff --git a/Rakefile b/Rakefile index eac33904e239..b43885d680c5 100644 --- a/Rakefile +++ b/Rakefile @@ -154,7 +154,9 @@ end desc 'Checks the source for style errors' task :lint do - puts 'No linter configured at the moment.' + # FIXME: Use proper Rake + sh 'pushd BuildTools; bundle install; bundle exec po install; popd' + sh 'BuildTools/Pods/SwiftLint/swiftlint' end namespace :git do