@@ -37,32 +37,6 @@ public enum SwiftLint {
37
37
static let danger = Danger ( )
38
38
static let shellExecutor = ShellExecutor ( )
39
39
40
- /// This method is deprecated in favor of
41
- @available ( * , deprecated, message: " Use the lint(_ lintStyle ..) method instead. " )
42
- @discardableResult
43
- public static func lint( inline: Bool = false ,
44
- directory: String ? = nil ,
45
- configFile: String ? = nil ,
46
- strict: Bool = false ,
47
- quiet: Bool = true ,
48
- lintAllFiles: Bool = false ,
49
- swiftlintPath: String ? = nil ) -> [ SwiftLintViolation ] {
50
- let lintStyle : LintStyle = {
51
- if lintAllFiles {
52
- return . all( directory: directory)
53
- } else {
54
- return . modifiedAndCreatedFiles( directory: directory)
55
- }
56
- } ( )
57
-
58
- return lint ( lintStyle,
59
- inline: inline,
60
- configFile: configFile,
61
- strict: strict,
62
- quiet: quiet,
63
- swiftlintPath: swiftlintPath)
64
- }
65
-
66
40
/// When the swiftlintPath is not specified,
67
41
/// it uses by default swift run swiftlint if the Package.swift in your root folder contains swiftlint as dependency,
68
42
/// otherwise calls directly the swiftlint command
@@ -73,13 +47,15 @@ public enum SwiftLint {
73
47
configFile: String ? = nil ,
74
48
strict: Bool = false ,
75
49
quiet: Bool = true ,
76
- swiftlintPath: String ? ) -> [ SwiftLintViolation ] {
50
+ swiftlintPath: String ,
51
+ markdownAction: ( String ) -> Void = markdown) -> [ SwiftLintViolation ] {
77
52
lint ( lintStyle,
78
53
inline: inline,
79
54
configFile: configFile,
80
55
strict: strict,
81
56
quiet: quiet,
82
- swiftlintPath: swiftlintPath. map ( SwiftlintPath . bin) )
57
+ swiftlintPath: . bin( swiftlintPath) ,
58
+ markdownAction: markdownAction)
83
59
}
84
60
85
61
/// This is the main entry point for linting Swift in PRs.
0 commit comments