-
-
Notifications
You must be signed in to change notification settings - Fork 762
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: reland Dart analyzer #1559
ci: reland Dart analyzer #1559
Conversation
- "**.dart" | ||
- ".github/workflows/analyze.yml" | ||
pull_request: | ||
branches: [ "main", "dev" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be relevant for all branches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause the analyser to run on unintended branches like compose-dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because the workflow isn't in that branch and also even if it is, there's the path check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limit to only supported branch is safer than not specifying branch at all; in the future we might introduce analyser for Compose branch or something unrelated to Flutter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow won't run in the compose-dev branches because the workflow file isn't in the branch, isn't that the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but in the future we might introduce Compose analyser which can cause problems with running Dart-specific command.
push: | ||
branches: dev | ||
paths: | ||
- "**.dart" | ||
- ".github/workflows/analyze.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think on push is necessary, the code is already pushed
And this would duplicate runs on PRs from dev to main, which already covers the use of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some cases where we have—or, would want to push directly to the repository rather than make a pull request, could be situations like—critical bug fixes, string changes, miscellaneous stuff.
We wanna have the analyser running at all time so that we can check if one of our commit can causes build to fail; even if the chance of it failing are small.
We could set the This will cause the analyser to fail when the analyser detected an error(s) within the code. We can also additionally set required status check for the CI too. |
Only to realised that it get superseded by my own PR #1521 |
Enforce code styling