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
600
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.7k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
170
チームでリーダブルコードを実現するには?
askul
0
3k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
790
Discord Bot はじめの一歩
askul
0
640
10分で「エラスティックリーダーシップ」をアウトプット
askul
0
3.4k
1on1をする上で大切なこと
askul
1
780
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.2k
GCPを活用した物流倉庫内の異常検知/Anomaly detection in distribution warehouse using GCP
askul
0
3.4k
Other Decks in Technology
See All in Technology
From Live Coding to Vibe Coding with Firebase Studio
firebasethailand
1
100
Expertise as a Service via MCP
yodakeisuke
1
140
Power Automate のパフォーマンス改善レシピ / Power Automate Performance Improvement Recipes
karamem0
0
130
Jitera Company Deck / JP
jitera
0
140
エンジニアリングマネージャー“お悩み相談”パネルセッション
ar_tama
1
650
Microsoft Fabric ガバナンス設計の一歩目を考える
ryomaru0825
1
260
PHPからはじめるコンピュータアーキテクチャ / From Scripts to Silicon: A Journey Through the Layers of Computing
tomzoh
2
380
The Madness of Multiple Gemini CLIs Developing Simultaneously with Jujutsu
gunta
1
2.5k
Semantic Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
2
390
激動の時代、新卒エンジニアはAIツールにどう向き合うか。 [LayerX Bet AI Day Countdown LT Day1 ツールの選択]
tak848
0
540
MCP とマネージド PaaS で実現する大規模 AI アプリケーションの高速開発
nahokoxxx
1
1.4k
少人数でも回る! DevinとPlaybookで支える運用改善
ishikawa_pro
1
210
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Building Applications with DynamoDB
mza
95
6.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Making Projects Easy
brettharned
116
6.3k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Optimizing for Happiness
mojombo
379
70k
Designing for humans not robots
tammielis
253
25k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
4 Signs Your Business is Dying
shpigford
184
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
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