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

Avocado: use avocado-static-checks #6026

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- name: Allow git to operate on directory checked out by GH Actions
run: git config --global --add safe.directory `pwd`
- name: Installing Avocado development dependencies
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "static-checks"]
path = static-checks
url = https://github.com/avocado-framework/avocado-static-checks
2 changes: 2 additions & 0 deletions avocado-static-checks.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[lint]
.:.pylintrc
8 changes: 7 additions & 1 deletion docs/source/guides/contributor/chapters/how.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ Git workflow

- Clone from your fork::

$ git clone [email protected]:<username>/avocado.git
$ git clone --recurse-submodules [email protected]:<username>/avocado.git

.. note:: The ``--recurse-submodules`` option is used to checkout the
contents from the `avocado-static-checks
<https://github.com/avocado-framework/avocado-static-checks>`_
repository, which is not needed for general Avocado installations,
but which is very important for development purposes.

- Enter the directory::

Expand Down
5 changes: 5 additions & 0 deletions selftests/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,11 @@ def create_suites(args): # pylint: disable=W0621
if args.dict_tests["static-checks"]:
config_check_static = copy.copy(config_check)
config_check_static["resolver.references"] = glob.glob("selftests/*.sh")
config_check_static["resolver.references"].append(
"static-checks/check-import-order"
)
config_check_static["resolver.references"].append("static-checks/check-style")
config_check_static["resolver.references"].append("static-checks/check-lint")
suites.append(TestSuite.from_config(config_check_static, "static-checks"))

# ========================================================================
Expand Down
3 changes: 0 additions & 3 deletions selftests/isort.sh

This file was deleted.

7 changes: 0 additions & 7 deletions selftests/lint.sh

This file was deleted.

4 changes: 0 additions & 4 deletions selftests/style.sh

This file was deleted.

1 change: 1 addition & 0 deletions static-checks
Submodule static-checks added at 2f53ec
Loading