Skip to content
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

Suppress MISRA C:2012 rule 21.6 for snprintf #877

Merged
merged 15 commits into from
Dec 7, 2023

Conversation

chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Nov 2, 2023

Suppress MISRA rule 21.6 for snprintf

Description

MISRA C:2012 Rule 21.6

The Standard Library input/output functions shall not be used

MISRA deviations

This rule warns about the use of standard library input/output functions as they might have implementation defined or undefined behavior.
The function snprintf is used for convenience only when configUSE_TRACE_FACILITY is set to 1 and configUSE_STATS_FORMATTING_FUNCTIONS is set to greater than 0. Do not consider it to be part of the scheduler.

Suppress in this PR

  • Suppress this deviation with comment

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@chinglee-iot chinglee-iot requested a review from a team as a code owner November 2, 2023 13:02
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (877484c) 93.78% compared to head (10e99cd) 93.78%.

Files Patch % Lines
tasks.c 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #877   +/-   ##
=======================================
  Coverage   93.78%   93.78%           
=======================================
  Files           6        6           
  Lines        3184     3184           
  Branches      885      885           
=======================================
  Hits         2986     2986           
  Misses         91       91           
  Partials      107      107           
Flag Coverage Δ
unittests 93.78% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

MISRA.md Outdated Show resolved Hide resolved
@kar-rahul-aws
Copy link
Member

/bot run formatting

moninom1
moninom1 previously approved these changes Dec 4, 2023
kar-rahul-aws
kar-rahul-aws previously approved these changes Dec 7, 2023
@chinglee-iot chinglee-iot dismissed stale reviews from kar-rahul-aws and moninom1 via 0c42906 December 7, 2023 09:33
Copy link

sonarqubecloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aggarg aggarg merged commit d95b05e into FreeRTOS:main Dec 7, 2023
16 of 17 checks passed
@aggarg aggarg deleted the suppress-misra-21.6 branch December 7, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants