Skip to content

Commit

Permalink
build: github actions work flow for swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
yuncheol-AHN committed Nov 7, 2024
1 parent 2bfa353 commit 96f2b86
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: swiftlint 🔨

on:
pull_request:
branches: ["develop"]
paths:
- ".github/workflows/swiftlint.yml"
- ".swiftlint.yml"
- "**/*.swift"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/[email protected]
env:
WORKING_DIRECTORY: Source
56 changes: 56 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import PackageDescription

let package = Package(
name: "MemorialHouse",
products: [
.library(name: "MHDomain", targets: ["MHDomain"]),
.library(name: "MHCore", targets: ["MHCore"]),
.library(name: "MHData", targets: ["MHData"]),
.library(name: "MHFoundation", targets: ["MHFoundation"]),
.library(name: "MHPresentation", targets: ["MHPresentation"]),
.library(name: "MHApplication", targets: ["MHApplication"]),

Check warning on line 11 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 11 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
dependencies: [
.package(url: "https://github.com/realm/SwiftLintPlugins", from: "0.57.0"),

Check warning on line 14 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 14 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
targets: [
.target(
name: "MHDomain",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHCore",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHData",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHFoundation",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHPresentation",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHApplication",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins") // 플러그인 활성화
]
),

Check warning on line 52 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 52 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
swiftLanguageVersions: [.v6]
)

Check warning on line 56 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)

Check warning on line 56 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)

0 comments on commit 96f2b86

Please sign in to comment.