[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

Salman Javed via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 28 03:18:20 PDT 2021


salman-javed-nz updated this revision to Diff 375512.
salman-javed-nz marked 4 inline comments as done.
salman-javed-nz retitled this revision from "[clang-tidy] Add support for NOLINTBEGIN ... NOLINTEND comments to suppress clang-tidy warnings over multiple lines" to "[clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments".
salman-javed-nz edited the summary of this revision.
salman-javed-nz added a comment.

Addressing review comments.

`tallyNolintBegins()`:

- Refactor so that the `&List = SuppressionIsSpecific ? SpecificNolintBegins : GlobalNolintBegins` line is not duplicated in 2 places.

`index.rst`:

- Added documentation on the rules regarding proper usage of `NOLINTBEGIN/NOLINTEND`, and the diagnostic that is raised if they aren't followed.

Additional changes:

Phabricator Differential summary:

- Shortened commit title
- Word-wrapped commit message body for readability


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108560/new/

https://reviews.llvm.org/D108560

Files:
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/index.rst
  clang-tools-extra/test/clang-tidy/infrastructure/Inputs/nolintbeginend/error_in_include.inc
  clang-tools-extra/test/clang-tidy/infrastructure/Inputs/nolintbeginend/nolint_in_include.inc
  clang-tools-extra/test/clang-tidy/infrastructure/nolint.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-global-end-specific.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-global.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend.cpp
  clang-tools-extra/test/clang-tidy/infrastructure/nolintnextline.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108560.375512.patch
Type: text/x-patch
Size: 35070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210928/a266cdf5/attachment-0001.bin>


More information about the cfe-commits mailing list