Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no_successive_maps doesn't work when nested #339

Open
rlipscombe opened this issue Apr 3, 2024 · 0 comments
Open

no_successive_maps doesn't work when nested #339

rlipscombe opened this issue Apr 3, 2024 · 0 comments
Labels
Milestone

Comments

@rlipscombe
Copy link

Bug Description

The no_successive_maps rule (see #157 and #255) doesn't warn when using nested maps.

To Reproduce

This triggers the warning:

_ = [
    #{a => b, c => d},
    #{a => b, c => d} % elvis: Found map update after map construction/update
    #{a => b, c => d},
    #{a => b, c => d}
],

This doesn't:

_ = #{
    x => [
        #{a => b, c => d},
        #{a => b, c => d} % expected a warning here; didn't get one
        #{a => b, c => d},
        #{a => b, c => d}
    ]
},

Additional Context

  • OS: macOS
  • Erlang/OTP 26.2.1
  • erlang.mk; see below
BUILD_DEPS = elvis_mk
DEP_PLUGINS = elvis_mk
ELVIS_VERSION = 3.0.1
dep_elvis_mk = git https://github.com/inaka/elvis.mk.git
@rlipscombe rlipscombe added the bug label Apr 3, 2024
@elbrujohalcon elbrujohalcon added this to the 4.0.0 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants