clang-tidy checks for High integrity C++

Would there be any interest in implementing/using clang-tidy checks for high-integrity C++?

http://www.programmingresearch.com/coding-standards/high-integrity-cpp/

This is a set of standard used in some safety-critical systems. Some of the rules look simple enough to implement as clang-tidy checks.

With enough people interested in reviewing patches I can happily make a start and add a new module to clang-tidy.

Regards,

Jon

:

Would there be any interest in implementing/using clang-tidy checks for
high-integrity C++?

http://www.programmingresearch.com/coding-standards/high-integrity-cpp/

This is a set of standard used in some safety-critical systems. Some of
the rules look simple enough to implement as clang-tidy checks.

Can you share the coding standard that is used there?

With enough people interested in reviewing patches I can happily make a
start and add a new module to clang-tidy.

Usually there are a few people reviewing patches quickly. You can always

add me to reviewers.

Piotr

2017-01-23 23:07 GMT+01:00 Jonathan Coe via cfe-dev <
cfe-dev@lists.llvm.org>:

Would there be any interest in implementing/using clang-tidy checks for
high-integrity C++?

http://www.programmingresearch.com/coding-standards/high-integrity-cpp/

This is a set of standard used in some safety-critical systems. Some of
the rules look simple enough to implement as clang-tidy checks.

Can you share the coding standard that is used there?

I did not see any restrictions on distribution of the PDF I got. Please see
attached file.

With enough people interested in reviewing patches I can happily make a

start and add a new module to clang-tidy.

Usually there are a few people reviewing patches quickly. You can always

add me to reviewers.

If you're happy to be a reviewer then I'll get started.

Thanks!

Jon

HIC_Coding_Standard_v4.0.pdf (766 KB)

Thanks,
before working on the patch, I would suggest adding a couple of ideas of checks to bugzilla, so you will be able to gather comments about how hard it might be and if it make sens.

Strong yes here, and might be able to devote some resources to helping with the effort.

-- Ben

> Would there be any interest in implementing/using clang-tidy checks for
high-integrity C++?

Strong yes here, and might be able to devote some resources to helping
with the effort.

Are you interested in High-integrity C++ in particular or safety-critical
checks in general?

High-Integrity C++ in particular. (We’d want to customize the checks, of course, since our coding standard, while based on HIC++, has a few exceptions and differences from the “official” spec.)

– Ben

Strong yes here, and might be able to devote some resources to helping

with the effort.

Are you interested in High-integrity C++ in particular or safety-critical
checks in general?

High-Integrity C++ in particular. (We'd want to customize the checks, of
course, since our coding standard, while based on HIC++, has a few
exceptions and differences from the "official" spec.)

I've asked the owners of High Integrity C++ if we can use the name for a
clang-tidy module. If they are not happy we can call it `safety` or
`safetycritical` instead.

Jonathan Coe wrote “I did not see any restrictions on distribution of the PDF I got”. Just to point out that there is a “Conditions of Use” at the end of the PDF (a rather unusual location). It’s quite liberal:

Conditions of Use

You are free to share (copy, distribute and transmit) this complete work, or parts of this work, subject to

attributing to PRQA as follows, “HIC++ Coding Standard as created by PRQA” (and you must not in any

way suggest that PRQA endorses you or your use of this work).

This is good to see because some other widely-used industry coding standards such as MISRA C require individual or corporate purchase of the documentation (see https://www.misra.org.uk/MISRAHome/MISRAC2012/tabid/196/Default.aspx, for example).

David

Jonathan Coe wrote “I did not see any restrictions on distribution of the PDF I got”. Just to point out that there is a “Conditions of Use” at the end of the PDF (a rather unusual location). It’s quite liberal:

Conditions of Use

You are free to share (copy, distribute and transmit) this complete work, or parts of this work, subject to

attributing to PRQA as follows, “HIC++ Coding Standard as created by PRQA” (and you must not in any

way suggest that PRQA endorses you or your use of this work).

This is good to see because some other widely-used industry coding standards such as MISRA C require individual or corporate purchase of the documentation (see https://www.misra.org.uk/MISRAHome/MISRAC2012/tabid/196/Default.aspx, for example).

David

Initial patch here https://reviews.llvm.org/D29118