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
EditorConfigで導くコードの「美しさ」
Search
ASKUL Engineer
March 14, 2022
Technology
0
560
EditorConfigで導くコードの「美しさ」
@MxShun
https://rakus.connpass.com/event/238395/
ASKUL Engineer
March 14, 2022
Tweet
Share
More Decks by ASKUL Engineer
See All by ASKUL Engineer
いまさら聞けないAWS
askul
0
5.2k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
150
チームでリーダブルコードを実現するには?
askul
0
2.8k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
720
Discord Bot はじめの一歩
askul
0
580
10分で「エラスティックリーダーシップ」をアウトプット
askul
0
3.1k
1on1をする上で大切なこと
askul
1
700
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3k
GCPを活用した物流倉庫内の異常検知/Anomaly detection in distribution warehouse using GCP
askul
0
3.3k
Other Decks in Technology
See All in Technology
5分で紹介する生成AIエージェントとAmazon Bedrock Agents / 5-minutes introduction to generative AI agents and Amazon Bedrock Agents
hideakiaoyagi
0
220
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
230
Building Products in the LLM Era
ymatsuwitter
10
4.4k
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
480
テストアーキテクチャ設計で実現する高品質で高スピードな開発の実践 / Test Architecture Design in Practice
ropqa
3
710
Kubernetes x k6 で負荷試験基盤を開発して 負荷試験を民主化した話 / Kubernetes x k6
sansan_randd
2
730
WAF に頼りすぎない AWS WAF 運用術 meguro sec #1
izzii
0
460
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.5k
株式会社EventHub・エンジニア採用資料
eventhub
0
4.2k
家電アプリ共通PF "Linova" のAPI利用とPostman活用事例ご紹介
yukiogawa
0
130
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
320
開発者が自律的に AWS Security Hub findings に 対応する仕組みと AWS re:Invent 2024 登壇体験談 / Developers autonomously report AWS Security Hub findings Corresponding mechanism and AWS re:Invent 2024 presentation experience
kaminashi
0
190
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
The Invisible Side of Design
smashingmag
299
50k
Code Reviewing Like a Champion
maltzj
521
39k
Gamification - CAS2011
davidbonilla
80
5.1k
Designing for Performance
lara
604
68k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Typedesign – Prime Four
hannesfritz
40
2.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
A Philosophy of Restraint
colly
203
16k
How STYLIGHT went responsive
nonsquared
98
5.3k
Speed Design
sergeychernyshev
25
780
Why Our Code Smells
bkeepers
PRO
335
57k
Transcript
EditorConfig で導く コードの「美しさ」 アスクル株式会社 三浦 駿
自己紹介 三浦 駿 @MxShun 20年 20年10月~ サイト統合PJに参画 21年 21年11月~ スクラムマスターを担う
屋外でエンジニアリングするのがマイブーム 4月~ アスクル株式会社 フルスタックエンジニア(になりたい) 6月~ PJの品質向上隊として活動
弊社紹介 事業所向け(BtoB)通信事業 事業所向け通販サービス 一般消費者向け通販サービス
本日の内容 • コードの「美しさ」を保ちましょう • (いまさらですが)EditorConfig 便利です
コードの「美しさ」とは Good source code should be just as “easy on
the eyes.” • Use consistent layout, with patterns the reader can get used to. • Make similar code look similar. • Group related lines of code into blocks. “The Art of Readable Code” Chapter 4. Aesthetics より引用
コード「美しさ」をめぐる議論 インデントは Tab?空文字? サイズは? 末尾行は入れる?入れない? 改行コードは LF?CRLF?
EditorConfig エディタやIDEを跨いてコードフォーマットを管理・統一する仕組み .editorconfig ファイルで構成を管理する
EditorConfig Properties • indent_style • indent_size • tab_width • end_of_line
• charset • trim_trailing_whitespace • insert_final_newline • max_line_length *詳しくは EditorConfig GitHub wiki “EditorConfig Properties” を参照のこと “tab” か “space” “tab” か 任意サイズ 任意サイズ “lf” か “crlf” か “cr” 選択 選択 選択 “off” か 任意サイズ(一部エディタのみ)
EditorConfig と Lint の掛け合わせ ktlint* は EditorConfig の設定を見て静的コード解析をしてくれる つまりコードフォーマットを包括的に管理ができる *Kotlin
向け Linter のデファクトスタンダード
本日の内容 • コードの「美しさ」を保ちましょう • (いまさらですが)EditorConfig 便利です
告知 https://www.askul.co.jp/kaisya/dx https://tech.askul.co.jp