Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Danger-Swift 導入のススメ / Path to import Danger-Swift
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Elvis Shi
July 22, 2020
Programming
1.3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Danger-Swift 導入のススメ / Path to import Danger-Swift
Elvis Shi
July 22, 2020
More Decks by Elvis Shi
See All by Elvis Shi
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
570
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
570
ゼロから始めるPreferenceの実装 / Let's implement Preferences from scratch
lovee
0
160
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
410
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
790
How did I build an Open-Source SwiftUI Toast Library
lovee
1
190
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
1.3k
SwiftUIで二重スクロール作ってみた / When I tried to make a dual-scroll-ish view in SwiftUI
lovee
1
390
Observation のあれこれ / A brief introduction about Observation
lovee
3
460
Other Decks in Programming
See All in Programming
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
0
300
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.3k
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
170
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
160
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
200
phperだってパンチカードでコーディングしたい
o0h
PRO
0
280
R8 の設定見直しでアプリサイズ削減
andpad
0
210
速習iPhone Duo対応
yuukiw00w
2
980
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Skip the Path - Find Your Career Trail
mkilby
1
250
The Pragmatic Product Professional
lauravandoore
37
7.5k
The Cult of Friendly URLs
andyhume
79
7k
HDC tutorial
michielstock
2
950
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
So, you think you're a good person
axbom
PRO
2
2.2k
Believing is Seeing
oripsolob
1
240
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Transcript
%BOHFS4XJGUಋೖͷεεϝ f o r .PC JMF "D U
0/ - * / &
} var employedBy = "YUMEMI Inc." var job = "iOS
Tech Lead" var favoriteLanguage = "Swift" var twitter = "@lovee" var qiita = "lovee" var github = "el-hoshino" var additionalInfo = """ Nintendo Switch ͕ͳ͔ͳ͔ͨΒͳ͍! """ final class Me: Developable, Talkable {
13 ͷϨϏϡʔͰɺ͜ΜͳࢦఠΑ͘͠·ͤΜ͔ʁ w ςετΛՃ͍ͯͩ͘͠͞ w $IBOHFMPHΛՃ͍ͯͩ͘͠͞ w ͜ͷ -JOU ϫʔχϯάΛमਖ਼͍ͯͩ͘͠͞
w मਖ਼ྔ͕ଟ͗͢ΔͷͰখׂ͍ͯͩ͘͘͞͠͞ w FUD
%BOHFS4XJGU
%BOHFS4XJGUͱ ΤϯδχΞ Ϧϙϗετ ʢ(JU)VCʣ $*$%αʔό ʢ#JUSJTFʣ ᶃίʔυΛ1VTIͯ͠ 13Λग़͢ ᶄτϦΨʔΛൃՐ ᶅςετσϓϩΠ
ͳͲΛ࣮ߦ ᶆ࣮ߦ݁ՌΛฦ͢ %BOHFS4XJGU 13ࠩͷ ੩తղੳ
13ࠩΛ ੩తղੳ͢Δπʔϧ %BOHFS4XJGUͱ
w ϑΝΠϧมߋ֬ೝ w Ϗϧυϫʔχϯά w ϒϥϯν֬ೝ w ςετΧόϨοδ ʢશମʣ w
ςετΧόϨοδ ʢϑΝΠϧ͝ͱʣ
ػցݕࠪͰ ϨϏϡΞʔͷෛ୲ΛݮΒ͢πʔϧ %BOHFS4XJGUͱ
Ͱ%BOHFS4XJGUΛ ಋೖͯ͠ΈΑ͏
IUUQTHJUIVCDPNEBOHFSTXJGU
%BOHFS4XJGUͷಋೖᶃϩʔΧϧฤ .JOUΛ͏ํ๏͋Δ͕ɺݱࡏόά͕͋ΔͬΆ͍ͷͰͷؒ)PNFCSFXͷํ͕͓͢͢Ί $ brew install danger-swift * $ cd path/to/project
$ danger-swift edit $ # edit in Xcode $ # return $ # Dangerfile.swift generated
%BOHFS4XJGUͷಋೖᶄಈ࡞ςετฤ $ # Create a Pull Request $ danger-swift pr
url/to/pr
%BOHFS4XJGUͷಋೖᶅ$*࣮ߦฤ .JOUΛ͏ํ๏͋Δ͕ɺݱࡏόά͕͋ΔͬΆ͍ͷͰͷؒ)PNFCSFXͷํ͕͓͢͢Ί $ brew install danger-swift * $ # set
$DANGER_GITHUB_API_TOKEN $ danger-swift ci
͢Ͱʹ%BOHFS͕͋Δͷʹ ͳͥ%BOHFS4XJGUΛਪ͔͢
%BOHFS %BOHFS4XJGU
ϓϩύςΟʔએݴͷδϟϯϓ
%BOHFSΑΓ%BOHFS4XJGU͕͍͍ͱ͜Ζ w ͍׳ΕͯΔ4XJGUͰ%BOHFSpMFॻ͚ΔͷͰɺॻ͘ ͷಡΉͷ3VCZΑΓָʢJ04ΤϯδχΞతʹʣ w *%&ͷαϙʔτ͕ड͚ΒΕΔͷͰɺ༷ΛશʹѲ Ͱ͖ͯͳͯ͘τϥΠˍΤϥʔͰॻ͍͍͚ͯΔ w ߏจΤϥʔϏϧυΤϥʔͳͷͰɺϩʔΧϧͰͷಈ࡞ ςετ3VCZϑΝΠϧΑΓίετ͕͍
w 4XJGU1.ϓϩδΣΫτରԠͷϓϥάΠϯ͕%BOHFS ΑΓॆ࣮
13ͷϨϏϡʔͰɺ͜ΜͳࢦఠΑ͘͠·ͤΜ͔ʁ w ςετΛՃ͍ͯͩ͘͠͞ w $IBOHFMPHΛՃ͍ͯͩ͘͠͞ w ͜ͷ-JOUϫʔχϯάΛमਖ਼͍ͯͩ͘͠͞ w मਖ਼ྔ͕ଟ͗͢ΔͷͰখׂ͍ͯͩ͘͘͞͠͞ w
FUD
%BOHFSpMFTXJGUαϯϓϧ let danger = Danger() // ςετΧόϨοδΛ֬ೝ import DangerSwiftCoverage //
package: https://github.com/f-meloni/danger-swift-coverage.git Coverage.xcodeBuildCoverage(.xcresultBundle("Test.xcresult"), minimumCoverage: 60) // Changelog ฤूঢ়گ֬ೝ if !danger.git.modifiedFiles.contains(where: { $0 == "CHANGELOG.md" }) { danger.warn("CHANGELOG Λฤू͍ͯͩ͘͠͞ɻ") } // SwiftLint ϫʔχϯάΛ֬ೝ SwiftLint.lint() // मਖ਼ྔΛ֬ೝ let additions = danger.github.pullRequest.additions ?? 0 let deletions = danger.github.pullRequest.deletions ?? 0 if additions + deletions > 1_000 { danger.warn("मਖ਼ྔ͕ଟ͗͢Ͱ͢ɻPR Λখׂ͍ͯͩ͘͘͞͠͞ɻ") } // ϦϦʔεલͷόʔδϣϯ൪߸มߋ֬ೝ import DangerSwiftHammer // package: https://github.com/el-hoshino/DangerSwiftHammer.git if danger.github.pullRequest.head.ref == "master" { let xcodeprojFileDiff = danger.hammer.diffLines(in: "Project.xcodeproj/project.pbxproj") if !xcodeprojFileDiff.additions.contains(where: { $0.contains("MARKETING_VERSION = ") }) { danger.warn("ϦϦʔεલʹόʔδϣϯ൪߸Λมߋ͍ͯͩ͘͠͞") } }
͞Βʹৄ͘͠ɿ IUUQTRJJUBDPNMPWFFJUFNTBEBFC
ࢀߟࢿྉ w IUUQTEBOHFSTZTUFNTTXJGU w IUUQTEBOHFSTZTUFNTSVCZ w IUUQTHJUIVCDPNEBOHFSTXJGU w IUUQTHJUIVCDPNFMIPTIJOP2VJDLTIB3FCMPC EFWFMPQ%BOHFSpMFTXJGU