Skip to content

Commit

Permalink
Update .travis.yml and lint.sh, try to fix Instagram#1060 and lint er…
Browse files Browse the repository at this point in the history
…rors #trivial

Summary:
project:
- fix file target membership issues in framework targets and test targets
- fix private/internal header imports, which shouldn't be `<IGListKit/` apparently
- fix static analyzer errors

travis:
- always install latest swiftlint
- ~~don't cache bundler, attempts to fix Instagram#1060~~
- remove markdown link check

swiftlint:
- make script non-failing if *any* version of swiftlint is installed
- warning if incorrect version is installed
- fail if not installed
- remove `scripts/generate_ci_yaml.rb`, we can just set the config file path directly
Closes Instagram#1068

Differential Revision: D6885575

Pulled By: rnystrom

fbshipit-source-id: 51b7baa73feefcea71d870c1220d0382df484199
  • Loading branch information
jessesquires authored and facebook-github-bot committed Feb 2, 2018
1 parent 29a82d7 commit 95b779a
Show file tree
Hide file tree
Showing 22 changed files with 975 additions and 941 deletions.
35 changes: 16 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ language: objective-c
osx_image: xcode9.2
gemfile: Gemfile

branches:
only:
- master
- stable

cache:
- cocoapods
- bundler
Expand All @@ -25,34 +30,26 @@ env:
- EXAMPLE_SCHEME="IGListKitExamples"

matrix:
- DESTINATION="OS=8.4,name=iPhone 5s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="YES" RUN_UI_TESTS="NO" RUN_UI_TESTS="NO" POD_LINT="YES" CHECK_MARKDOWN="YES"

- DESTINATION="OS=9.3,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="YES"

- DESTINATION="OS=10.3.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.3.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.2,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"

- DESTINATION="OS=11.2,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.2,name=Apple TV 4K" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"

- DESTINATION="OS=10.2,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=11.2,name=Apple TV 4K" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="arch=x86_64" SDK="$MACOS_SDK" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="arch=x86_64" SDK="$MACOS_SDK" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"

before_install:
- ruby scripts/generate_ci_yaml.rb
# - gem install cocoapods --no-rdoc --no-ri --no-document --quiet
# - gem install bundler --no-rdoc --no-ri --no-document --quiet
# - bundle install
- brew update
- brew outdated swiftlint || brew upgrade swiftlint

script:
- set -o pipefail
- xcodebuild -version -sdk

- if [ $CHECK_MARKDOWN == "YES" ]; then
npm install -g markdown-link-check;
find . -name "*.md" -not -path "./.vendor/*" | while read filename; do
echo "Searching $filename";
cat "$filename" | markdown-link-check;
done
fi


- if [ $POD_LINT == "YES" ]; then
bundle exec pod lib lint;
Expand Down
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ if (added_source_files || deleted_source_files) && (ios_pods_not_updated || maco
end

swiftlint.verbose = true
swiftlint.config_file = '.swiftlint_CI.yml'
swiftlint.config_file = './Examples/.swiftlint.yml'
swiftlint.lint_files(inline_mode: true)
16 changes: 8 additions & 8 deletions Examples/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
included:
- IGListKitExamples
- IGListKitMessageExample
- IGListKitTodayExample

excluded:
- Pods

opt_in_rules:
- empty_count
- number_separator
Expand All @@ -12,14 +20,6 @@ disabled_rules:
- line_length
- force_cast

included:
- IGListKitExamples
- IGListKitMessageExample
- IGListKitTodayExample

excluded:
- Pods

force_cast: warning
force_try: warning

Expand Down
488 changes: 244 additions & 244 deletions Examples/Examples-iOS/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

488 changes: 244 additions & 244 deletions Examples/Examples-macOS/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

488 changes: 244 additions & 244 deletions Examples/Examples-tvOS/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'cocoapods', '1.4.0'
gem 'cocoapods', '~> 1.4.0'
gem 'danger', '~> 5.0'
gem 'danger-swiftlint', '~> 0.12.1'
gem 'slather', '~> 2.4.0'
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ GEM
concurrent-ruby (1.0.5)
cork (0.3.0)
colored2 (~> 3.1)
danger (5.5.6)
danger (5.5.9)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -77,11 +77,11 @@ GEM
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
git (1.3.0)
i18n (0.9.1)
i18n (0.9.3)
concurrent-ruby (~> 1.0)
kramdown (1.16.2)
mini_portile2 (2.1.0)
minitest (5.10.3)
minitest (5.11.3)
molinillo (0.6.4)
multipart-post (2.0.0)
nanaimo (0.2.3)
Expand Down Expand Up @@ -125,7 +125,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.4.0)
cocoapods (~> 1.4.0)
danger (~> 5.0)
danger-swiftlint (~> 0.12.1)
slather (~> 2.4.0)
Expand Down
184 changes: 105 additions & 79 deletions IGListKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 95b779a

Please sign in to comment.