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
Interactive holywars about linters
Search
Sobolev Nikita
October 22, 2018
Programming
0
56
Interactive holywars about linters
Sobolev Nikita
October 22, 2018
Tweet
Share
More Decks by Sobolev Nikita
See All by Sobolev Nikita
PythoNN – Александр Гончаров
sobolevn
0
29
PythoNN – Андрей Пронин
sobolevn
0
52
PythoNN: Василий Рябов – "Парсинг бинарных данных с помощью ctypes, или пишем на питоне как на Си"
sobolevn
0
150
GitHub Planet - OpenSource
sobolevn
0
190
Polymorphism and Typeclasses
sobolevn
2
100
New GitHub Features
sobolevn
0
37
Problems of static analysis in Python
sobolevn
0
92
Announcing typed-linter
sobolevn
0
190
About GitHub Stars
sobolevn
0
160
Other Decks in Programming
See All in Programming
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
160
Scan with Decoupled Look-back and Onesweep Radix Sort
shocker_0x15
0
160
Piniaの現状と今後
waka292
5
1.1k
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
3
150
書籍『LangChainとLangGraphによるRAG・AIエージェント[実践]入門』の紹介
os1ma
2
130
Folding Cheat Sheet #8
philipschwarz
PRO
0
140
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
290
The future of development – Are our jobs getting harder or easier?
hollycummins
1
220
How to debug Xdebug... or any other weird bug in PHP
dunglas
2
1.5k
知られざるNaNの世界
hole
3
1.1k
LangChain & LangServeでAPIを爆速作成
kijitorabuti
2
370
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
1
330
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Gamification - CAS2011
davidbonilla
80
5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Designing for humans not robots
tammielis
249
25k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
130k
Side Projects
sachag
452
42k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Rails Girls Zürich Keynote
gr2m
93
13k
Transcript
Холиварный доклад про линтеры Никита Соболев, wemake.services
Зачем нам линтеры? 2
• Делать код похожим • Облегчать жизнь на ревью •
Находить то, что трудно найти 3
Какие бывают линтеры? • Только стиль • Best practices •
Type checking 4
5 Тесты Линтеры CR
6
None
Вот тут возникают проблемы 8
Как выглядит процесс? • Присылают код • Ревьюер видит ошибку
• Вот бы она больше не возникала 9
А давайте свой линтер запилим! 10
Но ведь уже есть другие? 11
12 Рубрика "Почему не pylint?"
SonarQube 13
Flake8 14
15 Плагины Плагины Плагины Плагины Плагины Плагины Плагины Плагины Плагины
Плагины Плагины Плагины Плагины
wemake-python-styleguide Самый строгий линтер в мире 16
Что значит – строгий? 17
18
• Много проверок ~200 • Без компромиссов • Без настроек
(WIP) 19
От кого зависим? • Flake8 • Eradicate • Isort •
Bandit • И еще 20 плагинов 20
Что проверяем? • Сложность • Имена • Консистентность • Лучшие
практики 21
Что такое сложность? 22
Какие бывают метрики? • Cyclomatic Complexity • Arguments / Statements
/ Returns • Cohesion / Coupling • Jones Complexity 23
Водопад сложности 1.Строчка 2.Метод 3.Класс 4.Модуль 24
И нужно рефакторить 25
А все остальное субъективно! 26
27
None
None
30
None
None
33
None
None
None
None
Бонусы! • layer-linter - https://github.com/seddonym/ layer_linter • cohesion - https://github.com/mschwager/
cohesion • vulture - https://github.com/jendrikseipp/ vulture • radon - https://github.com/rubik/radon 38
39
Gratis 40 @Shikhov-P @proha @malinoff @valignatev @AlexArcPy @tipabu @mcproger @TyVik
@geoc0ld @riyasyash @AlwxSin @vergeev @barsovichok @sathwikmatsa @tommbee @lensvol @SheldonNunes @lk-geimfari @novikovfred @ming060 @Roxe322 @vsmaxim @zzz @stebunovd
Ваши вопросы? https://github.com/sobolevn 41