From 00a858c559478c7d7276b385030a7dde03fc3f54 Mon Sep 17 00:00:00 2001 From: Archit Aggarwal Date: Tue, 20 Jul 2021 01:26:14 +0000 Subject: [PATCH] Add MISRA.md and CHANGELOG.md files; minor update in README.md --- CHANGELOG.md | 7 +++++++ MISRA.md | 22 ++++++++++++++++++++++ README.md | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md create mode 100644 MISRA.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..623ce14 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog for coreSNTP Library + +## v1.0.0 (July 2021) + +This is the first release of an coreSNTP client library in this repository. + +This library implements an SNTP client for the [SNTPv4 specification](https://tools.ietf.org/html/rfc4330). It is optimized for resource-constrained devices, and does not allocate any memory. diff --git a/MISRA.md b/MISRA.md new file mode 100644 index 0000000..8e950e4 --- /dev/null +++ b/MISRA.md @@ -0,0 +1,22 @@ +# MISRA Compliance + +The coreSNTP library files conform to the [MISRA C:2012](https://www.misra.org.uk) +guidelines, with some noted exceptions. Compliance is checked with Coverity static analysis. +Deviations from the MISRA standard are listed below: + +### Ignored by [Coverity Configuration](https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/tools/coverity/misra.config) +| Deviation | Category | Justification | +| :-: | :-: | :-: | +| Directive 4.9 | Advisory | Allow inclusion of function like macros. The `assert` macro is used throughout the library for parameter validation, and logging is done using function like macros. | +| Rule 2.4 | Advisory | Allow unused tags. Some compilers warn if types are not tagged. | +| Rule 2.5 | Advisory | Allow unused macros. Library headers may define macros intended for the application's use, but are not used by a specific file. | +| Rule 3.1 | Required | Allow nested comments. C++ style `//` comments are used in example code within Doxygen documentation blocks. | +| Rule 11.5 | Advisory | Allow casts from `void *`. The library casts the byte array information received network to a `SntpPacket_t *` for parsing SNTP packet. | + +### Flagged by Coverity +| Deviation | Category | Justification | +| :-: | :-: | :-: | +| Rule 8.7 | Advisory | API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application. | + +### Suppressed with Coverity Comments +*None.* diff --git a/README.md b/README.md index b44d77b..4148248 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This repository contains the coreSNTP library, a client library to use Simple Ne An SNTP client can request time from both NTP and SNTP servers. According to the SNTPv4 specification, "_To an NTP or SNTP server, NTP and SNTP clients are indistinguishable; to an NTP or SNTP client, NTP and SNTP servers are indistinguishable._", thereby, allowing SNTP clients to request time from NTP servers. -This library has gone through code quality checks including verification that no function has a [GNU Complexity](https://www.gnu.org/software/complexity/manual/complexity.html) score over 8, and checks against deviations from mandatory rules in the [MISRA coding standard](https://www.misra.org.uk). This library has also undergone both static code analysis from [Coverity static analysis](https://scan.coverity.com/), and validation of memory safety through the [CBMC automated reasoning tool](https://www.cprover.org/cbmc/). +This library has gone through code quality checks including verification that no function has a [GNU Complexity](https://www.gnu.org/software/complexity/manual/complexity.html) score over 8, and checks against deviations from mandatory rules in the [MISRA coding standard](https://www.misra.org.uk). Deviations from the MISRA C:2012 guidelines are documented under [MISRA Deviations](MISRA.md). This library has also undergone both static code analysis from [Coverity static analysis](https://scan.coverity.com/), and validation of memory safety through the [CBMC automated reasoning tool](https://www.cprover.org/cbmc/). ## Cloning this repository This repo uses [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to bring in dependent components.