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

Added linting check using SwiftLint #417

Merged
merged 69 commits into from
Apr 26, 2024
Merged

Conversation

henrytwagner
Copy link
Contributor

Contributor checklist


Description

Previously there was no linting on pull requests. Here I added two files: pr_swift_lint.yaml, which runs the linting check and displays a helpful output within the check output, and .swiftlint.yaml which is the configuration file for the linting done in pr_swift_lint.yaml and currently only alters the default configuration by allowing 1 character variable.

Related issue

Copy link

github-actions bot commented Apr 26, 2024

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and iOS rooms once you're in. It'd be great to have you!

Maintainer checklist

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution

    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-iOS repo
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis andrewtavis self-requested a review April 26, 2024 17:49
@andrewtavis
Copy link
Member

andrewtavis commented Apr 26, 2024

Thank you, @henrytwagner! This is definitely in the direction we need it to go in 😊 So happy to finally have the linting process going! I'll definitely need to do a squash the commits here, but overall very happy :) :)

Will give this a more thorough look a bit later today!

@@ -0,0 +1,37 @@
# SwiftLint Configuration File
Copy link
Member

Choose a reason for hiding this comment

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

Really appreciate you adding all the config options in here and also documenting what will cause errors and warnings once they're turned on, @henrytwagner! Will really help us organize the work for this going forward 😊

Copy link
Member

Choose a reason for hiding this comment

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

I'll likely move this file to the project root, but for the purposes of this PR it's totally fine to have it here. I figure this is where ESLint and Prettier configs normally are. Will send a commit with this along later :)

@@ -0,0 +1,84 @@
name: pr_swift_lint
Copy link
Member

Choose a reason for hiding this comment

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

For here, I'm expecting that there's a pre-prepared workflow that can be subbed in for parts of this, but is looking really good all the same :)

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Happy to bring this in and use it as a basis of what will come next, @henrytwagner! As stated, I'll do a squash of all the commits, and will send something along later that does some formatting and edits the settings a bit.

Would be happy to work on getting some of these linting errors/warnings fixed with you at some point. If you wanted to, we could also discuss making some help wanted or good first issue issues based on the outputs of the process.

Thank you for the contribution!

@andrewtavis andrewtavis merged commit 5bf9322 into scribe-org:main Apr 26, 2024
1 check passed
@andrewtavis
Copy link
Member

Hey @henrytwagner 👋 After doing some minor edits, we have a functioning linting check based on SwiftLint and the swiftlint.yml (renamed from yaml as it was working better). See #419 to check it out! Really appreciate the help here!

@andrewtavis andrewtavis mentioned this pull request Apr 26, 2024
2 tasks
@andrewtavis andrewtavis mentioned this pull request May 5, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants