mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
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:
commit
8d4a4dfd7a
12 changed files with 13 additions and 13 deletions
|
@ -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`"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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?"
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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 " \
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue