Skip to content

Commit

Permalink
Version rules from 3 last versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Oct 7, 2024
1 parent 0fc5e59 commit 4373e4b
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ameba/rule/documentation/documentation.cr
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Ameba::Rule::Documentation
# ```
class Documentation < Base
properties do
since_version "1.5.0"
enabled false
description "Enforces public types to be documented"

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/documentation/documentation_admonition.cr
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module Ameba::Rule::Documentation
# ```
class DocumentationAdmonition < Base
properties do
since_version "1.6.0"
description "Reports documentation admonitions"
admonitions %w[TODO FIXME BUG]
timezone "UTC"
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/formatting.cr
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Ameba::Rule::Lint
# ```
class Formatting < Base
properties do
since_version "1.4.0"
description "Reports not formatted sources"
fail_on_error false
end
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/literal_assignments_in_expressions.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Ameba::Rule::Lint
include AST::Util

properties do
since_version "1.4.0"
description "Disallows assignments with literal values in control expressions"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/missing_block_argument.cr
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module Ameba::Rule::Lint
# ```
class MissingBlockArgument < Base
properties do
since_version "1.4.0"
description "Disallows yielding method definitions without block argument"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/spec_filename.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module Ameba::Rule::Lint
# ```
class SpecFilename < Base
properties do
since_version "1.6.0"
description "Enforces spec filenames to have `_spec` suffix"
ignored_dirs %w[spec/support spec/fixtures spec/data]
ignored_filenames %w[spec_helper]
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/typos.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Ameba::Rule::Lint
# ```
class Typos < Base
properties do
since_version "1.6.0"
description "Reports typos found in source files"

bin_path nil, as: String?
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/lint/unused_block_argument.cr
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Ameba::Rule::Lint
# ```
class UnusedBlockArgument < Base
properties do
since_version "1.4.0"
description "Disallows unused block arguments"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/accessor_method_name.cr
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module Ameba::Rule::Naming
# ```
class AccessorMethodName < Base
properties do
since_version "1.6.0"
description "Makes sure that accessor methods are named properly"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/ascii_identifiers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module Ameba::Rule::Naming
# ```
class AsciiIdentifiers < Base
properties do
since_version "1.6.0"
description "Disallows non-ascii characters in identifiers"
ignore_symbols false
end
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/binary_operator_parameter_name.cr
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Ameba::Rule::Naming
# ```
class BinaryOperatorParameterName < Base
properties do
since_version "1.6.0"
description "Enforces that certain binary operator methods have " \
"their sole parameter named `other`"
excluded_operators %w[[] []? []= << >> ` =~ !~]
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/block_parameter_name.cr
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Ameba::Rule::Naming
# ```
class BlockParameterName < Base
properties do
since_version "1.6.0"
description "Disallows non-descriptive block parameter names"
min_name_length 3
allow_names_ending_in_numbers true
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/filename.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Ameba::Rule::Naming
# ```
class Filename < Base
properties do
since_version "1.6.0"
description "Enforces file names to be in underscored case"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/query_bool_methods.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Ameba::Rule::Naming
include AST::Util

properties do
since_version "1.4.0"
description "Reports boolean properties without the `?` suffix"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/naming/rescued_exceptions_variable_name.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Ameba::Rule::Naming
# ```
class RescuedExceptionsVariableName < Base
properties do
since_version "1.6.0"
description "Makes sure that rescued exceptions variables are named as expected"
allowed_names %w[e ex exception error]
end
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/performance/excessive_allocations.cr
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module Ameba::Rule::Performance
include AST::Util

properties do
since_version "1.5.0"
description "Identifies usage of excessive collection allocations"
call_names({
"codepoints" => "each_codepoint",
Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/performance/minmax_after_map.cr
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Ameba::Rule::Performance
include AST::Util

properties do
since_version "1.5.0"
description "Identifies usage of `min/max/minmax` calls that follow `map`"
end

Expand Down
1 change: 1 addition & 0 deletions src/ameba/rule/style/parentheses_around_condition.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Ameba::Rule::Style
# ```
class ParenthesesAroundCondition < Base
properties do
since_version "1.4.0"
description "Disallows redundant parentheses around control expressions"

exclude_ternary false
Expand Down

0 comments on commit 4373e4b

Please sign in to comment.