Skip to content

Commit

Permalink
Extract dev script for running lintian (#1792)
Browse files Browse the repository at this point in the history
Related #1716. Stacked on
#1791.

This PR pulls out the inlined `lintian` invocation to its own dev
script.

I had to apply one fix, because [shellcheck complained about `<(ls
*.deb)`, which should be `<(ls --
*.deb)`](https://www.shellcheck.net/wiki/SC2035).
<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1792"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

---------

Co-authored-by: Jan Heuermann <jan@jotaen.net>
  • Loading branch information
jotaen4tinypilot and jotaen authored May 15, 2024
1 parent 80c0420 commit d3fb5b1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
12 changes: 1 addition & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,7 @@ jobs:
command: lintian --version
- run:
name: Run lintian
command: |
set -exu
while read -r file; do
lintian \
--check \
--no-tag-display-limit \
--suppress-tags-from-file .lintianignore \
--no-cfg \
--fail-on warning,error \
"${file}"
done < <(ls *.deb)
command: ./dev-scripts/check-debian-pkg
build_bundle:
executor: python
steps:
Expand Down
22 changes: 22 additions & 0 deletions dev-scripts/check-debian-pkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Perform static analysis on all .deb files in the working directory.

# Exit on first failure.
set -e

# Echo commands before executing them, by default to stderr.
set -x

# Exit on unset variable.
set -u

while read -r file; do
lintian \
--check \
--no-tag-display-limit \
--suppress-tags-from-file .lintianignore \
--no-cfg \
--fail-on warning,error \
"${file}"
done < <(ls -- *.deb)

0 comments on commit d3fb5b1

Please sign in to comment.