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

Skip to content

Not in a NOLINT block when using NOLINTBEGIN/NOLINTEND with clang-analyzer rules #298

@yukkit

Description

@yukkit

my code

// NOLINTBEGIN(clang-analyzer-core.uninitialized.UndefReturn)

// static
std::optional<uint32_t> MORConfig::dataFilePathConstantColumnIndex(const ConfigBase &session) {
  return session.get<uint32_t>(MORConfig::kDataFilePathConstantColumnIndex).toStdOptional();
}

// static
std::optional<uint32_t> MORConfig::rowIndexConstantColumnIndex(const ConfigBase &session) {
  return session.get<uint32_t>(MORConfig::kRowIndexConstantColumnIndex).toStdOptional();
}

// NOLINTEND(clang-analyzer-core.uninitialized.UndefReturn)

error message

xxxx.cc:32:  Not in a NOLINT block  [readability/nolint] [5]

cpplint version

# cpplint --version                                            
Cpplint fork (https://github.com/cpplint/cpplint)
cpplint 2.0.0
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions