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

[packchk] Add option to packchk to fail if warning/info violations are detected #886

Closed
noahp opened this issue May 4, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request packchk Issue is related to packchk

Comments

@noahp
Copy link

noahp commented May 4, 2023

The packchk tool is amazing, very helpful! I noticed that only if Errors are detected does the tool return a non-zero error code. Could an option be added to also fail if any Warnings or Infos are detected? I'm using this workaround today but it's not the greatest:

# run packchk, if it passes, check if there were INFO or WARNING entries
# in the output
packchk lwIP.lwIP.2.1.0/lwIP.lwIP.pdsc | \
  tee packcheck.log && \
  ! grep -qE '^\*\*\* INFO|^\*\*\* WARNING' packcheck.log
@noahp noahp added the enhancement New feature or request label May 4, 2023
@jkrech
Copy link
Member

jkrech commented May 5, 2023

@noahp, thanks a lot for your feedback and suggested enhancement.
We need to make sure that we don't break existing scripts. Therefore the suggestion of a command line flag e.g. pedantic could return different error codes indicating the most severe feedback is from level:

  • info
  • warning
  • error

@noahp
Copy link
Author

noahp commented May 5, 2023

That sounds perfect, exactly what I had in mind!

@thorstendb-ARM
Copy link
Collaborator

I added option "--pedantic" to return 1 on WARNINGs and prepared for "--pedantic [warning|info]". As this extension touches (our own) widely used library ErrLog, I will postpone that extension for later.
Hope this already helps.

grasci-arm pushed a commit to ARM-software/devtools that referenced this issue May 31, 2023
…pen-CMSIS-Pack#886 (Open-CMSIS-Pack#583)

added:
- option "--pedantic" (as bool), where packchk returns 1 on WARNINGs
- prepared for "--pedantic [warning|info]", this would touch ErrLog library
edriouk pushed a commit that referenced this issue May 31, 2023
…886 (#583) (#948)

added:
- option "--pedantic" (as bool), where packchk returns 1 on WARNINGs
- prepared for "--pedantic [warning|info]", this would touch ErrLog
library

Co-authored-by: Thorsten de Buhr <[email protected]>
@jkrech
Copy link
Member

jkrech commented Jul 4, 2023

@jkrech jkrech closed this as completed Jul 4, 2023
@jkrech jkrech added the packchk Issue is related to packchk label Jul 4, 2023
@jkrech jkrech changed the title Add option to packchk to fail if warning/info violations are detected [packchk] Add option to packchk to fail if warning/info violations are detected Jul 4, 2023
@noahp
Copy link
Author

noahp commented Jul 12, 2023

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request packchk Issue is related to packchk
Projects
None yet
Development

No branches or pull requests

3 participants