From abb1a1421d0891da7913e26acb0567ea963dc0c4 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 20:06:00 +0200 Subject: [PATCH 01/11] Update AUTOSAR reference - Fix PDF link - Drop version distinctions (no changes since 19-03 ) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5a13c696f..062a128231 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _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) +- [AUTOSAR - Guidelines for the use of C++14 language in critical and safety-related systems](https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) - [MISRA C++:2008](https://www.misra.org.uk) (support limited to the rules specified in AUTOSAR 20-11). - [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) From 4731bf02d46d1024bc3503bdc19c90de5f6f888e Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 20:09:41 +0200 Subject: [PATCH 02/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 062a128231..e327bb11ea 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _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](https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) +- [AUTOSAR - Guidelines for the use of C++14 language in critical and safety-related systems](https://www.autosar.org/fileadmin/standards/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) - [MISRA C++:2008](https://www.misra.org.uk) (support limited to the rules specified in AUTOSAR 20-11). - [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) From 50100ec3c29ff86e7e1384200ce777e28146d919 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 20:12:06 +0200 Subject: [PATCH 03/11] Update development_handbook.md --- docs/development_handbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development_handbook.md b/docs/development_handbook.md index 1d1a9a0584..f7f1cdf5d4 100644 --- a/docs/development_handbook.md +++ b/docs/development_handbook.md @@ -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/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | 20-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) | From d66f2c93677938678caaa709d5ee6e0f012dd2ed Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 20:12:50 +0200 Subject: [PATCH 04/11] Update generate_package_files.py --- scripts/generate_rules/generate_package_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_rules/generate_package_files.py b/scripts/generate_rules/generate_package_files.py index daca3cebd1..eb5e90349c 100644 --- a/scripts/generate_rules/generate_package_files.py +++ b/scripts/generate_rules/generate_package_files.py @@ -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/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" }, "CERT-C" : { "standard_title" : "CERT-C", From b763d6e34653173085a6d45ce736eecc933749eb Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 20:16:25 +0200 Subject: [PATCH 05/11] Update user_manual.md --- docs/user_manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_manual.md b/docs/user_manual.md index fec4b6f00a..b634b0a185 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -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/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | 20-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 | From 2a134948064472b4191fa8c5d69bb5cb97ffea95 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 21:43:07 +0200 Subject: [PATCH 06/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e327bb11ea..8467295a23 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _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](https://www.autosar.org/fileadmin/standards/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) +- [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/R20-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) - [MISRA C++:2008](https://www.misra.org.uk) (support limited to the rules specified in AUTOSAR 20-11). - [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) From c5e9e0c3dc91aae70a84636db378de822bbc5fff Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 21:51:53 +0200 Subject: [PATCH 07/11] Add AUTOSAR release numbers --- README.md | 4 ++-- cpp/autosar/src/codeql-suites/autosar-advisory.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-audit.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-default.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-required.qls | 2 +- .../src/codeql-suites/autosar-single-translation-unit.qls | 2 +- cpp/autosar/src/qlpack.yml | 2 +- docs/development_handbook.md | 2 +- docs/user_manual.md | 2 +- scripts/generate_rules/generate_package_files.py | 4 ++-- scripts/reports/utils.py | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8467295a23..82196e835b 100644 --- a/README.md +++ b/README.md @@ -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 19-11, 20-11 and 21-11](https://www.autosar.org/fileadmin/standards/R20-11/AP/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: diff --git a/cpp/autosar/src/codeql-suites/autosar-advisory.qls b/cpp/autosar/src/codeql-suites/autosar-advisory.qls index 6460375091..9098a4d26d 100644 --- a/cpp/autosar/src/codeql-suites/autosar-advisory.qls +++ b/cpp/autosar/src/codeql-suites/autosar-advisory.qls @@ -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: diff --git a/cpp/autosar/src/codeql-suites/autosar-audit.qls b/cpp/autosar/src/codeql-suites/autosar-audit.qls index 25f4f1c41c..847fb4448f 100644 --- a/cpp/autosar/src/codeql-suites/autosar-audit.qls +++ b/cpp/autosar/src/codeql-suites/autosar-audit.qls @@ -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: diff --git a/cpp/autosar/src/codeql-suites/autosar-default.qls b/cpp/autosar/src/codeql-suites/autosar-default.qls index e57d0739d6..53c94ecfb6 100644 --- a/cpp/autosar/src/codeql-suites/autosar-default.qls +++ b/cpp/autosar/src/codeql-suites/autosar-default.qls @@ -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: diff --git a/cpp/autosar/src/codeql-suites/autosar-required.qls b/cpp/autosar/src/codeql-suites/autosar-required.qls index aa4173462c..00f788f83e 100644 --- a/cpp/autosar/src/codeql-suites/autosar-required.qls +++ b/cpp/autosar/src/codeql-suites/autosar-required.qls @@ -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: diff --git a/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls b/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls index d56a7e306a..7951257abf 100644 --- a/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls +++ b/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls @@ -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: diff --git a/cpp/autosar/src/qlpack.yml b/cpp/autosar/src/qlpack.yml index 1bbc00cb88..8178f69600 100644 --- a/cpp/autosar/src/qlpack.yml +++ b/cpp/autosar/src/qlpack.yml @@ -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: diff --git a/docs/development_handbook.md b/docs/development_handbook.md index f7f1cdf5d4..981356433e 100644 --- a/docs/development_handbook.md +++ b/docs/development_handbook.md @@ -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/R20-11/AP/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) | diff --git a/docs/user_manual.md b/docs/user_manual.md index b634b0a185..3c704be7ec 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -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/R20-11/AP/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 | diff --git a/scripts/generate_rules/generate_package_files.py b/scripts/generate_rules/generate_package_files.py index eb5e90349c..dca1654d18 100644 --- a/scripts/generate_rules/generate_package_files.py +++ b/scripts/generate_rules/generate_package_files.py @@ -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/R20-11/AP/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", @@ -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/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" help_dir = None if standard_name in external_help_file_standards: diff --git a/scripts/reports/utils.py b/scripts/reports/utils.py index 4fae73d564..6f1576b715 100644 --- a/scripts/reports/utils.py +++ b/scripts/reports/utils.py @@ -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()])) From b45c769d0d6fb4a3a8dc2288c831fa3939aed9e6 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 26 Apr 2023 21:54:40 +0200 Subject: [PATCH 08/11] update autosar link --- scripts/generate_rules/generate_package_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_rules/generate_package_files.py b/scripts/generate_rules/generate_package_files.py index dca1654d18..c7ad3b51d4 100644 --- a/scripts/generate_rules/generate_package_files.py +++ b/scripts/generate_rules/generate_package_files.py @@ -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/R22-11/AP/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: From 32c8c4d5a7b3c98078fe27e1ce6ff024962f5878 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Fri, 28 Apr 2023 15:45:29 +0200 Subject: [PATCH 09/11] Accept the review suggestions and updates links --- README.md | 2 +- cpp/autosar/src/codeql-suites/autosar-advisory.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-audit.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-default.qls | 2 +- cpp/autosar/src/codeql-suites/autosar-required.qls | 2 +- .../src/codeql-suites/autosar-single-translation-unit.qls | 2 +- cpp/autosar/src/qlpack.yml | 2 +- docs/development_handbook.md | 2 +- docs/user_manual.md | 2 +- scripts/generate_rules/generate_package_files.py | 2 +- scripts/reports/utils.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 82196e835b..375b7668b3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _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 19-11, 20-11 and 21-11](https://www.autosar.org/fileadmin/standards/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) +- [AUTOSAR - Guidelines for the use of C++14 language in critical and safety-related systems (Releases R22-11, R20-11, R19-11 and R19-03)](https://www.autosar.org/fileadmin/standards/R22-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) diff --git a/cpp/autosar/src/codeql-suites/autosar-advisory.qls b/cpp/autosar/src/codeql-suites/autosar-advisory.qls index 9098a4d26d..ff5a0e3358 100644 --- a/cpp/autosar/src/codeql-suites/autosar-advisory.qls +++ b/cpp/autosar/src/codeql-suites/autosar-advisory.qls @@ -1,4 +1,4 @@ -- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Advisory) +- description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 (Advisory) - qlpack: codeql/autosar-cpp-coding-standards - include: kind: diff --git a/cpp/autosar/src/codeql-suites/autosar-audit.qls b/cpp/autosar/src/codeql-suites/autosar-audit.qls index 847fb4448f..dec5f4f160 100644 --- a/cpp/autosar/src/codeql-suites/autosar-audit.qls +++ b/cpp/autosar/src/codeql-suites/autosar-audit.qls @@ -1,4 +1,4 @@ -- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Audit) +- description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 (Audit) - qlpack: codeql/autosar-cpp-coding-standards - include: kind: diff --git a/cpp/autosar/src/codeql-suites/autosar-default.qls b/cpp/autosar/src/codeql-suites/autosar-default.qls index 53c94ecfb6..5d45fa2774 100644 --- a/cpp/autosar/src/codeql-suites/autosar-default.qls +++ b/cpp/autosar/src/codeql-suites/autosar-default.qls @@ -1,4 +1,4 @@ -- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Default) +- description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 (Default) - qlpack: codeql/autosar-cpp-coding-standards - include: kind: diff --git a/cpp/autosar/src/codeql-suites/autosar-required.qls b/cpp/autosar/src/codeql-suites/autosar-required.qls index 00f788f83e..7c92e36dee 100644 --- a/cpp/autosar/src/codeql-suites/autosar-required.qls +++ b/cpp/autosar/src/codeql-suites/autosar-required.qls @@ -1,4 +1,4 @@ -- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Required) +- description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 (Required) - qlpack: codeql/autosar-cpp-coding-standards - include: kind: diff --git a/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls b/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls index 7951257abf..cf5434c2d8 100644 --- a/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls +++ b/cpp/autosar/src/codeql-suites/autosar-single-translation-unit.qls @@ -1,4 +1,4 @@ -- description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 (Single Translation Unit) +- description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 (Single Translation Unit) - qlpack: codeql/autosar-cpp-coding-standards - include: kind: diff --git a/cpp/autosar/src/qlpack.yml b/cpp/autosar/src/qlpack.yml index 8178f69600..1b1e2b316d 100644 --- a/cpp/autosar/src/qlpack.yml +++ b/cpp/autosar/src/qlpack.yml @@ -1,6 +1,6 @@ name: codeql/autosar-cpp-coding-standards version: 2.18.0-dev -description: AUTOSAR C++14 Guidelines R19-11, R20-11 and R21-11 +description: AUTOSAR C++14 Guidelines R22-11, R21-11, R20-11, R19-11 and R19-03 suites: codeql-suites license: MIT dependencies: diff --git a/docs/development_handbook.md b/docs/development_handbook.md index 981356433e..b53719c493 100644 --- a/docs/development_handbook.md +++ b/docs/development_handbook.md @@ -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/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R19-11 R20-11 R21-11 | 397 | 375 | Implemented | +| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R22-11, R21-11, R20-11, R19-11, R19-03 | 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) | diff --git a/docs/user_manual.md b/docs/user_manual.md index 3c704be7ec..f1bbfad49a 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -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/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R19-11 R20-11 R21-11 | 397 | 375 | Implemented | +| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R22-11, R21-11, R20-11, R19-11, R19-03 | 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 | diff --git a/scripts/generate_rules/generate_package_files.py b/scripts/generate_rules/generate_package_files.py index c7ad3b51d4..a3462515d6 100644 --- a/scripts/generate_rules/generate_package_files.py +++ b/scripts/generate_rules/generate_package_files.py @@ -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/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" + "standard_url" : "https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" }, "CERT-C" : { "standard_title" : "CERT-C", diff --git a/scripts/reports/utils.py b/scripts/reports/utils.py index 6f1576b715..977826891c 100644 --- a/scripts/reports/utils.py +++ b/scripts/reports/utils.py @@ -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++ R19-11, R20-11 and R21-11"} + "cert": "CERT C++ 2016", "autosar": "AUTOSAR C++ R22-11, R21-11, R20-11, R19-11 and R19-03"} print("**Coding Standards applied**: " + ", ".join([standard_pretty_name[standard_short_name] for standard_short_name in results_summary.guideline_violation_count.keys()])) From 925f1881cd9a6a1272a76b89bb4ff077d42688c2 Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 24 May 2023 13:04:27 +0200 Subject: [PATCH 10/11] Update scripts/generate_rules/generate_package_files.py Co-authored-by: Luke Cartey <5377966+lcartey@users.noreply.github.com> --- scripts/generate_rules/generate_package_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_rules/generate_package_files.py b/scripts/generate_rules/generate_package_files.py index a3462515d6..6c46d8b67e 100644 --- a/scripts/generate_rules/generate_package_files.py +++ b/scripts/generate_rules/generate_package_files.py @@ -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/R21-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" + ] = "https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf" help_dir = None if standard_name in external_help_file_standards: From 6eb8c3f7d402794e20ee3b4655dcdb2d715858df Mon Sep 17 00:00:00 2001 From: Mauro Baluda Date: Wed, 24 May 2023 13:21:09 +0200 Subject: [PATCH 11/11] Update user_manual.md --- docs/user_manual.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/user_manual.md b/docs/user_manual.md index f1bbfad49a..3fa513f879 100644 --- a/docs/user_manual.md +++ b/docs/user_manual.md @@ -20,6 +20,7 @@ | 0.12.0 | 2022-10-21 | Luke Cartey | Updated version to 2.10.0 | | 0.13.0 | 2022-11-03 | Remco Vermeulen | Add missing deviation analysis report tables to section 'Producing an analysis report'. | | 0.14.0 | 2022-11-03 | Remco Vermeulen | Add guideline recategorization plan. | +| 0.15.0 | 2023-05-24 | Mauro Baluda | Clarify AUTOSAR C++ supported versions. | ## Release information @@ -47,7 +48,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/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | R22-11, R21-11, R20-11, R19-11, R19-03 | 397 | 375 | Implemented | +| [AUTOSAR C++](https://www.autosar.org/fileadmin/standards/R22-11/AP/AUTOSAR_RS_CPP14Guidelines.pdf) | [^1] R22-11, R21-11, R20-11, R19-11, R19-03 | 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 | @@ -62,6 +63,8 @@ Each supported rule is implemented as one or more CodeQL queries, with each quer The datasheet _"CodeQL Coding Standards: supported rules"_, provided with each release, lists which rules are supported for that particular release, and the _scope of analysis_ for that rule. +[^1]: AUTOSAR C++ versions R22-11, R21-11, R20-11, R19-11 and R19-03 are all identical as indicated in the document change history. + ## Supported environment This section describes the supported environment for the product.