-
-
Notifications
You must be signed in to change notification settings - Fork 171
Ameba 1.7 #2045
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
Merged
Ameba 1.7 #2045
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c0d9a7b
Bump Ameba to the latest version (1.7.0-dev)
Sija 60ae39b
Tweak Ameba configuration
Sija 8eb6f88
Add Ameba CI workflow
Sija 7473cb8
Remove `check_format` job as it’s redundant now
Sija ebb1b99
Fix `Style/HeredocIndent` type of Ameba issues
Sija e16aaac
Fix `Lint/WhitespaceAroundMacroExpression` type of Ameba issues
Sija 4d99e19
Fix `Style/PercentLiteralDelimiters` type of Ameba issues
Sija 99c8435
Fix `Style/VerboseNilType` type of Ameba issues
Sija 63ed6da
Fix `Lint/ElseNil` type of Ameba issues
Sija 2ab3daa
Fix `Style/RedundantNilInControlExpression` type of Ameba issues
Sija 816e8e4
Fix `Style/RedundantSelf` type of Ameba issues
Sija 948679c
Fix `Lint/SpecEqWithBoolOrNilLiteral` type of Ameba issues
Sija 5532eaa
Fix `Performance/AnyInsteadOfPresent` type of Ameba issues
Sija bbe4f38
Fix `Lint/UnusedRescueVariable` type of Ameba issues
Sija bc9076f
Fix `Lint/UnneededDisableDirective` type of Ameba issues
Sija e8721b6
Fix `Style/MultilineCurlyBlock` type of Ameba issues
Sija be1b4aa
Fix `Naming/RescuedExceptionsVariableName` type of Ameba issues
Sija 368cd0d
Ignore some of the `Lint/AssignmentInCallArgument` issues
Sija c5be1e5
Remove redundant `begin … end`
Sija 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 |
|---|---|---|
| @@ -1,24 +1,11 @@ | ||
| # This configuration file was generated by `ameba --gen-config` | ||
| # on 2026-04-02 23:47:16 UTC using Ameba version 1.6.4. | ||
| # The point is for the user to remove these configuration records | ||
| # one by one as the reported problems are removed from the code base. | ||
|
|
||
| # Problems found: 92 | ||
| # Run `ameba --only Lint/UselessAssign` for details | ||
| Lint/UselessAssign: | ||
| Description: Disallows useless variable assignments | ||
| ExcludeTypeDeclarations: true | ||
| Enabled: true | ||
| Severity: Warning | ||
|
|
||
| # Problems found: 9 | ||
| # Run `ameba --only Lint/Typos` for details | ||
| Lint/Typos: | ||
| Description: Reports typos found in source files | ||
| Enabled: true | ||
| FailOnError: false | ||
| Excluded: | ||
| - spec/lucky/text_helpers/truncate_spec.cr | ||
| - spec/lucky/text_helpers/excerpts_spec.cr | ||
| - spec/lucky/secure_headers_spec.cr | ||
| Enabled: true | ||
| Severity: Warning | ||
|
|
||
| Lint/AssignmentInCallArgument: | ||
| Excluded: | ||
| - spec/lucky/memoize_spec.cr |
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,19 @@ | ||
| name: Ameba | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download source | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Run Ameba Linter | ||
| uses: crystal-ameba/github-action@master |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| require "colorize" | ||
|
|
||
| puts <<-ERROR | ||
| Missing 'browser' or 'api' after 'gen.action' | ||
| Missing 'browser' or 'api' after 'gen.action' | ||
|
|
||
| For actions used in a browser (HTML, redirects)... | ||
| For actions used in a browser (HTML, redirects)... | ||
|
|
||
| #{"lucky gen.action.browser".colorize.green.bold} | ||
| #{"lucky gen.action.browser".colorize.green.bold} | ||
|
|
||
| For an API endpoint (JSON, XML, GraphQL)... | ||
| For an API endpoint (JSON, XML, GraphQL)... | ||
|
|
||
| #{"lucky gen.action.api".colorize.green.bold} | ||
| #{"lucky gen.action.api".colorize.green.bold} | ||
|
|
||
|
|
||
| ERROR | ||
| ERROR |
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
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.
Uh oh!
There was an error while loading. Please reload this page.