Skip to content

Commit

Permalink
Merge pull request #65 from boostcampwm2023/iOS/chore/swiftLint-swift…
Browse files Browse the repository at this point in the history
…Format

SwiftLint, SwiftFormatter 적용
  • Loading branch information
SwiftyJunnos authored Nov 15, 2023
2 parents c2bc3a8 + f0e80ac commit a0f20b9
Show file tree
Hide file tree
Showing 24 changed files with 501 additions and 228 deletions.
166 changes: 0 additions & 166 deletions .gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions iOS/.githooks/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#!/bin/sh

echo "iOS"
5 changes: 0 additions & 5 deletions iOS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ playground.xcworkspace
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
Expand Down Expand Up @@ -121,7 +120,6 @@ iOSInjectionProject/
### SwiftPackageManager ###
Packages
xcuserdata
*.xcodeproj


### Xcode ###
Expand All @@ -131,9 +129,6 @@ xcuserdata
### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

Expand Down
27 changes: 27 additions & 0 deletions iOS/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 한 라인 길이 제한
line_length:
warning: 120 #default: 120
error: 200

# 강제 형변환
force_cast: error
force_try: error

# 의미없는 공백/줄 바꿈
trailing_newline: warning
trailing_whitespace:
severity: warning

# 함수 길이 제한
function_body_length:
warning: 50
error: 100

# 타입 지정 시, 이름 조건
type_name:
min_length:
warning: 3
error: 0
max_length:
warning: 40
error: 1000
8 changes: 0 additions & 8 deletions iOS/MSCoreKit/.gitignore

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions iOS/MSCoreKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension String {
static let networking = "MSNetworking"
static let fetcher = "MSFetcher"
static let cache = "MSCacheStorage"

var testTarget: String {
return self + "Tests"
}
Expand Down Expand Up @@ -44,7 +44,7 @@ let package = Package(
.target(name: .networking)
]),
.target(name: .cache),

// Tests
.testTarget(name: .persistentStorage.testTarget,
dependencies: [.target(name: .persistentStorage)]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@

import XCTest

final class MSPersistentStorageTests: XCTestCase {

}

final class MSPersistentStorageTests: XCTestCase { }
8 changes: 0 additions & 8 deletions iOS/MSFoundation/.gitignore

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions iOS/MSFoundation/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension String {
static let foundationExt = "FoundationExt"
static let logger = "MSLogger"
static let userDefaults = "MSUserDefaults"

var testTarget: String {
return self + "Tests"
}
Expand All @@ -36,7 +36,7 @@ let package = Package(
.target(name: .foundationExt),
.target(name: .logger),
.target(name: .userDefaults),

// Tests
.testTarget(name: .logger.testTarget,
dependencies: [.target(name: .logger)]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@
//

import Foundation


2 changes: 1 addition & 1 deletion iOS/MSFoundation/Tests/MSLoggerTests/MSLoggerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import XCTest
import MSLogger

final class MSLoggerTests: XCTestCase {

}
8 changes: 0 additions & 8 deletions iOS/MSUIKit/.gitignore

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iOS/MSUIKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extension String {
static let package = "MSUIKit"
static let designSystem = "MSDesignSystem"
static let components = "MSUIComponents"

var testTarget: String {
return self + "Tests"
}
Expand Down
1 change: 1 addition & 0 deletions iOS/MusicSpot/.swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.9
11 changes: 11 additions & 0 deletions iOS/MusicSpot/.swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 코드 들여쓰기
--indent 4

# 공백 문자 삭제
--trimwhitespace always

# 줄 바꿈 문자 관리
--linebreaks lf #cr, lf, crlf

# wrapMultilineStatementBraces 비활성화
--disable wrapMultilineStatementBraces
Loading

0 comments on commit a0f20b9

Please sign in to comment.