[QUESTION] GitHub Workflow Action
Closed this issue · 8 comments
Is there a GitHub workflow action for this that you can use to run lint check? I'm currently using the Flutter lint, but would nice if there was an action for this
You should write analysis_options.yaml that include package:very_good_analysis/analysis_options.yaml
, then it works.
You don't need to write something in workflow file
That is not how workflow file works, its will use the analysis provided in the workflow file in the GitHub actions
That is not how workflow file works, its will use the analysis provided in the workflow file in the GitHub actions
Very Good Workflows just runs the flutter/dart analyze command which uses the analysis options you have in your project. As @SuhwanCha mentioned you can adjust your analysis_options.yaml
to your liking and if you don’t have warnings or errors being reported locally you shouldn’t have any warnings or errors reported by the workflow.
Hope that helps 👍
That is not how workflow file works, its will use the analysis provided in the workflow file in the GitHub actions
Please see the following workflow file, there isn't analysis options in workflow file
https://github.com/felangel/bloc/blob/master/.github/workflows/flutter_bloc.yaml#L29-L33
When used like this, that command uses analysis_options.yaml
. You don't adjust options in workflow file, you need to set them in analysis_options.yaml
.
Closing for now since there doesn’t appear to be any actionable next steps but feel free to comment with any follow up questions and I’m happy to continue the conversation 👍
Hey Felix - I'm running into an issue with JSONSerializable and build_runner where the generated code doesn't satisfy the very_good analysis linter rules. Is the only fix to suppress the warning by setting cast_nullable_to_non_nullable: false in the linter rules? Or can this be resolved by changing something in my model? Lines 14 and 16 below have warnings about casting nullable to non nullable types.
@ericduffett in my case, I add **.g.dart
in exclude
analyzer:
exclude:
- lib/**.g.dart
@ericduffett in my case, I add
**.g.dart
in excludeanalyzer: exclude: - lib/**.g.dart
Thank you! That's a much better solution!