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

Fix code style and enforce with GitHub Actions test #6358

Merged
merged 4 commits into from
Jul 22, 2020

Conversation

shoogle
Copy link
Contributor

@shoogle shoogle commented Jul 21, 2020

Resolves: No issue in tracker

Strictly enforcing the code style will make it easier to cherry-pick commits from the 3.x branch.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • [N/A] I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [N/A] I created the test (mtest, vtest, script test) to verify the changes I made

@shoogle shoogle changed the title Codestyle Fix code style Jul 21, 2020
@shoogle shoogle marked this pull request as ready for review July 21, 2020 17:33
@shoogle shoogle marked this pull request as draft July 21, 2020 19:41
libmscore/page.cpp Outdated Show resolved Hide resolved
@shoogle shoogle force-pushed the codestyle branch 7 times, most recently from faf4f27 to 2f111a7 Compare July 22, 2020 03:12
@shoogle shoogle marked this pull request as ready for review July 22, 2020 03:15
@shoogle shoogle marked this pull request as draft July 22, 2020 10:30
@shoogle shoogle force-pushed the codestyle branch 3 times, most recently from 25a9fbc to 11537bb Compare July 22, 2020 12:08
@shoogle
Copy link
Contributor Author

shoogle commented Jul 22, 2020

Sample output for when the code style test fails:

image

Scrolling down under "Test coding style" reveals the changes required to pass the test:

image

@shoogle shoogle changed the title Fix code style Fix code style and enforce with GitHub Actions test Jul 22, 2020
The previous syntax was not parsed correctly by Uncrustify, which would
lead to symantic changes when running code style scripts.
@shoogle shoogle marked this pull request as ready for review July 22, 2020 15:49
@anatoly-os anatoly-os merged commit e04f7c2 into musescore:master Jul 22, 2020
@shoogle shoogle deleted the codestyle branch July 22, 2020 16:42
@shoogle
Copy link
Contributor Author

shoogle commented Jul 23, 2020

Now that this has been merged, the code style test is enforced for all future PRs. However, pre-existing PRs will not been tested for coding style unless the GitHub Action for MacOS is triggered again (e.g. by pushing another commit to the PR branch).

If you see this under a PR, it has not been tested for coding style:

image

PRs that have been tested will be labelled like this: (notice that the MacOS Action name begins with "codestyle")

image

Regardless of test status, coding style needs to be fixed before PRs are merged otherwise the test will start to fail for everybody.

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

3 participants