-
-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy path.swiftformat
More file actions
46 lines (32 loc) · 1.82 KB
/
.swiftformat
File metadata and controls
46 lines (32 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This file is configured to match the project's SwiftLint rules.
# --swift-version: Specify Swift version to enable all formatting features.
--swift-version 6.0
# --indent 4: Matches 'prefer_spaces_over_tabs' custom rule.
--indent 4
--tab-width 4
--smart-tabs disabled
# --max-width 0: Disables line-length wrapping, as 'line_length' is disabled in SwiftLint.
--max-width 0
# --trailing-commas always: Matches 'trailing_comma: mandatory_comma: true'.
--trailing-commas always
# --header: Matches 'file_header' rule.
--header "//\n// {file}\n// Project: Thaw\n//\n// Copyright (Ice) © 2023–2025 Jordan Baird\n// Copyright (Thaw) © 2026 Toni Förster\n// Licensed under the GNU GPLv3"
# --enable isEmpty: Opt-in rule to match SwiftLint's 'empty_count'.
--enable isEmpty
# --modifier-order: Aligns with SwiftLint's preferred_modifier_order.
--modifier-order override,open,public,package,internal,fileprivate,private,open(set),public(set),package(set),internal(set),fileprivate(set),private(set),mutating,nonmutating,lazy,final,required,convenience,static,class,weak,unowned,unowned(safe),unowned(unsafe),dynamic,optional,indirect,isolated,nonisolated,nonisolated(unsafe),borrowing,consuming,prefix,infix,postfix,async
# These rules are too aggressive or cause conflicts and need to be disabled.
--disable redundantEquatable
--disable redundantSelf
--disable redundantReturn
# Explicitly disable specific wrapping behaviors to prevent alignment issues.
--wrap-arguments disabled
--wrap-collections disabled
--wrap-conditions disabled
# General formatting rules for consistency and modern Swift style
# --self remove: Use implicit self, as is common practice.
--self remove
# --allman false: Use K&R style braces (opening brace on the same line).
--allman false
# --semicolons inline-only: Remove unnecessary semicolons.
--semicolons inline-only