diff --git a/.ameba.yml b/.ameba.yml new file mode 100644 index 0000000..68adffe --- /dev/null +++ b/.ameba.yml @@ -0,0 +1,2 @@ +Naming/BlockParameterName: + Enabled: false diff --git a/.changes/unreleased/internal-20250201-163935.yaml b/.changes/unreleased/internal-20250201-163935.yaml new file mode 100644 index 0000000..a98983b --- /dev/null +++ b/.changes/unreleased/internal-20250201-163935.yaml @@ -0,0 +1,5 @@ +kind: internal +body: Use Ameba to lint codebase +time: 2025-02-01T16:39:35.22518+01:00 +custom: + Issue: "" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62c4bb1..7bb551f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,20 @@ jobs: - uses: crystal-lang/install-crystal@v1 - run: crystal tool format --check + lint: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: crystal-ameba/github-action@v0.12.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: crystal-lang/install-crystal@v1 - - run: shards install + - run: shards install --skip-executables --skip-postinstall - run: crystal spec diff --git a/shard.yml b/shard.yml index 2bf1532..bdeeab5 100644 --- a/shard.yml +++ b/shard.yml @@ -7,6 +7,9 @@ authors: targets: drift: main: src/cli.cr + # FIXME: workaround due lack of pre-compiled CLI version + ameba: + main: lib/ameba/src/cli.cr dependencies: db: github: crystal-lang/crystal-db @@ -14,3 +17,7 @@ dependencies: sqlite3: github: crystal-lang/crystal-sqlite3 version: ~> 0.21.0 +development_dependencies: + ameba: + github: crystal-ameba/ameba + version: ~> 1.6.4