Enable `Lint/EmptyWhen` cop and correct offense
This commit is contained in:
		
							parent
							
								
									5db56efe42
								
							
						
					
					
						commit
						17c8d15b14
					
				|  | @ -572,6 +572,10 @@ Lint/ElseLayout: | ||||||
| Lint/EmptyEnsure: | Lint/EmptyEnsure: | ||||||
|   Enabled: true |   Enabled: true | ||||||
| 
 | 
 | ||||||
|  | # Checks for the presence of `when` branches without a body. | ||||||
|  | Lint/EmptyWhen: | ||||||
|  |   Enabled: true | ||||||
|  | 
 | ||||||
| # Align ends correctly. | # Align ends correctly. | ||||||
| Lint/EndAlignment: | Lint/EndAlignment: | ||||||
|   Enabled: true |   Enabled: true | ||||||
|  |  | ||||||
|  | @ -21,10 +21,6 @@ Lint/AmbiguousRegexpLiteral: | ||||||
| Lint/AssignmentInCondition: | Lint/AssignmentInCondition: | ||||||
|   Enabled: false |   Enabled: false | ||||||
| 
 | 
 | ||||||
| # Offense count: 1 |  | ||||||
| Lint/EmptyWhen: |  | ||||||
|   Enabled: false |  | ||||||
| 
 |  | ||||||
| # Offense count: 20 | # Offense count: 20 | ||||||
| Lint/HandleExceptions: | Lint/HandleExceptions: | ||||||
|   Enabled: false |   Enabled: false | ||||||
|  |  | ||||||
|  | @ -45,7 +45,7 @@ module Gitlab | ||||||
|               line_new += 1 |               line_new += 1 | ||||||
|             when "-" |             when "-" | ||||||
|               line_old += 1 |               line_old += 1 | ||||||
|             when "\\" |             when "\\" # rubocop:disable Lint/EmptyWhen | ||||||
|               # No increment |               # No increment | ||||||
|             else |             else | ||||||
|               line_new += 1 |               line_new += 1 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue