-
-
Notifications
You must be signed in to change notification settings - Fork 109
Add ameba configuration
#703
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
Merged
straight-shoota
merged 6 commits into
crystal-lang:master
from
straight-shoota:infra/ameba
Feb 26, 2026
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d74a952
ameba
straight-shoota 95b3333
Adjust ameba configuration
straight-shoota 5c438c7
Use `!empty?` instead of `present?` for 1.0 compatibility
straight-shoota 4ddb6b7
Skip `match!` for 1.0 compatibility
straight-shoota 2abe8f6
Disable in ameba config
straight-shoota 78b28f1
Exclude entire file from ameba as workaround
straight-shoota File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| # This configuration file was generated by `ameba --gen-config` | ||
| # on 2025-06-02 13:57:07 UTC using Ameba version 1.7.0-dev. | ||
| # The point is for the user to remove these configuration records | ||
| # one by one as the reported problems are removed from the code base. | ||
| # | ||
| # For more details on any individual rule, run `ameba --only RuleName`. | ||
|
|
||
| # Indicators for comment annotations: | ||
| # | ||
| # * `Disabled`: The rule is disabled because it does not seem useful for this repo (or in general). | ||
| # * `BUG`: A bug in ameba prevents using this rule either entirely or for specific files. | ||
| # * `FIXME`: The rule seems useful, but requires some effort to resolve. That's deferred for later. | ||
| # * `TODO`: The rule might be useful, but we need to investigate whether we want to use it or not. | ||
|
|
||
| Version: "1.7.0-dev" | ||
|
|
||
| # Documentation | ||
| # ========================= | ||
|
|
||
| # Disabled: What's the point in alerting about existing TODOs in code? | ||
| Documentation/DocumentationAdmonition: | ||
| Enabled: false | ||
|
|
||
| # Lint | ||
| # ========================= | ||
|
|
||
| # Disabled: `else nil` can be useful to explicitly show the consequence of the else branch | ||
| Lint/ElseNil: | ||
| Enabled: false | ||
|
|
||
| # Disabled: We have an explicit CI job for testing the formatter (both latest | ||
| # and head). No reason to run it through ameba. | ||
| Lint/Formatting: | ||
| Enabled: false | ||
|
|
||
| # TODO: Investigate if some `not_nil!` calls can be avoided. | ||
| Lint/NotNil: | ||
| Enabled: false | ||
|
|
||
| # FIXME: Resolve shadowing. | ||
| Lint/ShadowingOuterLocalVar: | ||
| Enabled: false | ||
|
|
||
| # BUG: https://github.com/crystal-ameba/ameba/issues/612 | ||
| Lint/TopLevelOperatorDefinition: | ||
| Enabled: false | ||
|
|
||
| # Disabled: We have an explicit CI job for `typos`. No reason to run it through | ||
| # ameba. | ||
| Lint/Typos: | ||
| Enabled: false | ||
|
|
||
| # TODO: Investigate unused arguments. | ||
| Lint/UnusedArgument: | ||
| Enabled: false | ||
|
|
||
| # TODO: Investigate unused block arguments. | ||
| Lint/UnusedBlockArgument: | ||
| Enabled: false | ||
|
|
||
| Lint/UselessAssign: | ||
| # BUG: https://github.com/crystal-ameba/ameba/issues/447 | ||
| # This setting is to avoid false positives from the common use of type | ||
| # declarations in macro arguments. | ||
| ExcludeTypeDeclarations: true | ||
|
|
||
| # Metrics | ||
| # ========================= | ||
|
|
||
| # Disabled: Lot's of violations. Complexity is very individual. | ||
| Metrics/CyclomaticComplexity: | ||
| Enabled: false | ||
|
|
||
| # Naming | ||
| # ========================= | ||
| # All disabled. There are many violations and some of the rules are questionable. | ||
| # TODO: Consider enabling some of these rules. | ||
|
|
||
| Naming/AccessorMethodName: | ||
| Enabled: false | ||
|
|
||
| Naming/BinaryOperatorParameterName: | ||
| Enabled: false | ||
|
|
||
| Naming/BlockParameterName: | ||
| Enabled: false | ||
|
|
||
| # Disabled: All violations follow the spelling of identifiers in upstream | ||
| # projects, e.g. for lib bindings. | ||
| Naming/ConstantNames: | ||
| Enabled: false | ||
|
|
||
| Naming/MethodNames: | ||
| Enabled: false | ||
|
|
||
| Naming/PredicateName: | ||
| Enabled: false | ||
|
|
||
| Naming/QueryBoolMethods: | ||
| Enabled: false | ||
|
|
||
| Naming/RescuedExceptionsVariableName: | ||
| Enabled: false | ||
|
|
||
| Naming/TypeNames: | ||
| Enabled: false | ||
|
|
||
| Naming/VariableNames: | ||
| Enabled: false | ||
|
|
||
| # Style | ||
| # ========================= | ||
| # All disabled. There are many violations and some of the rules are questionable. | ||
| # TODO: Consider enabling some of these rules. | ||
|
|
||
| Style/HeredocEscape: | ||
| Enabled: false | ||
|
|
||
| Style/HeredocIndent: | ||
| Enabled: false | ||
|
|
||
| Style/MultilineCurlyBlock: | ||
| Enabled: false | ||
|
|
||
| # Disabled: This rule seems too strict when any negation inside a complex condition is | ||
| # considered a violation. https://github.com/crystal-ameba/ameba/issues/621 | ||
| Style/NegatedConditionsInUnless: | ||
| Enabled: false | ||
|
|
||
| # BUG: https://github.com/crystal-ameba/ameba/issues/614 | ||
| Style/ParenthesesAroundCondition: | ||
| Enabled: false | ||
|
|
||
| Style/PercentLiteralDelimiters: | ||
| Enabled: false | ||
|
|
||
| Style/RedundantNext: | ||
| Enabled: false | ||
|
|
||
| Style/RedundantReturn: | ||
| Enabled: false | ||
|
|
||
| Style/RedundantSelf: | ||
| Enabled: false | ||
|
|
||
| Style/VerboseBlock: | ||
| Enabled: false | ||
|
|
||
| Style/WhileTrue: | ||
| Enabled: false | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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 incorrect.