Skip to content

Lint code with Ameba - #33

Merged
luislavena merged 2 commits into
mainfrom
add-ameba-linting
Oct 25, 2026
Merged

luislavena merged 2 commits into
mainfrom
add-ameba-linting

Conversation

@luislavena

Copy link
Copy Markdown
Owner

Add Ameba to check the code for common Crystal mistakes and style problems, before we add more features.

Ameba v1.7.0 ships as a static binary. The dev image (docker/dev.dockerfile) downloads it with a pinned checksum, so it is not a shard dependency. Run docker compose build app once to get it locally.

CI uses the official Ameba action, limited to the 1.7.0 rules so it matches the dev image.

The first run found 4 issues, all fixed here. Migration.from_io is still over the complexity limit because of the deprecated markers support, so it has an inline ameba:disable until we remove those markers.

Ameba checks Crystal code for common mistakes and style problems.
Since v1.7.0 it ships as a static binary, so the dev image downloads
it instead of adding a shard dependency.

Migration.from_io stays over the complexity limit because of the
support for deprecated markers. An inline exception marks it until
that support goes away.
The official Ameba action reports issues inline on pull requests.
Its image follows the latest Ameba release, so the version input
limits the rules to 1.7.0, the same as the dev image.
@luislavena
luislavena merged commit ac6d522 into main Oct 25, 2026
4 checks passed
@luislavena
luislavena deleted the add-ameba-linting branch October 25, 2026 01:14
@luislavena luislavena mentioned this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant