Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dangerfile for Android Danger usage
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