Knowledge
Search knowledge... ⌘K
Knowledge · Guidelines · swift
Zero Warnings Lint
Zero-warnings policy — SwiftLint mandatory, strict mode, custom project rules
Metadata
swift swift
Procedures
Showing 3 of 5
- 1 Install SwiftLint on the dev machine and CI runners
`brew install swiftlint` on macOS. On CI, install via Homebrew or download release binary.
- 2 Create .swiftlint.yml at the Swift package root
Use the Whisperbar baseline config. Start with opt-in rules, line length 140, identifier_name min 2, and the 4 custom rules. Include: `Sources`. Exclude: `.build`, `Tests`.
- 3 Add Makefile target `lint` + `verify`
``` lint: \tswiftlint lint --strict --config .swiftlint.yml verify: lint build \t@echo "✓ lint + build clean" ```
Rules
- SWIFTLINT-001 —
- SWIFTLINT-002 —
- SWIFTLINT-003 —
- SWIFTLINT-004 —
- SWIFTLINT-005 —