-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat(analyze): Add DCM and fix potentiall bugs, depreciations #315
Conversation
…o easy dcm fixes, ensure you are enabling ignored rules and fix them one by one at some point later
@mhadaily Can we have an example here to demonstrate how to create an internal static analysis package that includes all the rules and is also added as dependency to the demo apps and also to the package lib? I see that currently every demo app has its own analysis option. We can add baseline to silence warnings in the demo apps if they are too big changes. |
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.
We can accept all the suggsted changes in the demo app. My comments are focusing only the package lib. I left minor comments. Huge thanks 🚀
lib/src/content/components/main_content/wolt_modal_sheet_top_bar_title.dart
Outdated
Show resolved
Hide resolved
@mhadaily Looks like the workflow is expecting an approval to run. Is this intentional? If yes, it does not sound useful since we expect the static analysis feedback from CI to work even in draft PRs. |
Hmm, if that's related to this PR, then that's probably because of how GitHub actions work. Either DCM needs to be installed without the action or another trigger should be used (example: https://github.com/leoafarias/fvm/blob/main/.github/workflows/test.yml#L45). I'd say the first approach is safer. |
@ulusoyca according to this https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks it looks like this is only for first time contributor and will not happen later. Let's give it a try. |
Awesome, first two comments. |
@mhadaily |
AH that's right, I didn't check that. Should I change min SDK or you prefer I revert the change for "WidgetStatePropertyAll" ? |
Actually it is a good idea to change the min SDK in the example apps, without changing the package min SDK constraint. |
Done @ulusoyca |
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.
🚢
btw, @ulusoyca when you got chance, try to enable the "disabled rule" and fix the issue, I find several potential bugs and also memory leaks problems. also if you run generally a good idea to play around with some of the commands |
@mhadaily Thanks for the setup, I will delete / simplify some demo projects, and add / enable more rules |
@ulusoyca It seems the main library actually had 3.13 but the examples were not. so I changed everything, Not sure why it needs approval again. it was working without approval but suddenly last commit needs it again. |
🚢 |
Well, that is correct, I thought WidgetState is available after 3.13, anyway I have revert it to MaterialState. Maybe approve again and let's see how it works. if it passes then we are good. I can probably deal with depreciation when you are ready. |
@ulusoyca sorry again 😄 one more time approval. I think this is the final time. Though tests are failing and I think you know that already |
@mhadaily we are good now! |
@mhadaily can we merge now? |
Yes please
*Best regards, *
Majid
…On Fri, 6 Sep 2024 at 09:54, Cagatay Ulusoy ***@***.***> wrote:
@mhadaily <https://github.com/mhadaily> can we merge now?
—
Reply to this email directly, view it on GitHub
<#315 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKDTC3J6NNQGU2QILIDLBTZVFNSTAVCNFSM6AAAAABNEJGNP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGQ3DIMRTGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description
This pull request introduces several changes, primarily focusing on integrating Dart Code Metrics (DCM) into the CI workflow, updating the contributing guidelines, and making various code improvements and refactorings. The most important changes are summarized below:
CI/CD Workflow Enhancements:
.github/workflows/checks.yml
)..github/workflows/checks.yml
).Documentation Updates:
CONTRIBUTING.md
to include steps for installing and activating DCM, and clarified the use of DCM in the contribution process.Code Quality and Linting:
analysis_options.yaml
and other related files to enforce specific linting rules. [1] [2] [3]Code Refactoring:
Minor Code Improvements:
These changes collectively improve the project's CI/CD pipeline, documentation, code quality, and overall maintainability.
Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process.
///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?