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

Add static check with "avocado-static-checks" #14

Merged

Conversation

clebergnu
Copy link
Contributor

Adds a Python module import order check.

This is based on "avocado-static-checks", which is being added here as a submodule. The idea is to use the same checks in all "avocado-framework" projects without having to maintain different versions of the static check code/wrappers.

@clebergnu clebergnu force-pushed the add_static_check_import_sort branch 13 times, most recently from 8411e93 to 09c668e Compare January 30, 2024 18:53
@clebergnu clebergnu marked this pull request as ready for review January 30, 2024 18:54
@clebergnu clebergnu self-assigned this Jan 30, 2024
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @clebergnu, thank you for this. This is a great solution for consolidation of static-check around avocado projects. I have just one proposal to the way how we will run the static-checks in the github workflow.

- name: Install requirements for the static checks
run: pip3 install -r static-checks/requirements.txt

- name: Runs the static check for import order
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, we shouldn't have separated step for each static-check. Because when we introduce new static-check in avocado-static-checks repo, we will need to update every workflow which uses it. IMO, we should have a script inside avocado-static-checks repo which will run all static-checks, and we will use it here in this step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable. I've opened a PR (avocado-framework/avocado-static-checks#2) that adds such script, and will update this if/when approved.

@clebergnu clebergnu force-pushed the add_static_check_import_sort branch 2 times, most recently from b0f95ef to 8d05b7b Compare February 5, 2024 15:07
Adds a Python module import order check.

This is based on "avocado-static-checks", which is being added here as
a submodule.  The idea is to use the same checks in all
"avocado-framework" projects without having to maintain different
versions of the static check code/wrappers.

Signed-off-by: Cleber Rosa <[email protected]>
@richtja richtja merged commit 4134d1c into avocado-framework:main Feb 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants