Releases: crystal-ameba/ameba
Releases · crystal-ameba/ameba
v0.14.0
New Rules
Lint/DuplicatedRequire
#188Lint/SpecFocus
#204Performance/JoinAfterMap
#186Performance/FlattenAfterMap
#192Performance/CompactAfterMap
#193Performance/ChainedCallWithNoBang
#195Performance/AnyInsteadOfEmpty
#197Style/VerboseBlock
#201Style/IsAFilter
#202
Improvements
- Change Rule to a class #191
- Add --rules switch to the CLI #179
- Add support for showing code context lines #181
- Add support for showing end location marker #200
Bugfixes
- Avoid exponential recursion while finding variable references in scopes #203
Credits
Huge thanks to @Sija who made a valuable commitment to this release!
v0.13.4
v0.13.3
v0.13.2
v0.13.1
v0.13.0
This is a small release that supports Crystal 0.35.0 and eliminates the deprecation messages which are related to yaml serialization.
- Move to
YAML::Serializable
#157 - Travis CI: test against Crystal nightlies #153 (thanks @Sija)
Layout/TrailingBlankLines
final newline checkup #152
New rules added:
v0.12.1
This is a small release which includes few important bugfixes
v0.12.0
New features & improvements
- Added compability for Crystal
0.34
(BC with Crystal0.33
). See #138 (thanks @bcardiff) - Added ability to configured globs and exclude paths to sources globally (see #125):
# .ameba.yml
Globs:
- **/*.cr
- !lib
Excluded:
- spec
- src/server/*
Style/RedundantReturn
rule was extended to catch redundant returns in binary operators. See 946ec67Lint/LiteralInInterpolation
rule now reports multiple nodes and points to the specific literal locations. See 04497feAST::NodeVisitor
is now a default for all rules, which reduces a good portion of a boilerplate. See 1a0468c
New rules added:
Style/RedundantNext
- disallows redundant next expressions. See #134Lint/SharedVarInSpawn
- disallows using shared variables in fibers, which are mutated during iterations. See #135Lint/EmptyLoop
- disallows empty loops, see #136Lint/RedundantStringCoercion
- disallows string conversion in string interpolation, which is redundant. See #137
Bugfixes
- Corrected broken links in Readme. See #123 (thanks @hanneskaeufler)
- Nested block params were mistakenly reported as useless assignments. This is now fixed 74dfa0b
- Block params in macro were mistakenly reported as shadowed local var. This is now fixed aff723b
v0.11.0
New features & improvements
--gen-config
now does not generate a todo file if there are no linting issues, see 2704a0d- A new AST structure
typeof
is added to the list of scope, so rules now properly report unused assignment, shadowed variables etc, see 677c757
typeof(begin
foo = 1 # unused variable
# ...
end)
Note: Such kind of structure is usually used as type specs when the compiler can report a problem at the compilation step instead of runtime.
- Ameba can now lint in parallel, see #118
- New rule:
RedundantWithIndex
, see #120 - New rule:
RedundantWithObject
, see #121
Bug fixes
Lint/UnusedArgument
: fails to recognized used argument inside macro #117- Generated TODO file could have duplicated sections in yaml file. This is fixed by 1115965, 4ae0195
- A custom
bin/ameba.cr
run file could be deleted even it was already created by the user. This is fixed by 4a54f6d - Previously Ameba reported false positiveness if argument is shadowed by instance variable:
def bar(@foo)
@foo.try do |foo|
end
end
This is fixed by 6b56c87