Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Danger for Android
Search
Daichi Furiya (Wasabeef)
October 25, 2017
Programming
4
3.2k
Danger for Android
Introduction to Danger for Android
Daichi Furiya (Wasabeef)
October 25, 2017
Tweet
Share
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
About Flutter Architecture
wasabeef
0
53
2023 Flutter/Dart Summary
wasabeef
0
14
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
110
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
2.3k
What it Takes to be a Flutter Developer
wasabeef
0
130
FlutterKaigi 2022 Keynote
wasabeef
1
490
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.2k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2k
Flutter Hooks, sometimes Jetpack Compose
wasabeef
3
1.6k
Other Decks in Programming
See All in Programming
Ruby GitHub Packages
bkuhlmann
0
640
Code Reviews
bkuhlmann
4
900
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.2k
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
380
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.5k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1k
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
1k
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
9
4.3k
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
10
1.5k
新宿ダンジョンを可視化してみた
satoshi7190
3
390
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
AppRouter Panel Talk
yosuke_furukawa
PRO
1
470
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
276
33k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
It's Worth the Effort
3n
180
27k
Code Review Best Practice
trishagee
56
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
Optimizing for Happiness
mojombo
370
69k
Designing for humans not robots
tammielis
247
25k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Being A Developer After 40
akosma
66
580k
Transcript
Danger × Android wasabeef Potatotips #44
About me 降矢 大地 (Daichi Furiya) Google Developer Expert @wasabeef_jp
wasabeef
None
コードレビューの自動化をCI上で行う Android Lint, Swift Lint, ESLint, HLint, CheckStyle Format.......
Danger
General
Kotlin lint (Ktlint)
Android Lint
Android Lint
Plugins
Plugins
How to Set Up
Gemfile / Dangerfile の用意 bundle install Bundle exec danger Danger
Gemfile
Gemfile gem "danger" gem "danger-android_lint" gem "danger-findbugs" gem "danger-checkstyle_format"
Dangerfile
Dangerfile for PR # WIP warn("Work in Progress") if github.pr_title.include?
“WIP" # BIG PR warn("Big PR > 1000") if git.lines_of_code > 1000 # NO ASSIGN has_assignee = github.pr_json[assignee] != nil warn("No Assign", sticky: false) unless has_assignee
Dangerfile for Android Lint # Android Lint android_lint.gradle_task = "app:lint"
android_lint.report_file = “path/lint-results.xml” android_lint.filtering = true android_lint.lint(inline_mode: true)
Dangerfile for ktlint # checkstyle for ktlint github.dismiss_out_of_range_messages checkstyle_format.base_path =
Dir.pwd checkstyle_format.report “path/ktlint-report.xml”
Gradle for configurations { ktlint } dependencies { ktlint 'com.github.shyiko:ktlint:0.10.0'
} task ktlint(type: Exec) { commandLine 'java', '-cp', configurations.ktlint.join(System.getProperty('path.separator')), 'com.github.shyiko.ktlint.Main', '--reporter=checkstyle', 'src/**/*.kt' def outputDirectory = "$buildDir/reports" def outputFile = "${outputDirectory}/ktlint-report.xml" ignoreExitValue = true doFirst { new File(outputDirectory).mkdirs() standardOutput = new FileOutputStream(outputFile) } } https://ktlint.github.io/
Execution
Execution // Single bundle exec danger // Multiple bundle exec
danger --dangerfile="app/Dangerfile" --danger_id=1 bundle exec danger --dangerfile="tv/Dangerfile" --danger_id=2
Conclusion
Thank you. twitter.com/wasabeef_jp wasabeef.jp github.com/wasabeef