Skip to content

Commit

Permalink
Uses Ameba to lint codebase
Browse files Browse the repository at this point in the history
Solves misc warnings when linting other codebases that use Drift as
library.
  • Loading branch information
luislavena committed Feb 1, 2025
1 parent b26dd54 commit b3b728b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Naming/BlockParameterName:
Enabled: false
5 changes: 5 additions & 0 deletions .changes/unreleased/internal-20250201-163935.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: internal
body: Use Ameba to lint codebase
time: 2025-02-01T16:39:35.22518+01:00
custom:
Issue: ""
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
7 changes: 7 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ 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
version: ~> 0.13.1
sqlite3:
github: crystal-lang/crystal-sqlite3
version: ~> 0.21.0
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 1.6.4

0 comments on commit b3b728b

Please sign in to comment.