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

CI formatting check #591

Open
BNAndras opened this issue Sep 24, 2024 · 1 comment
Open

CI formatting check #591

BNAndras opened this issue Sep 24, 2024 · 1 comment

Comments

@BNAndras
Copy link
Member

Currently, https://github.com/exercism/dart/blob/main/.github/workflows/test.yml checks the formatting before running the test suite, potentially failing before the test suite is checked. This should instead be done as a separate GH action.

Any of the three dart files (stub, test suite, or example solution) could be formatted incorrectly so it's unclear which file is the issue from the CI logs. The GH action should specify if possible which file was reformatted and ideally what the change is. dart format can show the formatted code for the changed file so perhaps we can compare the formatted code to the original file and display the difference. Surfacing that difference should reduce confusion since we're using dart format with an override for line length. I ran afoul of that early on since locally dart format was working fine as far as I could tell.

@vaibhavsahni009
Copy link

I agree with your point, that would be ideal if we show what line the issue is and show a diff. Maybe it is even better if we can ask the formattor to do the job automatically and raise a commit in the same PR with correct formatting through GHA.

I am willing to work on either scenario, but even my solution would show logs similar to how it is below, and you mentioned file was not mentioned in logs. Are we talking about different logs here?

image
https://github.com/exercism/dart/actions/runs/10983047051/job/30491989205

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

No branches or pull requests

2 participants