Skip to content

[whitespace/newline] false positive with predicate #410

Description

@targos

Examples:

    if (std::ranges::all_of(ipv6, [](auto b) { return b == 0; })) {
      return false;
    }

https://github.com/nodejs/node/blob/6706b22e350490d3e8e697377b5f388df9305aa0/src/inspector_socket.cc#L209-L211

  if (std::visit([](auto* ptr) { return ptr != nullptr; }, resource)) {
    native_execution_async_resources_.resize(offset + 1);
    // Caveat: This is a v8::Local<>* assignment, we do not keep a v8::Global<>!
    native_execution_async_resources_[offset] = resource;
  }

https://github.com/nodejs/node/blob/6706b22e350490d3e8e697377b5f388df9305aa0/src/env.cc#L153-L157

src/env.cc:153: Controlled statements inside brackets of if clause should be on a separate line [whitespace/newline] [5]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions