Skip to content

Releases: crystal-ameba/ameba

v0.14.0

24 Feb 08:22
d8c32f0
Compare
Choose a tag to compare

New Rules

  • Lint/DuplicatedRequire #188
  • Lint/SpecFocus #204
  • Performance/JoinAfterMap #186
  • Performance/FlattenAfterMap #192
  • Performance/CompactAfterMap #193
  • Performance/ChainedCallWithNoBang #195
  • Performance/AnyInsteadOfEmpty #197
  • Style/VerboseBlock #201
  • Style/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

26 Jan 16:24
d28f9f7
Compare
Choose a tag to compare
  • Crystal 0.36 compatibility #184
  • Switch CI from Travis to GitHub Actions #182
  • Lint/UselessAssign: do not report if the variable is assigned and referenced in MacroFor/MacroIf #196

v0.13.3

04 Dec 12:57
552d31a
Compare
Choose a tag to compare

v0.13.2

26 Aug 19:48
2eedcb8
Compare
Choose a tag to compare
  • Lint/UselessAssign: ignore variables with _ prefix b5bd76d
  • Upgrade alpine docker image 5ee5429

v0.13.1

16 Jul 05:26
66866a4
Compare
Choose a tag to compare
  • Incorrectly reporting Lint/ShadowingOuterLocalVar within macro included #161
  • #to_s variants with arguments are prevented. #160

v0.13.0

19 Jun 18:47
3448de3
Compare
Choose a tag to compare

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:

  • Lint/BadDirective - reports incorrect comment directives for Ameba #143
  • Style/IsANil - disallows calls to is_a?(Nil) in favor of nil? #141

v0.12.1

13 Apr 07:14
b215b34
Compare
Choose a tag to compare

This is a small release which includes few important bugfixes

  • Incorrectly reporting Lint/ShadowingOuterLocalVar within macro #144
  • Make InlineComments::COMMENT_DIRECTIVE_REGEX more strict #146 (thanks @Sija)
  • ConstantNames rule conflicts with good practice defined in Crystal book about new log system #148

v0.12.0

27 Mar 18:14
a54af03
Compare
Choose a tag to compare

New features & improvements

  • Added compability for Crystal 0.34 (BC with Crystal 0.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 946ec67
  • Lint/LiteralInInterpolation rule now reports multiple nodes and points to the specific literal locations. See 04497fe
  • AST::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 #134
  • Lint/SharedVarInSpawn - disallows using shared variables in fibers, which are mutated during iterations. See #135
  • Lint/EmptyLoop - disallows empty loops, see #136
  • Lint/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

29 Nov 18:37
3f54786
Compare
Choose a tag to compare

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

v0.10.1

14 Sep 15:36
8a27a36
Compare
Choose a tag to compare

Fixes and improvements:

  • CyclomaticCompexity: report only def name b868d88
  • Make Ameba::VERSION work with paths containing spaces #114
  • Ameba supports external plugins #112
  • Drop support of Crystal 0.24.2 9065a5f