Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

Danger #106

Closed
wants to merge 6 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ fastlane/test_output

## AppCode
.idea/

## Ruby-related
Gemfile.lock
4 changes: 0 additions & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ included:
type_body_length:
- 400 #warning
- 600 #error

file_length:
- 800 #warning
- 1000 #error
17 changes: 17 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Lint all Swift files
swiftlint.lint_files inline_mode: true

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
if github.pr_title.include? "[WIP]"
warn "PR is classed as Work in Progress"
end

# Warn when there is a big PR
if git.lines_of_code > 500
warn "Big PR"
end

# Mainly to encourage writing up some reasoning about the PR, rather than just leaving a title
if github.pr_body.length == 0
warn "Please provide a summary in the Pull Request description"
end
4 changes: 4 additions & 0 deletions GEMFILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'danger'
gem 'danger-swiftlint'
6 changes: 1 addition & 5 deletions buddybuild_postclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

swift package generate-xcodeproj

if ! which swiftlint >/dev/null; then
brew install swiftlint
fi

swiftlint
brew upgrade swiftlint