Skip to content

Commit

Permalink
Merge pull request #6026 from clebergnu/avocado_static_checks
Browse files Browse the repository at this point in the history
Avocado: use avocado-static-checks
  • Loading branch information
richtja authored Sep 17, 2024
2 parents 536b6f7 + 41edcce commit de6bef3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
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

0 comments on commit de6bef3

Please sign in to comment.