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

compatible: dpe-6306 add common static code analysis #280

Closed
wants to merge 14 commits into from

Conversation

paulomach
Copy link

@paulomach paulomach commented Feb 12, 2025

Common workflow for static code analysis
Tested on mysql-vm

Obs: Unit test coverage on dashboard includes code not belonging to the repo, i.e. code from a library not belonging to the charm is accounted in the code coverage. I am in contact with Tiobe to see how to fix it Tracking issue on TICSISSUES-35

@MiaAltieri MiaAltieri force-pushed the feature/static-code-analysis branch from d239844 to ae04ccd Compare February 12, 2025 08:03
@paulomach paulomach marked this pull request as ready for review February 12, 2025 14:30
@paulomach paulomach changed the title feat: dpe-6306 add common static code analysis compatible: dpe-6306 add common static code analysis Feb 12, 2025
Copy link
Contributor

@carlcsaposs-canonical carlcsaposs-canonical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tiobe/tics-github-action seems to already provide a reusable component that handles most of the complexity

I'm hesitant to wrap that reusable component (as opposed to using that reusable component directly), and I don't think a reusable workflow adds much value on top of the already reusable component

Some of the issues that come with wrapping a reusable component:

  1. Versioning
    If we pin a version of tiobe/tics-github-action, anytime we change the version it's a breaking change
    If we passthrough the version of tiobe/tics-github-action, Renovate will not detect updates correctly and we have to create custom renovate config to update the input so that it recognizes the value is for tiobe/tics-github-action
  2. Inputs need to be wrapped. If we support multiple versions of tiobe/tics-github-action, the inputs might not be compatible with all versions or could have different meanings

Furthermore, the contents of this reusable workflow seem to be around tox config and the format of unit test coverage exports—which I think can be quite repo-specific, and given the simplicity of those elements in the workflow, I think it'd be better off for that to be in the repo itself, where it can be modified as needed

I think it'd be best to standardize on naming & contents for the workflow and then copy-paste it across our repos

@paulomach paulomach closed this Feb 14, 2025
@paulomach paulomach deleted the feature/static-code-analysis branch February 14, 2025 20:13
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.

3 participants