Created
November 13, 2018 12:39
-
-
Save JonathonFry/00d5a7b24e1a5fb3b70044b85c858e6b to your computer and use it in GitHub Desktop.
Dangerfile for Android Danger usage
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
warn("PR is classed as Work in Progress") if bitbucket_cloud.pr_title.include? "[WIP]" | |
warn("Big PR") if git.lines_of_code > 500 | |
junit_tests_dir = "**/test-results/**/*.xml" | |
Dir[junit_tests_dir].each do |file_name| | |
junit.parse file_name | |
junit.report | |
end | |
lint_dir = "**/reports/lint-results.xml" | |
Dir[lint_dir].each do |file_name| | |
android_lint.skip_gradle_task = true | |
android_lint.filtering = true | |
android_lint.report_file = file_name | |
android_lint.lint | |
end | |
checkstyle_dir = "**/checkstyle/checkstyle.xml" | |
Dir[checkstyle_dir].each do |file_name| | |
checkstyle_format.base_path = file_name | |
checkstyle_format.report file_name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment