Skip to content

Commit

Permalink
Rename 'actions' format to 'github-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed May 25, 2024
1 parent 47cf15b commit 24ccf25
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

##### Enhancements

- None.
- Added GitHub Actions output formatter.

##### Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import Shared
import SystemPackage

final class ActionsFormatter: OutputFormatter {
final class GitHubActionsFormatter: OutputFormatter {
let configuration: Configuration
lazy var currentFilePath: FilePath = { .current }()

Expand All @@ -12,7 +12,7 @@ final class ActionsFormatter: OutputFormatter {

func format(_ results: [ScanResult]) throws -> String {
guard results.count > 0 else { return "" }
guard configuration.relativeResults else { throw PeripheryError.usageError("`periphery scan` must be ran with `--relative-results` when using the actions formatter")}
guard configuration.relativeResults else { throw PeripheryError.usageError("`periphery scan` must be ran with `--relative-results` when using the GitHub Actions formatter")}

return results.flatMap { result in
describe(result, colored: false).map { (location, description) in
Expand Down
4 changes: 2 additions & 2 deletions Sources/PeripheryKit/Formatters/OutputFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public extension OutputFormat {
return JsonFormatter.self
case .checkstyle:
return CheckstyleFormatter.self
case .actions:
return ActionsFormatter.self
case .githubActions:
return GitHubActionsFormatter.self
}
}
}
2 changes: 1 addition & 1 deletion Sources/Shared/OutputFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public enum OutputFormat: String, CaseIterable {
case json
case checkstyle
case codeclimate
case actions
case githubActions = "github-actions"

public static let `default` = OutputFormat.xcode

Expand Down

0 comments on commit 24ccf25

Please sign in to comment.