Merge pull request #290 from crystal-ameba/Sija/remove-trailing-dots-from-rule-descriptions

Remove trailing dots from rule descriptions
This commit is contained in:
Sijawusz Pur Rahnama 2022-10-30 23:51:32 +01:00 committed by GitHub
commit 8d4a4dfd7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 13 additions and 13 deletions

View file

@ -32,8 +32,8 @@ module Ameba::Rule::Lint
# ``` # ```
class ShadowingOuterLocalVar < Base class ShadowingOuterLocalVar < Base
properties do properties do
description "Disallows the usage of the same name as outer local variables" \ description "Disallows the usage of the same name as outer local variables " \
" for block or proc arguments." "for block or proc arguments"
end end
MSG = "Shadowing outer local variable `%s`" MSG = "Shadowing outer local variable `%s`"

View file

@ -51,7 +51,7 @@ module Ameba::Rule::Lint
# ``` # ```
class SharedVarInFiber < Base class SharedVarInFiber < Base
properties do properties do
description "Disallows shared variables in fibers." description "Disallows shared variables in fibers"
end end
MSG = "Shared variable `%s` is used in fiber" MSG = "Shared variable `%s` is used in fiber"

View file

@ -28,7 +28,7 @@ module Ameba::Rule::Performance
# ``` # ```
class AnyAfterFilter < Base class AnyAfterFilter < Base
properties do properties do
description "Identifies usage of `any?` calls that follow filters." description "Identifies usage of `any?` calls that follow filters"
filter_names : Array(String) = %w(select reject) filter_names : Array(String) = %w(select reject)
end end

View file

@ -31,7 +31,7 @@ module Ameba::Rule::Performance
include AST::Util include AST::Util
properties do properties do
description "Identifies usage of arg-less `any?` calls." description "Identifies usage of arg-less `any?` calls"
end end
ANY_NAME = "any?" ANY_NAME = "any?"

View file

@ -40,7 +40,7 @@ module Ameba::Rule::Performance
include AST::Util include AST::Util
properties do properties do
description "Identifies usage of chained calls not utilizing the bang method variants." description "Identifies usage of chained calls not utilizing the bang method variants"
# All of those have bang method variants returning `self` # All of those have bang method variants returning `self`
# and are not modifying the receiver type (like `compact` does), # and are not modifying the receiver type (like `compact` does),

View file

@ -23,7 +23,7 @@ module Ameba::Rule::Performance
# ``` # ```
class CompactAfterMap < Base class CompactAfterMap < Base
properties do properties do
description "Identifies usage of `compact` calls that follow `map`." description "Identifies usage of `compact` calls that follow `map`"
end end
COMPACT_NAME = "compact" COMPACT_NAME = "compact"

View file

@ -27,7 +27,7 @@ module Ameba::Rule::Performance
# ``` # ```
class FirstLastAfterFilter < Base class FirstLastAfterFilter < Base
properties do properties do
description "Identifies usage of `first/last/first?/last?` calls that follow filters." description "Identifies usage of `first/last/first?/last?` calls that follow filters"
filter_names : Array(String) = %w(select) filter_names : Array(String) = %w(select)
end end

View file

@ -23,7 +23,7 @@ module Ameba::Rule::Performance
# ``` # ```
class FlattenAfterMap < Base class FlattenAfterMap < Base
properties do properties do
description "Identifies usage of `flatten` calls that follow `map`." description "Identifies usage of `flatten` calls that follow `map`"
end end
FLATTEN_NAME = "flatten" FLATTEN_NAME = "flatten"

View file

@ -24,7 +24,7 @@ module Ameba::Rule::Performance
# ``` # ```
class MapInsteadOfBlock < Base class MapInsteadOfBlock < Base
properties do properties do
description "Identifies usage of `sum/product` calls that follow `map`." description "Identifies usage of `sum/product` calls that follow `map`"
end end
CALL_NAMES = %w(sum product) CALL_NAMES = %w(sum product)

View file

@ -56,7 +56,7 @@ module Ameba::Rule::Style
properties do properties do
enabled false enabled false
description "Check for conditionals that can be replaced with guard clauses." description "Check for conditionals that can be replaced with guard clauses"
end end
MSG = "Use a guard clause (`%s`) instead of wrapping the " \ MSG = "Use a guard clause (`%s`) instead of wrapping the " \

View file

@ -40,7 +40,7 @@ module Ameba::Rule::Style
# ``` # ```
class IsAFilter < Base class IsAFilter < Base
properties do properties do
description "Identifies usage of `is_a?/nil?` calls within filters." description "Identifies usage of `is_a?/nil?` calls within filters"
filter_names : Array(String) = %w(select reject any? all? none? one?) filter_names : Array(String) = %w(select reject any? all? none? one?)
end end

View file

@ -31,7 +31,7 @@ module Ameba::Rule::Style
include AST::Util include AST::Util
properties do properties do
description "Identifies usage of collapsible single expression blocks." description "Identifies usage of collapsible single expression blocks"
exclude_multiple_line_blocks true exclude_multiple_line_blocks true
exclude_calls_with_block true exclude_calls_with_block true