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

Integrate code check tools | DO NOT MERGE #59

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

ramya-subramanyam
Copy link
Collaborator

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

This pull request is only to get review feedbacks on code check tools and correspondings fixes in the sources.
The python scripts and shell scripts in ./tools directory will be removed from here and imported as submodules from arduino-devops repository.

@ramya-subramanyam ramya-subramanyam requested review from IFX-Anusha and jaenrig-ifx and removed request for IFX-Anusha February 14, 2025 07:22
Copy link
Member

@jaenrig-ifx jaenrig-ifx left a comment

Choose a reason for hiding this comment

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

Thanks @ramya-subramanyam! Big step here understanding and integrating the maker-devops tools 🔧 👍

General topics:

  • This PR is covering a lot of things at once, so I suggest we create a branch, in which gradually refine until this can be merged into develop.

  • The tools should finally moved to the reusable arduino-devops repo (or other if there not make sense), and here only keep the configuration strictly specific to this project.
    For example, format, static ruleset etc, if they are applicable to the entire arduino-ifx ecosystem should end up in the reusable repo.
    Path inclusions, exclusions, etc. and specific configuration for this core should remain as config in the specific project.

*How does it work locally if I don´t have the docker container? I think we should have a way to go without it locally. Not sure if this is allowing that.

  • Personally, I need some more time to understand the whole codeChecks.py tool. The code is overall clean and well organize, but some lean user level documentation might be required.

shell: bash

jobs:
setup:
Copy link
Member

Choose a reason for hiding this comment

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

setup: is doing more than just setup or? It is also running codeChecks.py?

setup:
runs-on: ubuntu-24.04

# env:
Copy link
Member

Choose a reason for hiding this comment

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

There are 2 containers registries. One commented. When do we use one or another?
Do we need both?
If they are there should be some configurability to use one or the other, but not commented.
If it is commented, it is not needed, and thus can be deleted?

submodules: recursive


- name: Demo to show use of script to use matrix values
Copy link
Member

Choose a reason for hiding this comment

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

Update name: description. Is it not really a demo anymore?

checks: ${{ steps.set-matrix.outputs.checks }}


flowStep:
Copy link
Member

Choose a reason for hiding this comment

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

This step is doing cppcheck ? Maybe a more descriptive name than "flowStep"?

@@ -0,0 +1,93 @@
name: Code check workflow with strategy
Copy link
Member

Choose a reason for hiding this comment

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

This script will perform "code_check" meaning?

format
static code analysis
...
Wouldn´t independent workflow be easier to maintain and clearer to understand their reports?

(projectYAML, userYAML) = readProjectYAML(
"./project.yml",
"./user.yml",
# "src/python/project_yaml/project.yml", "src/python/project_yaml/user.yml"
Copy link
Member

Choose a reason for hiding this comment

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

Cleanup?

from check_schemata.checkUserYAMLSchema import checkUserYAMLSchema


@staticmethod
Copy link
Member

Choose a reason for hiding this comment

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

Same as before regarding the @staticmethod

@@ -1,10 +1,6 @@
repos:
- repo: local
hooks:
Copy link
Member

Choose a reason for hiding this comment

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

So now there is no format check in the pre-commit?

@@ -0,0 +1,117 @@
#!/bin/bash
set -x
Copy link
Member

Choose a reason for hiding this comment

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

This script is not covered by codeChecks.py?
This is specific to this project...
If this is not a temporary script, why this functionality included in the rest of the python utility?

TAG=push
TAG=latest

IFX_DOCKER_REGISTRY=dockerregistry-v2.vih.infineon.com/ifxmakers/makers-docker:$(TAG)
Copy link
Member

Choose a reason for hiding this comment

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

This is working in the outside world? 🤔

@ramya-subramanyam ramya-subramanyam force-pushed the integrate-code-check-tools branch from da62711 to d45ad11 Compare February 17, 2025 04:18
@ramya-subramanyam ramya-subramanyam force-pushed the integrate-code-check-tools branch from 607e972 to ddd5593 Compare February 18, 2025 09:37
Signed-off-by: Ramya Subramanyam <[email protected]>
@ramya-subramanyam ramya-subramanyam force-pushed the integrate-code-check-tools branch from ddd5593 to e637d9d Compare February 18, 2025 10:14
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.

2 participants