diff options
author | David Runge <dave@sleepmap.de> | 2022-04-13 19:29:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 18:29:29 +0100 |
commit | aa275762364b9d71c3bfca673e9c78df6d407aa9 (patch) | |
tree | 04c9667483d697ac480d6178f9fdb3ddbeaa0996 /.github/workflows | |
parent | cceca542551ca8a23cee1f4ebfb3f9a792cb0296 (diff) | |
download | jack2-aa275762364b9d71c3bfca673e9c78df6d407aa9.tar.gz |
Fix wscripts syntax (#826)
* Add flake8 configuration
.flake8:
Add flake8 configuration that limits the line length to 120 chars and
outputs to flake8.txt
* Add flake8.txt to gitignore
.gitignore:
Add flake8.txt (flake8 output file) to ignore.
* Syntax fixes and cleanup for top-level wscript
wscript:
Fix syntax of wscript according to pep8 (but do not break long lines).
Remove unused imports and move all module level imports to the top of
the file.
Fix broken build target of IIO driver (source argument to
`create_driver_obj()` supplied an uninitialized variable).
Break lines at 120 chars.
* Fix common/wscript syntax
common/wscript:
Fix syntax problems, unneeded imports and break lines at 120 chars.
* Fix compat/alloca/wscript syntax
compat/alloca/wscript:
Fix compat/alloca/wscript syntax
* Fix compat/wscript syntax
compat/wscript:
Fix compat/wscript syntax
* Fix dbus/wscript syntax
dbus/wscript:
Fix syntax and break lintes at 120 chars.
* Fix example-clients/wscript syntax
example-clients/wscript:
Fix syntax and remove commented code.
* Fix tests/wscript syntax
tests/wscript:
Fix syntax and commented code.
* Fix tools/wscript syntax
tools/wscript:
Fix tools/wscript syntax.
* Add github workflow for linting wscripts
.github/workflows/lint.yml:
Add github workflow for linting wscripts using findutils and flake8.
* Fix project version extraction in CI
.github/workflows/build.yml:
Adapt the project version extraction in CI to the syntax changes in
the top-level wscript.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 2 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc7d7381..f405ccd6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -318,7 +318,7 @@ jobs: apt-get source -d jackd2 tar xf *.debian.tar.xz rm -rf debian/source - dch -M -b -v "$(cat wscript | awk 'sub("VERSION=","")' | tr -d "'")~$(date +"%Y%m%d")git${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}" -D focal "automated build" + dch -M -b -v "$(cat wscript | awk 'sub("^VERSION = ","")' | tr -d "'")~$(date +"%Y%m%d")git${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}" -D focal "automated build" debuild -rfakeroot --no-lintian || true - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..3ac7c14f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +--- + +name: Test files + +on: + push: + branches: [master, develop] + pull_request: + branches: [master, develop] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install flake8 + - name: Lint with flake8 + run: flake8 |