Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SwiftLint with default settings #149

Merged
merged 3 commits into from
Jul 20, 2024
Merged

Conversation

MrSmart00
Copy link
Contributor

@MrSmart00 MrSmart00 commented Jul 19, 2024

Issue

  • close #ISSUE_NUMBER

Overview (Required)

  • Add SwiftLint on GitHub Actions

Links

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After

Movie (Optional)

Before After

@MrSmart00 MrSmart00 marked this pull request as ready for review July 19, 2024 09:59
Comment on lines +3 to +4
workflow_run:
workflows: ["PR Labeler"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I planned This workflow to run with PR Labeler workflow's completion.
but I can't check the workflow's actions. maybe it need to change a default branch i think. it's a troublesome so
If it don't working i'll fix if on the other PR👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Trigger by workflow is an interesting idea!
It might be nice and simple to use the fact that an iOS label has been assigned as a triggering event.
I think that would eliminate the need to fill in the if statement in the job.

https://docs.github.com/ja/actions/using-workflows/events-that-trigger-workflows#label

Copy link
Contributor

@shin-usu shin-usu Jul 19, 2024

Choose a reason for hiding this comment

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

Oh, Sorry.
I noticed that we can't specify the name of the label in the "on" part...
After all, the if statement had to be stated 🙇🏽‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a demo configs from SwiftLint site.

Copy link
Contributor

@shin-usu shin-usu left a comment

Choose a reason for hiding this comment

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

Thank you 🙌🏼
I made a few comments.

Comment on lines +3 to +4
workflow_run:
workflows: ["PR Labeler"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Trigger by workflow is an interesting idea!
It might be nice and simple to use the fact that an iOS label has been assigned as a triggering event.
I think that would eliminate the need to fill in the if statement in the job.

https://docs.github.com/ja/actions/using-workflows/events-that-trigger-workflows#label

runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'iOS 🍎')
steps:
- uses: actions/checkout@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

Latest checkout action is v4.
Do you have any reason to use v3? 😲

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks👍 I fixed it!

@MrSmart00 MrSmart00 requested a review from shin-usu July 19, 2024 13:48
Copy link
Contributor

@shin-usu shin-usu left a comment

Choose a reason for hiding this comment

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

LGTMeow

@MrSmart00 MrSmart00 merged commit 63f2da6 into main Jul 20, 2024
4 checks passed
@MrSmart00 MrSmart00 deleted the MrSmart00/feature/swiftlint branch July 20, 2024 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants