Как укротить SwiftLint в масштабах компании

Всем привет! Меня зовут Артём Вичужанин. В разработке я больше пяти лет: начинал с десктопных приложений на Delphi и микропрограмм для контроллеров на C++, позже ушел в мобильную разработку. Сейчас в Naumen я отвечаю за разработку мобильных продуктов, и в рамках проектов регулярно сталкиваюсь с вопросами качества кода и автоматизации. Именно в корпоративной разработке особенно остро чувствуется: чем больше проектов и команд, тем сложнее удерживать единый стиль кода. В этой статье я делюсь опытом настройки SwiftLint сразу для нескольких репозиториев — так, чтобы кодстайл оставался единым и не расползался со временем.

https://habr.com/ru/companies/naumen/articles/981474/

#SwiftLint #кодстайл #линтер #Swift #iOS_разработка #качество_кода #статический_анализ_кода

Как укротить SwiftLint в масштабах компании

Всем привет! Меня зовут Артём Вичужанин. В разработке я больше пяти лет: начинал с десктопных приложений на Delphi и микропрограмм для контроллеров на C++, позже ушел...

Хабр

@mattiem Version 0.62.2 containing the new rule has just been released.

https://github.com/realm/SwiftLint/releases/tag/0.62.2

#swiftlang #swift #swiftlint

Release 0.62.2: Generous Drum Volume · realm/SwiftLint

0.62.2: Generous Drum Volume Enhancements Add new incompatible_concurrency_annotation rule that triggers when a declaration isolated to a global actor, @Sendable closure arguments and/or generic ...

GitHub

The hardest part of implementing autocorrection for SwiftLint rules is not the fix itself, but the right handling of whitespace and comments.

#swift #swiftlang #swiftlint #linter

Using #SwiftLint's Swift Package Manager plugins directly can cause dependency conflicts and extended compile times.

Therefore, I recommend to pull the plugins from https://github.com/SimplyDanny/SwiftLintPlugins instead.

Among others things, this resolves the previously mentioned problems due to the limited scope of the dedicated Swift package.

All the code in the plugin repository will stay in sync with the main #SwiftLint repository and so will the releases.

Enjoy linting! 🧹

#swift #swiftlang #lint #linter

GitHub - SimplyDanny/SwiftLintPlugins: Binary version of the SwiftLint Swift Package Manager plugins

Binary version of the SwiftLint Swift Package Manager plugins - SimplyDanny/SwiftLintPlugins

GitHub

Lazyweb: is there a way I can get custom non-regex rules in swiftlint without having to use bazel? Bringing in bazel is a pretty big deal just for custom linting rules.

I’m also open suggestions for non-swiftlint tools that let me do this. I just want context-aware linting rules.

#swift #SwiftLint

Anybody know how to setup an Xcode build script to run SwiftLint if Script Sandboxing is enabled? #SwiftLint

#swiftlint can be a great tool, but it's a bit of a tyrant when I am just doing dev iterations.
It should really only be used for pull requests.

#iosdev #swift

MintでSwiftLint導入方法〜M1 Mac・Intel Mac対応【RunScript作成】〜 - Qiita

はじめにMintを使用してSwiftLintを導入しようとしたら、上手くいかず、つまずいてしまったので、導入方法と解決方法を記事にしました!特にRunScript記述が難しかったです。Swift…

Qiita
#Swift programmers: if you’re wondering why #SwiftLint rules you’ve disabled are firing again, version 0.53.0 ignores commands in multiline comments. https://github.com/realm/SwiftLint/pull/4803
Breaking change: Drop support for disable/enable command parsing in multiline comments by mildm8nnered · Pull Request #4803 · realm/SwiftLint

This PR drops support for swiftlint:disable and enable commands in multiline comments, and resolves #4798 Command parsing is broken in multi-line comments (see for example #4798). It would be possi...

GitHub
@StewartLynch Any experience with #SwiftFormat and how it compares to #SwiftLint? I wonder how these two compare to each other. 🤔 https://github.com/nicklockwood/SwiftFormat
GitHub - nicklockwood/SwiftFormat: A command-line tool and Xcode Extension for formatting Swift code

A command-line tool and Xcode Extension for formatting Swift code - nicklockwood/SwiftFormat

GitHub