Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Oct 9, 2023
1 parent 17ff597 commit 83eb6cf
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/fredclausen']
custom: ["https://paypal.me/fredclausen"]
6 changes: 3 additions & 3 deletions .github/workflows/cancel_dupes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Cancelling Duplicates
on:
workflow_run:
workflows:
- 'Deploy to Docker Hub'
- 'Linting'
types: ['requested']
- "Deploy to Docker Hub"
- "Linting"
types: ["requested"]

jobs:
cancel-duplicate-workflow-runs:
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,37 @@ jobs:
# node-version: '13.x'
# - name: Run yarn
# run: yarn
# - name: Run eslint
# run: yarn run eslint . --ext .js
# - name: Run eslint
# run: yarn run eslint . --ext .js

shellcheck:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Pull koalaman/shellcheck:stable Image
run: docker pull koalaman/shellcheck:stable
- name: Run Shellcheck against shell scripts
run: |
find . -type f -exec grep -m1 -l -E '^#!.*sh.*' {} \; | grep -v -E '\/(.git\/|\S+.MD|\S+.md|retired_scripts\/|acarshub-typescript\/node_modules\/)'
docker run --rm -i -v "$PWD:/mnt" koalaman/shellcheck:stable $(find . -type f -exec grep -m1 -l -E '^#!.*sh.*' {} \; | grep -v -E '\/(.git\/|\S+.MD|\S+.md|retired_scripts\/|acarshub-typescript\/node_modules\/)')
# docker run --rm -i -v "$PWD:/mnt" koalaman/shellcheck:stable $(find . -type f -exec grep -m1 -l -E '^#!.*execline.*' {} \; | grep -v '/.git/')

- uses: actions/checkout@v4
- name: Pull koalaman/shellcheck:stable Image
run: docker pull koalaman/shellcheck:stable
- name: Run Shellcheck against shell scripts
run: |
find . -type f -exec grep -m1 -l -E '^#!.*sh.*' {} \; | grep -v -E '\/(.git\/|\S+.MD|\S+.md|retired_scripts\/|acarshub-typescript\/node_modules\/)'
docker run --rm -i -v "$PWD:/mnt" koalaman/shellcheck:stable $(find . -type f -exec grep -m1 -l -E '^#!.*sh.*' {} \; | grep -v -E '\/(.git\/|\S+.MD|\S+.md|retired_scripts\/|acarshub-typescript\/node_modules\/)')
# docker run --rm -i -v "$PWD:/mnt" koalaman/shellcheck:stable $(find . -type f -exec grep -m1 -l -E '^#!.*execline.*' {} \; | grep -v '/.git/')
hadolint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Pull hadolint/hadolint:latest Image
run: docker pull hadolint/hadolint:latest
- name: Run hadolint against Dockerfiles
run: docker run --rm -i -v "$PWD":/workdir --workdir /workdir --entrypoint hadolint hadolint/hadolint --ignore DL3003 --ignore DL3006 --ignore DL3010 --ignore DL4001 --ignore DL3007 --ignore DL3008 --ignore SC2068 --ignore DL3007 --ignore SC1091 --ignore DL3013 --ignore DL3010 $(find . -type f -iname "Dockerfile*")
- uses: actions/checkout@v4
- name: Pull hadolint/hadolint:latest Image
run: docker pull hadolint/hadolint:latest
- name: Run hadolint against Dockerfiles
run: docker run --rm -i -v "$PWD":/workdir --workdir /workdir --entrypoint hadolint hadolint/hadolint --ignore DL3003 --ignore DL3006 --ignore DL3010 --ignore DL4001 --ignore DL3007 --ignore DL3008 --ignore SC2068 --ignore DL3007 --ignore SC1091 --ignore DL3013 --ignore DL3010 $(find . -type f -iname "Dockerfile*")

markdownlint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Pull markdownlint/markdownlint:latest Image
run: docker pull markdownlint/markdownlint:latest
- name: Run markdownlint against *.md files
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026,~MD002,~MD022 $(find . -type f -iname '*.md' | grep -v '/.git/')
- uses: actions/checkout@v4
- name: Pull markdownlint/markdownlint:latest Image
run: docker pull markdownlint/markdownlint:latest
- name: Run markdownlint against *.md files
run: docker run --rm -i -v "$(pwd)":/workdir --workdir /workdir markdownlint/markdownlint:latest --rules ~MD013,~MD033,~MD026,~MD002,~MD022 $(find . -type f -iname '*.md' | grep -v '/.git/')
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The default `SERVER` and `SERVER_PORT` values are suitable for automatically wor
## Up and running

```yaml
version: '2.0'
version: "2.0"

services:
acarsdec:
image: ghcr.io/sdr-enthusiasts/docker-acarsdec:latest
image: ghcr.io/sdr-enthusiasts/docker-acarsdec:latest
tty: true
container_name: acarsdec
restart: always
Expand All @@ -48,16 +48,16 @@ services:
## Configuration options
| Variable | Description | Required | Default |
|----------|-------------|---------|--------|
| `TZ` | Your timezone | No | UTC |
| `SERIAL` | The serial number of your RTL-SDR dongle. Either this variable or `SOAPYSDR` must be set. | No | Blank |
| `SOAPYSDR` | The device string for your SoapySDR device. Either this variable or `SERIAL` must be set. | No | Blank |
| `FEED_ID` | Used by the decoder to insert a unique ID in to the output message | Yes | Blank |
| `FREQUENCIES` | Colon-separated list of frequencies, but to a maximum of 8, for the decoder to list to | Yes | Blank |
| `PPM` | Parts per million correction of the decoder | No | 0 |
| `GAIN`| The gain applied to the RTL-SDR dongle. Recommended to leave at the default autogain. To set manually, gain in in db (0 to 49.6; >52 and -10 will result in AGC; default is AGC) | No | `-10` for autogain |
| `SERVER` | The server where messages will be forwarded to. | No | Blank |
| `SERVER_PORT` | The port where the server will receive messages on. | No | `5550` |
| `MODE` | The output mode. `P` for planeplotter, `J` for JSON and `A` for acarsdec. | No | `J` |
| `QUIET_LOGS` | Mute log output to the bare minimum. Set to `false` to see all of the log messages.| No | `TRUE` |
| Variable | Description | Required | Default |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------ |
| `TZ` | Your timezone | No | UTC |
| `SERIAL` | The serial number of your RTL-SDR dongle. Either this variable or `SOAPYSDR` must be set. | No | Blank |
| `SOAPYSDR` | The device string for your SoapySDR device. Either this variable or `SERIAL` must be set. | No | Blank |
| `FEED_ID` | Used by the decoder to insert a unique ID in to the output message | Yes | Blank |
| `FREQUENCIES` | Colon-separated list of frequencies, but to a maximum of 8, for the decoder to list to | Yes | Blank |
| `PPM` | Parts per million correction of the decoder | No | 0 |
| `GAIN` | The gain applied to the RTL-SDR dongle. Recommended to leave at the default autogain. To set manually, gain in in db (0 to 49.6; >52 and -10 will result in AGC; default is AGC) | No | `-10` for autogain |
| `SERVER` | The server where messages will be forwarded to. | No | Blank |
| `SERVER_PORT` | The port where the server will receive messages on. | No | `5550` |
| `MODE` | The output mode. `P` for planeplotter, `J` for JSON and `A` for acarsdec. | No | `J` |
| `QUIET_LOGS` | Mute log output to the bare minimum. Set to `false` to see all of the log messages. | No | `TRUE` |

0 comments on commit 83eb6cf

Please sign in to comment.