haml-lint icon indicating copy to clipboard operation
haml-lint copied to clipboard

Style/IdenticalConditionalBranches false positive

Open tagliala opened this issue 1 year ago • 0 comments

Based on #107

- if foo
  %div{ data: somedata }
    A
- else
  %span{ data: somedata }
    B

Expected

No lints detected

Actual

test.haml:2 [W] RuboCop: Style/IdenticalConditionalBranches: Move `{}.merge(data: somedata)` out of the conditional.
test.haml:5 [W] RuboCop: Style/IdenticalConditionalBranches: Move `{}.merge(data: somedata)` out of the conditional.

1 file inspected, 2 lints detected

Versions

$ haml-lint -v
haml-lint 0.42.0

$ rubocop -V
1.37.1 (using Parser 3.1.2.1, rubocop-ast 1.23.0, running on ruby 3.0.4) [x86_64-darwin22]

tagliala avatar Oct 27 '22 09:10 tagliala