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

Fix #607, rework static-analysis workflow #608

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Nov 2, 2022

Checklist (Please check before submitting)

Describe the contribution
Updates the static analysis workflow:

  • Make it work with the latest Ubuntu and Cppcheck
  • Allow callers to pass in a project configuration to get "real" macro definitions and include paths
  • Streamlined - only generate XML outputs, then use XSLT to convert that to text, rather than running the tool twice.
  • Streamlined - merge the two XML outputs into one, before converting to sarif and uploading
  • Streamlined - Call the sarif conversion tool directly, rather than going through a 3rd party action.

Fixes #607

Testing performed
Update OSAL static analysis to point to this updated reusable workflow instead of the current one (nasa/cFS main) and check results.

Expected behavior changes
More complete/thorough results, while being a simpler workflow overall

System(s) tested on
Github workflow runner (Ubuntu image)

Additional context
This uses the updated baseline, and the cppcheck tool reports more errors than the old version did. So repos that referred to this workflow in the past may have new errors now.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey force-pushed the fix-607-static-analysis branch 2 times, most recently from 22c73ce to 6ade2f9 Compare November 3, 2022 13:40
@jphickey jphickey marked this pull request as ready for review November 3, 2022 13:40
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Nov 3, 2022
Updates the static analysis workflow:
 - Make it work with the latest Ubuntu and Cppcheck
 - Allow callers to pass in a project configuration to get "real"
   macro definitions and include paths
 - Streamlined - only generate XML outputs, then use XSLT to convert
   that to text, rather than running the tool twice.
 - Streamlined - merge the two XML outputs into one, before converting
   to sarif and uploading
 - Streamlined - Call the sarif conversion tool directly, rather than
   going through a 3rd party action.
@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Nov 3, 2022
@jphickey
Copy link
Contributor Author

jphickey commented Nov 3, 2022

As mentioned in the CCB - this also is (partially) related to #488 in that it is changing the cppcheck workflow at the bundle level to be manual dispatch. After going through how cppcheck operates, I can confirm there is really no value-add from running it at both the bundle and submodule levels, it will report the same info in both places. In other modes of operation, there could be a difference, but not in the way it was invoked in this workflow. In the future, if this changes and it is warranted to do so, the static analysis could be set back to push/pull again, but with the current configuration it doesn't (and will not) show anything different.

dzbaker added a commit that referenced this pull request Nov 14, 2022
*Combines:*

cfe v7.0.0-rc4+dev205
osal v6.0.0-rc4+dev151
cFS-GroundSystem v3.0.0-rc4+dev39

**Includes:**

*cFS*
- #608

*cFE*
- nasa/cFE#2197

*osal*
- nasa/osal#1323

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#217
- nasa/cFS-GroundSystem#230

Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored-by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored-by: Paul Ober <paulober@users.noreply.github.com>
@dzbaker dzbaker mentioned this pull request Nov 14, 2022
2 tasks
dzbaker added a commit that referenced this pull request Nov 14, 2022
*Combines:*

cfe v7.0.0-rc4+dev205
osal v6.0.0-rc4+dev151
cFS-GroundSystem v3.0.0-rc4+dev39

**Includes:**

*cFS*
- #608

*cFE*
- nasa/cFE#2197

*osal*
- nasa/osal#1323

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#217
- nasa/cFS-GroundSystem#230

Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored-by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored-by: Paul Ober <paulober@users.noreply.github.com>
@dzbaker dzbaker merged commit 7f0db67 into nasa:main Nov 14, 2022
@jphickey jphickey deleted the fix-607-static-analysis branch April 4, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to pass project args to the "static-analysis" cppcheck reusable workflow
3 participants