Repository navigation
Lint code with Ameba - #33
Merged
Merged
Conversation
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.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Rundocker compose build apponce 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_iois still over the complexity limit because of the deprecated markers support, so it has an inlineameba:disableuntil we remove those markers.