Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Options
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EugeneZelenko should other single ticks also be replaced by double ticks?
For reference, generated HTML: https://clang.llvm.org/extra/clang-tidy/checks/performance/for-range-copy.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single back-ticks are for option names and values. Double back-ticks for language constructs. Since Ref, ref, etc. refers to types, double-ticks should be used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍 @vbvictor Can you please also make this change?

Copy link
Contributor Author

@vbvictor vbvictor Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicovank, yes, I can make this change.
As far as I understand only Ref, ref, Reference and reference should be changed but not [Rr]ef(erence)?$.
It got a little tricky for me since Ref only refers to a suffix of a potential c++ type, so it doesn't fall into the double back-ticks category.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it also makes sense to double tick the regex (so everything here). Probably slightly easier on the eyes as a code block when generated than an italicized string.,

Copy link
Contributor Author

@vbvictor vbvictor Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected to double-ticks plus found and fixed one more file with same errors: clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst.

is empty. If a name in the list contains the sequence `::` it is matched
against the qualified typename (i.e. `namespace::Type`, otherwise it is
against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Options
copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
is empty. If a name in the list contains the sequence `::` it is matched
against the qualified typename (i.e. `namespace::Type`, otherwise it is
against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).

.. option:: ExcludedContainerTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ Options
Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type
with suffix `Ref`, `ref`, `Reference` and `reference`. The default is
empty. If a name in the list contains the sequence `::` it is matched against
the qualified typename (i.e. `namespace::Type`, otherwise it is matched
the qualified typename (i.e. `namespace::Type`), otherwise it is matched
against only the type name (i.e. `Type`).
Loading