Skip to content

Commit b3b728b

Browse files
committed
Uses Ameba to lint codebase
Solves misc warnings when linting other codebases that use Drift as library.
1 parent b26dd54 commit b3b728b

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.ameba.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Naming/BlockParameterName:
2+
Enabled: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: internal
2+
body: Use Ameba to lint codebase
3+
time: 2025-02-01T16:39:35.22518+01:00
4+
custom:
5+
Issue: ""

.github/workflows/test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,20 @@ jobs:
2727
- uses: crystal-lang/install-crystal@v1
2828
- run: crystal tool format --check
2929

30+
lint:
31+
runs-on: ubuntu-latest
32+
permissions:
33+
pull-requests: write
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: crystal-ameba/[email protected]
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
3040
test:
3141
runs-on: ubuntu-latest
3242
steps:
3343
- uses: actions/checkout@v4
3444
- uses: crystal-lang/install-crystal@v1
35-
- run: shards install
45+
- run: shards install --skip-executables --skip-postinstall
3646
- run: crystal spec

shard.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@ authors:
77
targets:
88
drift:
99
main: src/cli.cr
10+
# FIXME: workaround due lack of pre-compiled CLI version
11+
ameba:
12+
main: lib/ameba/src/cli.cr
1013
dependencies:
1114
db:
1215
github: crystal-lang/crystal-db
1316
version: ~> 0.13.1
1417
sqlite3:
1518
github: crystal-lang/crystal-sqlite3
1619
version: ~> 0.21.0
20+
development_dependencies:
21+
ameba:
22+
github: crystal-ameba/ameba
23+
version: ~> 1.6.4

0 commit comments

Comments
 (0)