Skip to content

Commit 1e7e554

Browse files
authored
Refactor/update project refactor (#120)
* swiftformat 0.52.5 * Мелкий рефактор * Обновил настройки проекта - Применил рекомендуемые настройки для проекта в Xcode 15 - В том числе включил генерацию расширений для ассетов
1 parent b5946eb commit 1e7e554

File tree

17 files changed

+40
-37
lines changed

17 files changed

+40
-37
lines changed

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ redundantGet, \
4141
redundantLet, \
4242
redundantObjc, \
4343
redundantOptionalBinding, \
44-
sortedImports, \
44+
sortImports, \
4545
spaceAroundBraces, \
4646
spaceInsideGenerics, \
4747
strongifiedSelf, \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ rbenv exec fastlane snapshot
7777
- 4.7 дюйма: iPhone SE (3rd generation)
7878

7979
### Форматирование кода
80-
- Используем [swiftformat (0.52.4)](https://github.com/nicklockwood/SwiftFormat) для форматирования кода
80+
- Используем [swiftformat (0.52.5)](https://github.com/nicklockwood/SwiftFormat) для форматирования кода
8181
- Правила форматирования перечислены в файле [.swiftformat](.swiftformat)
8282
- Все правила можно найти [тут](https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md)
8383

SwiftUI-WorkoutApp.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@
767767
attributes = {
768768
BuildIndependentTargetsInParallel = 1;
769769
LastSwiftUpdateCheck = 1420;
770-
LastUpgradeCheck = 1330;
770+
LastUpgradeCheck = 1500;
771771
TargetAttributes = {
772772
67138D83297311BD00BBF450 = {
773773
CreatedOnToolsVersion = 14.2;
@@ -1051,6 +1051,7 @@
10511051
isa = XCBuildConfiguration;
10521052
buildSettings = {
10531053
ALWAYS_SEARCH_USER_PATHS = NO;
1054+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
10541055
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
10551056
CLANG_ANALYZER_NONNULL = YES;
10561057
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -1085,6 +1086,7 @@
10851086
DEBUG_INFORMATION_FORMAT = dwarf;
10861087
ENABLE_STRICT_OBJC_MSGSEND = YES;
10871088
ENABLE_TESTABILITY = YES;
1089+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
10881090
GCC_C_LANGUAGE_STANDARD = gnu11;
10891091
GCC_DYNAMIC_NO_PIC = NO;
10901092
GCC_NO_COMMON_BLOCKS = YES;
@@ -1114,6 +1116,7 @@
11141116
isa = XCBuildConfiguration;
11151117
buildSettings = {
11161118
ALWAYS_SEARCH_USER_PATHS = NO;
1119+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
11171120
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
11181121
CLANG_ANALYZER_NONNULL = YES;
11191122
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -1148,6 +1151,7 @@
11481151
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
11491152
ENABLE_NS_ASSERTIONS = NO;
11501153
ENABLE_STRICT_OBJC_MSGSEND = YES;
1154+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
11511155
GCC_C_LANGUAGE_STANDARD = gnu11;
11521156
GCC_NO_COMMON_BLOCKS = YES;
11531157
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

SwiftUI-WorkoutApp.xcodeproj/xcshareddata/xcschemes/SwiftUI-WorkoutApp.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1330"
3+
LastUpgradeVersion = "1500"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftUI-WorkoutApp.xcodeproj/xcshareddata/xcschemes/WorkoutAppTests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1420"
3+
LastUpgradeVersion = "1500"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftUI-WorkoutApp.xcodeproj/xcshareddata/xcschemes/WorkoutAppUITests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1420"
3+
LastUpgradeVersion = "1500"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftUI-WorkoutApp/DesignSystem/.swiftpm/xcode/xcshareddata/xcschemes/DesignSystem.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1430"
3+
LastUpgradeVersion = "1500"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/CachedImage/ResizableCachedImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct ResizableCachedImage: View {
2222
.resizable()
2323
}
2424
} placeholder: {
25-
Image.defaultWorkoutImage
25+
Image.defaultWorkout
2626
.resizable()
2727
}
2828
}

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/Color+.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ import SwiftUI
22

33
public extension Color {
44
/// Фон
5-
static let swBackground = Color("swBackground", bundle: .module)
5+
static let swBackground = Color(.swBackground)
66
/// Фон карточек
7-
static let swCardBackground = Color("swCardBackground", bundle: .module)
7+
static let swCardBackground = Color(.swCardBackground)
88
/// Подписи/иконки
9-
static let swSmallElements = Color("swSmallElements", bundle: .module)
9+
static let swSmallElements = Color(.swSmallElements)
1010
/// Разделители
11-
static let swSeparators = Color("swSeparators", bundle: .module)
11+
static let swSeparators = Color(.swSeparators)
1212
/// Основной текст
13-
static let swMainText = Color("swMainText", bundle: .module)
13+
static let swMainText = Color(.swMainText)
1414
/// `AccentColor` для приложения
15-
static let swAccent = Color("swAccent", bundle: .module)
15+
static let swAccent = Color(.swAccent)
1616
/// Цвет текста в `filled`-кнопке
17-
static let swFilledButtonText = Color("swFilledButtonText", bundle: .module)
17+
static let swFilledButtonText = Color(.swFilledButtonText)
1818
/// Нажатые `filled`-кнопки
19-
static let swFilledButtonPressed = Color("swFilledButtonPressed", bundle: .module)
19+
static let swFilledButtonPressed = Color(.swFilledButtonPressed)
2020
/// Неактивные кнопки
21-
static let swDisabledButton = Color("swDisabledButton", bundle: .module)
21+
static let swDisabledButton = Color(.swDisabledButton)
2222
/// Цвет текста неактивных кнопок
23-
static let swDisabledButtonText = Color("swDisabledButtonText", bundle: .module)
23+
static let swDisabledButtonText = Color(.swDisabledButtonText)
2424
/// `tinted`-кнопки
25-
static let swTintedButton = Color("swTintedButton", bundle: .module)
25+
static let swTintedButton = Color(.swTintedButton)
2626
/// Нажатые `tinted`-кнопки
27-
static let swTintedButtonPressed = Color("swTintedButtonPressed", bundle: .module)
27+
static let swTintedButtonPressed = Color(.swTintedButtonPressed)
2828
/// Цвет кнопки удаления фото
29-
static let swXmarkButton = Color("swXmarkButton", bundle: .module)
29+
static let swXmarkButton = Color(.swXmarkButton)
3030
/// Цвет кнопки добавления фото
31-
static let swAddPhotoButton = Color("swAddPhotoButton", bundle: .module)
31+
static let swAddPhotoButton = Color(.swAddPhotoButton)
3232
/// Ошибки
33-
static let swError = Color("swError", bundle: .module)
33+
static let swError = Color(.swError)
3434
}
3535

3636
#if DEBUG

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/Icons.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import SwiftUI
22

33
public extension Image {
44
/// Картинка для вкладки с площадками в таббаре
5-
static let sportsGroundIcon = Image("SportsGroundTabbarIcon", bundle: .module)
5+
static let sportsGroundIcon = Image(.sportsGroundTabbarIcon)
66
/// Картинка-заглушка
7-
static let defaultWorkoutImage = Image("defaultWorkoutImage", bundle: .module)
7+
static let defaultWorkout = Image(.defaultWorkout)
88
}
99

1010
public enum Icons {

0 commit comments

Comments
 (0)