mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 04:05:20 +00:00
Add a pragmatic SwiftLint configuration
Baseline .swiftlint.yml for local use (not wired into CI yet): - file_length: warning at 600, error at 4000 — above the current maximum (BLEService.swift, ~3,500 lines), so the codebase passes as-is and only future growth trips the error. - function_body_length: warning 100, error 200. - Disables the high-noise style rules (line_length, identifier_name, cyclomatic_complexity, force_cast/force_try for tests, etc.) so the remaining defaults stay actionable; SwiftLint is not installed in this environment, so the disabled list is a best-effort starting point to be tuned on first real run. - Excludes vendored Arti and SwiftPM .build output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# SwiftLint configuration for BitChat.
|
||||
#
|
||||
# Intentionally pragmatic: rules that would flood the existing codebase are
|
||||
# disabled so the lint signal stays actionable; re-enable them individually as
|
||||
# files get cleaned up. Not wired into CI yet — run locally with `swiftlint`
|
||||
# from the repo root.
|
||||
|
||||
included:
|
||||
- bitchat
|
||||
- bitchatTests
|
||||
- localPackages/BitFoundation/Sources
|
||||
- localPackages/BitFoundation/Tests
|
||||
- localPackages/BitLogger/Sources
|
||||
|
||||
excluded:
|
||||
- .build
|
||||
- localPackages/Arti
|
||||
- localPackages/BitFoundation/.build
|
||||
- localPackages/BitLogger/.build
|
||||
|
||||
disabled_rules:
|
||||
# Style/volume rules that currently produce noise across the codebase.
|
||||
- line_length
|
||||
- identifier_name
|
||||
- type_name
|
||||
- type_body_length
|
||||
- cyclomatic_complexity
|
||||
- function_parameter_count
|
||||
- large_tuple
|
||||
- nesting
|
||||
- todo
|
||||
- trailing_comma
|
||||
- opening_brace
|
||||
- statement_position
|
||||
- for_where
|
||||
- redundant_string_enum_value
|
||||
- non_optional_string_data_conversion
|
||||
# Common in tests (force casts/tries on fixtures).
|
||||
- force_cast
|
||||
- force_try
|
||||
|
||||
file_length:
|
||||
warning: 600
|
||||
# BLEService.swift is currently ~3,500 lines; the error threshold sits above
|
||||
# today's maximum so the codebase passes as-is and only future growth of the
|
||||
# largest files trips it.
|
||||
error: 4000
|
||||
|
||||
function_body_length:
|
||||
warning: 100
|
||||
error: 200
|
||||
Reference in New Issue
Block a user