Skip to content

Commit

Permalink
[clang-tidy][NFC][DOC] Add missing HICPP rule id's (#72553)
Browse files Browse the repository at this point in the history
Add HICPP rule identities to the documentation for
`hicpp-avoid-c-arrays` and `hicpp-no-assembler`.

Includes an update of `hicpp-avoid-goto` to look like other aliased
checks.

References:
* avoid-c-arrays 
  Commit: 2634bd5
  • Loading branch information
bjosv committed Nov 17, 2023
1 parent bd934fc commit 12bdbe2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ hicpp-avoid-c-arrays
The hicpp-avoid-c-arrays check is an alias, please see
:doc:`modernize-avoid-c-arrays <../modernize/avoid-c-arrays>`
for more information.
It partly enforces the `rule 4.1.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/standard-conversions>`_.
11 changes: 4 additions & 7 deletions clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
hicpp-avoid-goto
================

The `hicpp-avoid-goto` check is an alias to
:doc:`cppcoreguidelines-avoid-goto <../cppcoreguidelines/avoid-goto>`.
Rule `6.3.1 High Integrity C++ <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/statements>`_
requires that ``goto`` only skips parts of a block and is not used for other
reasons.

Both coding guidelines implement the same exception to the usage of ``goto``.
The `hicpp-avoid-goto` check is an alias, please see
:doc:`cppcoreguidelines-avoid-goto <../cppcoreguidelines/avoid-goto>`
for more information.
It enforces the `rule 6.3.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/statements>`_.
10 changes: 5 additions & 5 deletions clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. title:: clang-tidy - hicpp-no-assembler

hicpp-no-assembler
===================
==================

Check for assembler statements. No fix is offered.
Checks for assembler statements. Use of inline assembly should be avoided since
it restricts the portability of the code.

Inline assembler is forbidden by the `High Integrity C++ Coding Standard
<https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/declarations>`_
as it restricts the portability of code.
This enforces `rule 7.5.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/declarations>`_
of the High Integrity C++ Coding Standard.

0 comments on commit 12bdbe2

Please sign in to comment.