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] Add linting jobs #307

Open
devkabiir opened this issue Mar 14, 2021 · 6 comments
Open

[CI] Add linting jobs #307

devkabiir opened this issue Mar 14, 2021 · 6 comments

Comments

@devkabiir
Copy link
Contributor

The current CI (GitHub Actions) only runs configlet based linting and dart tests. Linting for dart should also be part of the CI.

  • Add dart analyzer linting job
  • Add dart formatting lint job (The track currently uses 120 characters line width)
@Stargator
Copy link
Contributor

Stargator commented Mar 14, 2021

@devkabiir Can the CI modify the code in order to do the dart formatting? Or are you just saying to do a formatting check?

@devkabiir
Copy link
Contributor Author

Related #296

Making changes requires an access token for most CI. I'm also not comfortable with any kind of CI to make changes.

My proposal is only for linting and checking for formatting.

@Stargator
Copy link
Contributor

Parts of this are touched on in #227 which handles having a workflow or CI.

@devkabiir Is there a difference between the two you could make?

@devkabiir
Copy link
Contributor Author

I suppose this one was to add the CI jobs, and the other one was to select the lint rules, other than the default ones enabled by dart analyzer.

@Stargator
Copy link
Contributor

@devkabiir The Test workflow does check the formatting unless you want to refactor the formatting out of the Test workflow and into its own Workflow.

Since both workflows are executed when a Dart file or analysis_options.yaml file is changed, then they would always execute on the same PRs. Combining them just reduces our use of GitLab resources.

@devkabiir
Copy link
Contributor Author

No, I don't think separate workflows add any value. However, we should run dart analyze ., dart format -l 120 --set-exit-if-changed . per exercise as well as repository level. That was the intention as far as I can remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants