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
580
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.5k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
160
チームでリーダブルコードを実現するには?
askul
0
2.9k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
750
Discord Bot はじめの一歩
askul
0
620
10分で「エラスティックリーダーシップ」をアウトプット
askul
0
3.3k
1on1をする上で大切なこと
askul
1
740
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.1k
GCPを活用した物流倉庫内の異常検知/Anomaly detection in distribution warehouse using GCP
askul
0
3.3k
Other Decks in Technology
See All in Technology
品質文化を支える小さいクロスファンクショナルなチーム / Cross-functional teams fostering quality culture
toma_sm
0
180
ここはMCPの夜明けまえ
nwiizo
32
13k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
2
440
Mastraに入門してみた ~AWS CDKを添えて~
tsukuboshi
0
370
QA/SDETの現在と、これからの挑戦
imtnd
0
200
コスト最適重視でAurora PostgreSQLのログ分析基盤を作ってみた #jawsug_tokyo
non97
1
840
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
220
Gateway H2 モジュールで スマートホーム入門
minoruinachi
0
120
生成AIによるCloud Native基盤構築の可能性と実践的ガードレールの敷設について
nwiizo
7
1.4k
PostgreSQL Log File Mastery: Optimizing Database Performance Through Advanced Log Analysis
shiviyer007
PRO
1
150
AIにおけるソフトウェアテスト_ver1.00
fumisuke
1
330
生成AIのユースケースをとにかく集めてまるっと学ぶ!/ all about generative ai usecases
gakumura
3
350
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Writing Fast Ruby
sferik
628
61k
GraphQLとの向き合い方2022年版
quramy
46
14k
The Invisible Side of Design
smashingmag
299
50k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
KATA
mclloyd
29
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
YesSQL, Process and Tooling at Scale
rocio
172
14k
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