Skip to content

Update AUTOSAR reference #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ _Carnegie Mellon and CERT are registered trademarks of Carnegie Mellon Universit
This repository contains CodeQL queries and libraries which support various Coding Standards for the [C++14](https://www.iso.org/standard/64029.html) programming language.

The following coding standards are supported:
- [AUTOSAR - Guidelines for the use of C++14 language in critical and safety-related systems Release 20-11](https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf)
- [MISRA C++:2008](https://www.misra.org.uk) (support limited to the rules specified in AUTOSAR 20-11).
- [AUTOSAR - Guidelines for the use of C++14 language in critical and safety-related systems Release 19-11, 20-11 and 21-11](https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf)
- [MISRA C++:2008](https://www.misra.org.uk) (support limited to the rules specified in AUTOSAR).
- [SEI CERT C++ Coding Standard: Rules for Developing Safe, Reliable, and Secure Systems (2016 Edition)](https://resources.sei.cmu.edu/library/asset-view.cfm?assetID=494932)

In addition, the following Coding Standards for the C programming language are under development:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/codeql-suites/autosar-advisory.qls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- description: AUTOSAR C++14 Guidelines 20-11 (Advisory)
- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Advisory)
- qlpack: codeql/autosar-cpp-coding-standards
- include:
kind:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/codeql-suites/autosar-audit.qls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- description: AUTOSAR C++14 Guidelines 20-11 (Audit)
- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Audit)
- qlpack: codeql/autosar-cpp-coding-standards
- include:
kind:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/codeql-suites/autosar-default.qls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- description: AUTOSAR C++14 Guidelines 20-11 (Default)
- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Default)
- qlpack: codeql/autosar-cpp-coding-standards
- include:
kind:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/codeql-suites/autosar-required.qls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- description: AUTOSAR C++14 Guidelines 20-11 (Required)
- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Required)
- qlpack: codeql/autosar-cpp-coding-standards
- include:
kind:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- description: AUTOSAR C++14 Guidelines 20-11 (Single Translation Unit)
- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Single Translation Unit)
- qlpack: codeql/autosar-cpp-coding-standards
- include:
kind:
Expand Down
2 changes: 1 addition & 1 deletion cpp/autosar/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: codeql/autosar-cpp-coding-standards
version: 2.18.0-dev
description: AUTOSAR C++14 Guidelines 20-11
description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11
suites: codeql-suites
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion docs/development_handbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A _coding standard_ is a set of rules or guidelines which restrict or prohibit t

| Standard | Version | Total rules | Total supportable rules | Status | Notes |
| -------------------------------------------------------------------------------------------------------------------- | ------- | ----------- | ----------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf) | 20-11 | 397 | 375 | Implemented |
| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R19-11 R20-11 R21-11 | 397 | 375 | Implemented |
| [CERT-C++](https://resources.sei.cmu.edu/downloads/secure-coding/assets/sei-cert-cpp-coding-standard-2016-v01.pdf) | 2016 | 83 | 83 | Implemented | AUTOSAR includes a sub-set of rules take from MISRA C++ 2008, which can be purchased for a small fee from [the MISRA website](https://misra.org.uk/shop). |
| [CERT-C](https://resources.sei.cmu.edu/downloads/secure-coding/assets/sei-cert-c-coding-standard-2016-v01.pdf) | 2016 | 120 | 99 | In development | The implementation excludes rules not part of 2016, but that are added to the [CERT-C wiki](https://wiki.sei.cmu.edu/confluence/display/c/) |
| [MISRA C](https://www.misra.org.uk/product/misra-c2012-third-edition-first-revision/ ) | 2012 | 172 | 172 | In development | This includes the [MISRA C:2012 Amendment 2](https://www.misra.org.uk/app/uploads/2021/06/MISRA-C-2012-AMD2.pdf) |
Expand Down
2 changes: 1 addition & 1 deletion docs/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The _CodeQL Coding Standards_ product is a set of CodeQL queries for identifying

| Standard | Version | Total rules | Total supportable rules | Status |
| -------------------------------------------------------------------------------------------------------------------- | ------- | ----------- | ----------------------- | ----------------- |
| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf) | 20-11 | 397 | 375 | Implemented |
| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R19-11 R20-11 R21-11 | 397 | 375 | Implemented |
| [CERT-C++](https://resources.sei.cmu.edu/downloads/secure-coding/assets/sei-cert-cpp-coding-standard-2016-v01.pdf) | 2016 | 83 | 83 | Implemented |
| [CERT C](https://resources.sei.cmu.edu/downloads/secure-coding/assets/sei-cert-c-coding-standard-2016-v01.pdf) | 2016 | 99 | 99 | Under development |
| [MISRA C](https://www.misra.org.uk/product/misra-c2012-third-edition-first-revision/) | 2012 | 172 | 169 | Under development |
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_rules/generate_package_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"AUTOSAR" : {
"standard_title" : "AUTOSAR: Guidelines for the use of the C++14 language in critical and safety-related systems",
"standard_url" : "https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf"
"standard_url" : "https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf"
},
"CERT-C" : {
"standard_title" : "CERT-C",
Expand Down Expand Up @@ -368,7 +368,7 @@ def generate_package_files(package_name: str) -> None:
query["standard_title"] = "AUTOSAR: Guidelines for the use of the C++14 language in critical and safety-related systems"
query[
"standard_url"
] = "https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf"
] = "https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf"

help_dir = None
if standard_name in external_help_file_standards:
Expand Down
2 changes: 1 addition & 1 deletion scripts/reports/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def generate_guideline_compliance_summary(output_directory, results_summary):
print(
"**Result**: " + ("Not compliant" if total_guidelines_violated > 0 else "Compliant"))
standard_pretty_name = {
"cert": "CERT C++ 2016", "autosar": "AUTOSAR C++ 20-11"}
"cert": "CERT C++ 2016", "autosar": "AUTOSAR C++ R19-11, R20-11 and R21-11"}
print("**Coding Standards applied**: " + ", ".join([standard_pretty_name[standard_short_name]
for standard_short_name in results_summary.guideline_violation_count.keys()]))

Expand Down