Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
language: ko-KR

early_access: true
enable_free_tier: true
auto_resolve_threads: false

Comment thread
doyeonk429 marked this conversation as resolved.
reviews:
profile: chill
request_changes_workflow: true
high_level_summary: true
high_level_summary_placeholder: '@coderabbitai 요약'
auto_title_placeholder: '@coderabbitai'
poem: true
review_status: true
collapse_walkthrough: false

abort_on_close: true

auto_review:
enabled: true
auto_incremental_review: true
ignore_title_keywords: []
labels: []
drafts: false
base_branches: []

tools:
shellcheck:
enabled: true
ruff:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
disabled_rules:
- EN_UNPAIRED_BRACKETS
- EN_UNPAIRED_QUOTES
disabled_categories:
- TYPOS
- TYPOGRAPHY
- CASING
enabled_only: false
level: default
enabled_rules: []
enabled_categories: []
biome:
enabled: true
hadolint:
enabled: true
swiftlint:
enabled: true
phpstan:
enabled: true
level: default
golangci-lint:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
checkov:
enabled: true
ast-grep:
packages: []
rule_dirs: []
util_dirs: []
essential_rules: true

chat:
enabled: true
max_token_length: 4096

Comment thread
doyeonk429 marked this conversation as resolved.
knowledge_base:
web_search:
enabled: true
learnings:
scope: auto
issues:
scope: auto
jira:
project_keys: []
65 changes: 65 additions & 0 deletions src/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
disabled_rules:
- trailing_whitespace

opt_in_rules:
- attributes
- closure_spacing
- colon
- operator_usage_whitespace
- fatal_error_message
- trailing_closure
- empty_count
- function_default_parameter_at_end
- prefer_self_in_static_references
- identifier_name # 사용 전 Rule 확인 필요
- sorted_imports # 알파벳 순서대로 임포트
- duplicate_imports # 중복 임포트 제거
- indentation_width

analyzer_rules:
- unused_declaration

line_length:
warning: 120
error: 200

type_name:
min_length:
warning: 3
error: 1
max_length:
warning: 40
error: 50
validates_start_with_lowercase: warning

identifier_name:
min_length: 3

function_body_length:
warning: 30
error: 50

type_body_length:
warning: 200
error: 400

colon:
flexible_right_spacing: false
apply_to_dictionaries: true

operator_usage_whitespace:
severity: warning

control_statement:
severity: warning
if_else: false

void_return:
severity: warning

custom_rules:
ios17_uikit_api_usage:
name: "iOS 17+ UIKit API 사용"
regex: '\b(UITextView\.TextLayoutManager|UIPasteControl|UIBackgroundConfiguration\.cornerRadius|SectionHeaderPinToVisibleBounds|UIView\.animationsEnabled|UIEditingOverlayViewController)\b'
message: "이 UIKit API는 iOS 17 이상에서만 사용할 수 있습니다. 최소 지원 버전을 확인하거나 @available(iOS 17, *)로 감싸세요."
severity: warning
4 changes: 4 additions & 0 deletions src/Projects/BKCore/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ let project = Project.project(
product: Project.product,
bundleId: "core." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
]
),

Target.target(
name: "\(BKModule.BKCore.rawValue)Test",
product: .unitTests,
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/BKData/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ let project = Project.project(
product: Project.product,
bundleId: "data." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
]
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/BKDesign/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ let project = Project.project(
bundleId: "design." + Project.bundleID,
sources: .sources,
resources: .default,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
]
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/BKDomain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ let project = Project.project(
product: Project.product,
bundleId: "domain." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
]
Expand Down
5 changes: 4 additions & 1 deletion src/Projects/BKNetwork/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ let project = Project.project(
product: Project.product,
bundleId: "network." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
.core()
]
),
Target.target(
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/BKPresentation/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ let project = Project.project(
product: Project.product,
bundleId: "presentation." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
]
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/BKStorage/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ let project = Project.project(
product: Project.product,
bundleId: "storage." + Project.bundleID,
sources: .sources,
scripts: [
swiftLintScript
],
dependencies: [
.core(),
]
Expand Down
3 changes: 3 additions & 0 deletions src/Projects/Booket/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ let appTarget = Target.target(
// .glob(pattern: .relativeToRoot("src/Resources/LaunchScreen.storyboard"))
],
// entitlements: .file(path: .relativeToRoot("src/SupportingFiles/Booket.entitlements")),
scripts: [
swiftLintScript
],
dependencies: [
// Module
.data(),
Expand Down
23 changes: 23 additions & 0 deletions src/Tuist/ProjectDescriptionHelpers/SwiftLintScript.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import ProjectDescription
import Foundation

let projectDir = ProcessInfo.processInfo.environment["PROJECT_DIR"] ?? ""
let swiftLintConfigPath = "\(projectDir)/../../.swiftlint.yml"


public let swiftLintScript: TargetScript = .pre(
script: """
export PATH="/opt/homebrew/bin:$PATH"

SWIFTLINT_PATH=$(which swiftlint)
SWIFTLINT_CONFIG_PATH="${SRCROOT%/*/*}/.swiftlint.yml"

if [ -n "$SWIFTLINT_PATH" ]; then
swiftlint --config "$SWIFTLINT_CONFIG_PATH"
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Comment thread
doyeonk429 marked this conversation as resolved.
""",
name: "SwiftLint",
basedOnDependencyAnalysis: false
)
9 changes: 0 additions & 9 deletions test.md

This file was deleted.