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

[WIP] Add code format checker to CI #157

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[WIP] Add code format checker to CI #157

wants to merge 1 commit into from

Conversation

Nick-Mazuk
Copy link
Member

This PR adds a GitHub action to check code formatting on every commit.

That will allow us to check if code is formatted correctly before merging into the master branch.

I'm considering this a draft PR for now for two reasons:

  1. I don't know if it will work as intended
  2. I plan to use this PR to test the GitHub action

Since my last couple commits have included many miscellaneous auto-formatting fixes, my hope is that by checking code formatting before merging those miscellaneous fixes won't happen in the future.

How I plan for this action to work:

  1. On every commit to every PR, it will check the code formatting for only the added or modified .lua files using the same luaconfig.config at the root of this repository
  2. If all the files are properly formatted, the status check will pass (this will be clearly visible on every PR)
  3. If not, the action logs will include a diff on what needs to be changed
  4. Once this action works, I'll add a branch protection rule preventing code from being merged if it's not formatted correctly

Hopefully this in conjunction with the VS Code auto-formatting settings PR #156 could help make code formatting issues a thing of the past.

I do not plan on merging this PR before #156 is merged and #5 is closed. That way there's an easy fix for formatting code. It would be a real pain to go through and manually format every single character of code just to merge it into this repo.

@rpatters1
Copy link
Collaborator

This PR is somewhat outside my wheelhouse, but it sounds okay to me.

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.

2 participants