Skip to content

Commit

Permalink
Merge pull request #616 from 417-72KI/fix-swiftlint-package
Browse files Browse the repository at this point in the history
Fix pattern for detecting SwiftLint in package
  • Loading branch information
417-72KI committed Aug 28, 2024
2 parents 5b4749c + 9eb86c7 commit 9f2d6b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Danger/Plugins/SwiftLint/SwiftLint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ extension SwiftLint {
}

static func swiftlintDefaultPath(packagePath: String = "Package.swift") -> String {
let swiftPackageDepPattern = #"\.package\(.*SwiftLint.*"#
let swiftPackageDepPattern = #"\.package\(.*SwiftLint(\.git)?".*"#
if let packageContent = try? String(contentsOfFile: packagePath),
let regex = try? NSRegularExpression(pattern: swiftPackageDepPattern, options: .allowCommentsAndWhitespace),
regex.firstMatchingString(in: packageContent) != nil {
Expand Down

0 comments on commit 9f2d6b8

Please sign in to comment.