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: reland Dart analyzer #1559

Closed
wants to merge 2 commits into from
Closed

ci: reland Dart analyzer #1559

wants to merge 2 commits into from

Conversation

validcube
Copy link
Member

@validcube validcube commented Dec 9, 2023

Enforce code styling

- "**.dart"
- ".github/workflows/analyze.yml"
pull_request:
branches: [ "main", "dev" ]
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@Ushie Ushie Dec 11, 2023

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?

Copy link
Member Author

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.

Comment on lines +4 to +8
push:
branches: dev
paths:
- "**.dart"
- ".github/workflows/analyze.yml"
Copy link
Member

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

Copy link
Member Author

@validcube validcube Dec 11, 2023

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.

@validcube
Copy link
Member Author

We could set the fail-on field to warning instead of info to allow (slight) leniency towards code styling.

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.

@validcube
Copy link
Member Author

Only to realised that it get superseded by my own PR #1521

@validcube validcube closed this Dec 17, 2023
@validcube validcube deleted the ci/reland-dart-analysis branch February 6, 2024 12:58
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

2 participants