Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
|
|||
has_source_changes = !git.modified_files.grep(/Sources.*\.swift/).empty? || !git.added_files.grep(/Sources.*\.swift/).empty? | |||
has_tests_changes = !git.modified_files.grep(/Sources\/TabmanTests.*\.swift/).empty? || !git.added_files.grep(/Sources\/TabmanTests.*\.swift/).empty? | |||
|
|||
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet | |||
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" | |||
|
|||
# Warn when there is a big PR | |||
warn("This PR might be a little too big, consider breaking it up.") if git.lines_of_code > 500 | |||
|
|||
# Require PR description | |||
warn "Please provide a summary in the PR description, it makes it easier to understand!" if github.pr_body.length < 5 | |||
|
|||
# Check for source changes and prompt for test updates if non added. | |||
if (has_source_changes && ! has_tests_changes) | |||
warn("Looks like you changed some source files, should there have been some tests added?") | |||
end | |||
|
|||
swiftlint.lint_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,5 +1,7 @@ | |||
|
|
||
source 'https://rubygems.org' | source 'https://rubygems.org' | ||
|
|
||
gem "fastlane" | gem 'fastlane' | ||
gem "cocoapods" | gem 'cocoapods' | ||
gem 'danger' | |||
gem 'danger-swiftlint' |