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 | ||||
|     properties do | ||||
|       description "Disallows the usage of the same name as outer local variables" \ | ||||
|                   " for block or proc arguments." | ||||
|       description "Disallows the usage of the same name as outer local variables " \ | ||||
|                   "for block or proc arguments" | ||||
|     end | ||||
| 
 | ||||
|     MSG = "Shadowing outer local variable `%s`" | ||||
|  |  | |||
|  | @ -51,7 +51,7 @@ module Ameba::Rule::Lint | |||
|   # ``` | ||||
|   class SharedVarInFiber < Base | ||||
|     properties do | ||||
|       description "Disallows shared variables in fibers." | ||||
|       description "Disallows shared variables in fibers" | ||||
|     end | ||||
| 
 | ||||
|     MSG = "Shared variable `%s` is used in fiber" | ||||
|  |  | |||
|  | @ -28,7 +28,7 @@ module Ameba::Rule::Performance | |||
|   # ``` | ||||
|   class AnyAfterFilter < Base | ||||
|     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) | ||||
|     end | ||||
| 
 | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ module Ameba::Rule::Performance | |||
|     include AST::Util | ||||
| 
 | ||||
|     properties do | ||||
|       description "Identifies usage of arg-less `any?` calls." | ||||
|       description "Identifies usage of arg-less `any?` calls" | ||||
|     end | ||||
| 
 | ||||
|     ANY_NAME = "any?" | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ module Ameba::Rule::Performance | |||
|     include AST::Util | ||||
| 
 | ||||
|     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` | ||||
|       # and are not modifying the receiver type (like `compact` does), | ||||
|  |  | |||
|  | @ -23,7 +23,7 @@ module Ameba::Rule::Performance | |||
|   # ``` | ||||
|   class CompactAfterMap < Base | ||||
|     properties do | ||||
|       description "Identifies usage of `compact` calls that follow `map`." | ||||
|       description "Identifies usage of `compact` calls that follow `map`" | ||||
|     end | ||||
| 
 | ||||
|     COMPACT_NAME = "compact" | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ module Ameba::Rule::Performance | |||
|   # ``` | ||||
|   class FirstLastAfterFilter < Base | ||||
|     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) | ||||
|     end | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,7 +23,7 @@ module Ameba::Rule::Performance | |||
|   # ``` | ||||
|   class FlattenAfterMap < Base | ||||
|     properties do | ||||
|       description "Identifies usage of `flatten` calls that follow `map`." | ||||
|       description "Identifies usage of `flatten` calls that follow `map`" | ||||
|     end | ||||
| 
 | ||||
|     FLATTEN_NAME = "flatten" | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ module Ameba::Rule::Performance | |||
|   # ``` | ||||
|   class MapInsteadOfBlock < Base | ||||
|     properties do | ||||
|       description "Identifies usage of `sum/product` calls that follow `map`." | ||||
|       description "Identifies usage of `sum/product` calls that follow `map`" | ||||
|     end | ||||
| 
 | ||||
|     CALL_NAMES = %w(sum product) | ||||
|  |  | |||
|  | @ -56,7 +56,7 @@ module Ameba::Rule::Style | |||
| 
 | ||||
|     properties do | ||||
|       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 | ||||
| 
 | ||||
|     MSG = "Use a guard clause (`%s`) instead of wrapping the " \ | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ module Ameba::Rule::Style | |||
|   # ``` | ||||
|   class IsAFilter < Base | ||||
|     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?) | ||||
|     end | ||||
| 
 | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ module Ameba::Rule::Style | |||
|     include AST::Util | ||||
| 
 | ||||
|     properties do | ||||
|       description "Identifies usage of collapsible single expression blocks." | ||||
|       description "Identifies usage of collapsible single expression blocks" | ||||
| 
 | ||||
|       exclude_multiple_line_blocks true | ||||
|       exclude_calls_with_block true | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue