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

Add a show-warnings target to the makefile #1096

Merged
merged 1 commit into from
Apr 30, 2023
Merged

Conversation

DanRStevens
Copy link
Collaborator

@DanRStevens DanRStevens commented Apr 30, 2023

This automates running the build using Clang with -Weverything, and then grepping the stderr output for warning flag messages, and processing them to be sorted, with duplicates removed.

The -j1 is needed since otherwise output from multiple processes can get interleaved, which would confuse the regex that pulls out the warning flags.

Run a clean before building all to ensure nothing is skipped during a rebuild, which would prevent warning messages from being displayed for those compilation units.

Order of output redirection is important. First stderr must be directed to where stdout is currently pointing, then stdout is redirected to be ignored. We want to process the stderr output only.


Support work for: #528

This automates running the build using Clang with `-Weverything`, and then grepping the stderr output for warning flag messages, and processing them to be sorted, with duplicates removed.

The `-j1` is needed since otherwise output from multiple processes can get interleaved, which would confuse the regex that pulls out the warning flags.

Run a `clean` before building `all` to ensure nothing is skipped during a rebuild, which would prevent warning messages from being displayed for those compilation units.

Order of output redirection is important. First stderr must be directed to where stdout is currently pointing, then stdout is redirected to be ignored. We want to process the stderr output only.
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.

1 participant