Skip to content

Conversation

@rismay
Copy link
Member

@rismay rismay commented Aug 15, 2025

Summary

  • download shared swift-format configuration in SwiftLint workflow
  • document remote swift-format command as the only formatting step

Testing

  • swiftlint 2>&1 | tail -n 20
  • swift test 2>&1 | tail -n 20

https://chatgpt.com/codex/tasks/task_e_689edfbdca988333a4d4501c90f619b1

Copilot AI review requested due to automatic review settings August 15, 2025 07:39
@rismay rismay merged commit e930ffd into main Aug 15, 2025
@rismay rismay deleted the codex/update-workflow-and-documentation-for-swift-formatting branch August 15, 2025 07:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the project to use a shared swift-format configuration from the wrkstrm/configs repository, standardizing Swift code formatting across the project. The changes establish a single, consistent formatting step and integrate it into the CI workflow.

Key Changes:

  • Updated documentation to specify the exact swift-format command with remote configuration
  • Added swift-format step to the SwiftLint CI workflow
  • Documented the formatting approach in both AGENTS.md and AGENCY.md files

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
AGENTS.md Updated Swift formatting instruction to use shared remote configuration
AGENCY.md Added new formatting section documenting the swift-format command
.github/workflows/wrkstrm-log-swiftlint.yml Added steps to download configuration and run swift-format in CI

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

run: curl -O https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format
- name: Swift Format
# This is the only Swift formatting step.
run: swift format --configuration .swift-format -i -r -p
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

The swift format command uses .swift-format but the downloaded file is .swift-format. However, the documentation in AGENTS.md and AGENCY.md references the full URL. For consistency and to avoid network dependencies during formatting, the workflow should use the local file, but the documentation should be updated to match this local usage pattern.

Copilot uses AI. Check for mistakes.

## Contribution Guidelines
- Format any modified Swift files with `swift format -i -r -p`.
- Format any modified Swift files with `swift format --configuration https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format -i -r -p`. This is the only Swift formatting step to run.
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The formatting command references a remote URL which creates a network dependency for local development. Consider documenting a two-step process: first download the configuration file locally, then run swift format with the local file, similar to how the CI workflow operates.

Suggested change
- Format any modified Swift files with `swift format --configuration https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format -i -r -p`. This is the only Swift formatting step to run.
- Format any modified Swift files using a two-step process:
1. Download the Swift format configuration file locally:
`curl -o .swift-format https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format`
2. Run the formatter with the local configuration file:
`swift format --configuration .swift-format -i -r -p`
This is the only Swift formatting step to run.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants