Skip to content

Commit

Permalink
Fix newly found issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Feb 17, 2025
1 parent 34d00d6 commit b8037c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions spec/ameba/tokenizer_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ module Ameba

describe Tokenizer do
describe "#run" do
it_tokenizes %("string"), %w(DELIMITER_START STRING DELIMITER_END EOF)
it_tokenizes %(100), %w(NUMBER EOF)
it_tokenizes %('a'), %w(CHAR EOF)
it_tokenizes %([]), %w([] EOF)
it_tokenizes %([] of String), %w([] SPACE IDENT SPACE CONST EOF)
it_tokenizes %q("str #{3}"), %w(
it_tokenizes %("string"), %w[DELIMITER_START STRING DELIMITER_END EOF]
it_tokenizes %(100), %w[NUMBER EOF]
it_tokenizes %('a'), %w[CHAR EOF]
it_tokenizes %([]), %w[[] EOF]
it_tokenizes %([] of String), %w[[] SPACE IDENT SPACE CONST EOF]
it_tokenizes %q("str #{3}"), %w[
DELIMITER_START STRING INTERPOLATION_START NUMBER } DELIMITER_END EOF
)
]

it_tokenizes %(%w[1 2]),
%w[STRING_ARRAY_START STRING STRING STRING_ARRAY_END EOF]
Expand Down
4 changes: 2 additions & 2 deletions src/ameba/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class Ameba::Config
Path[XDG_CONFIG_HOME] / "ameba/config.yml",
}

DEFAULT_GLOBS = %w(
DEFAULT_GLOBS = %w[
**/*.cr
!lib
)
]

Ameba.ecr_supported? do
DEFAULT_GLOBS << "**/*.ecr"
Expand Down
2 changes: 1 addition & 1 deletion src/ameba/rule/lint/require_parentheses.cr
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Ameba::Rule::Lint

MSG = "Use parentheses in the method call to avoid confusion about precedence"

ALLOWED_CALL_NAMES = %w{[]? []}
ALLOWED_CALL_NAMES = %w[[]? []]

def test(source, node : Crystal::Call)
return if node.args.empty? ||
Expand Down

0 comments on commit b8037c9

Please sign in to comment.