-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add ameba #15875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ameba #15875
Conversation
d64279f
to
e838118
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of disabled rules. How many are left 😅
$ ameba -r | tail -n1
Total rules: 77 / 45 enabled
$ ameba -v
1.6.4
$ ameba-master -r | tail -n1
Total rules: 101 / 58 enabled
$ ameba-master -v
1.7.0-dev |
# BUG: https://github.com/crystal-ameba/ameba/issues/612 | ||
Lint/TopLevelOperatorDefinition: | ||
Enabled: false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been already fixed.
# BUG: https://github.com/crystal-ameba/ameba/issues/612 | |
Lint/TopLevelOperatorDefinition: | |
Enabled: false |
# BUG: https://github.com/crystal-ameba/ameba/issues/614 | ||
Style/ParenthesesAroundCondition: | ||
Enabled: false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
# BUG: https://github.com/crystal-ameba/ameba/issues/614 | |
Style/ParenthesesAroundCondition: | |
Enabled: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is only in master. Latest ameba release is still broken.
There are also still other violations of this rule. This is a TODO for a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whole 1.7.0-dev is only in master, so... 🤷♂️
Lint/LiteralInInterpolation: | ||
Excluded: | ||
- spec/std/random_spec.cr # BUG: https://github.com/crystal-ameba/ameba/issues/611 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was just fixed and landed in master
.
Lint/LiteralInInterpolation: | |
Excluded: | |
- spec/std/random_spec.cr # BUG: https://github.com/crystal-ameba/ameba/issues/611 |
@Sija I'll merge this as is. The purpose of this PR is to setup a basic configuration. It's not meant to be the final word. Further changes just cause more delays, which creates friction. |
Adds configuration and a CI job for https://github.com/crystal-ameba/ameba
I let ameba generate a config (
ameba --gen-config
) but replaced all exclusions with hard disables. Then I fixed the violations for some of the rules, which have already been merged in the last couple of days. So I removed the disables for these rules.The configuration is annotated with explanations in code.
I have disabled most
Naming
andStyle
rules because most had large numbers of violations and some of them seem questionable. We can consider enabling some of the in the future, piece by pieceFor review, it's best to ignore the first three commits and review the rest combined, not the individual commits.Depends on #15860, #15870Resolves #14608
Closes #14631