Skip to content
Open
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v5

- name: Danger
uses: docker://ghcr.io/danger/danger-swift-with-swiftlint:3.15.0
uses: docker://ghcr.io/danger/danger-swift-with-swiftlint:3.22.1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The call to SwiftLint.lint() in Dangerfile.swift uses a deprecated signature that was removed in the updated danger-swift version, which will break the CI pipeline.
Severity: CRITICAL | Confidence: High

πŸ” Detailed Analysis

The CI workflow updates the danger-swift version to 3.22.1. However, the Dangerfile.swift contains a call to SwiftLint.lint(inline: false, configFile: ".swiftlint.yml"), which uses a function signature that was removed in danger-swift version 3.20.0. Because the function call is no longer valid with the updated dependency, the Danger job will fail with a compilation or runtime error. This will cause the CI/CD pipeline to crash for all subsequent pull requests, blocking them from being merged.

πŸ’‘ Suggested Fix

Update the Dangerfile.swift to use the new API for SwiftLint.lint. For example, change the call to SwiftLint.lint(.modifiedAndCreatedFiles(), inline: false, configFile: ".swiftlint.yml") or rely on the default parameters with SwiftLint.lint(configFile: ".swiftlint.yml").

πŸ€– Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/danger.yml#L16

Potential issue: The CI workflow updates the `danger-swift` version to 3.22.1. However,
the `Dangerfile.swift` contains a call to `SwiftLint.lint(inline: false, configFile:
".swiftlint.yml")`, which uses a function signature that was removed in `danger-swift`
version 3.20.0. Because the function call is no longer valid with the updated
dependency, the Danger job will fail with a compilation or runtime error. This will
cause the CI/CD pipeline to crash for all subsequent pull requests, blocking them from
being merged.

Did we get this right? πŸ‘ / πŸ‘Ž to inform future reviews.
Reference ID: 7934071

with:
args: --failOnErrors --no-publish-check
env:
Expand Down
Loading