Thanks to visit codestin.com
Credit goes to github.com

Skip to content

False positive for whitespace/braces with curly #373

@Bouncner

Description

@Bouncner

We use {} initialization all over the place (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list) and get a lot of false positives as shown below (cpplint only complains about the last line with std::optional).

This issue occurred with version 2.0.2.

src/benchmarklib/tpcds/tpcds_table_generator.cpp:200:  Missing space before {  [whitespace/braces] [5]
Category 'whitespace/braces' errors found: 1
std::optional<pmr_string> resolve_street_name(int column_id, const ds_addr_t& address) {
  return nullCheck(column_id) != 0 ? std::nullopt
         : address.street_name2 == nullptr
             ? std::optional{pmr_string{address.street_name1}}
             : std::optional{pmr_string{address.street_name1} + " " + address.street_name2};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions