haml-lint
haml-lint copied to clipboard
Style/IdenticalConditionalBranches false positive
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]