Repository navigation
Command Hooks fixes and Build Warnings Log context, deduplication, and filtering - #1341
Merged
Merged
Conversation
Integration specs run Command Hooks with Ceedling's real tool validation and execution, feeding each hook the argument hash the core builds, and run Build Warnings Log on real gcc output with real log writing. Pending specs record what does not work: :pre_runner_generate and the compile hooks hand an empty argument to their tools, a hook given a list of tools fails validation, hook validation adds :logging to the project configuration, and warnings lose their context and repeat per file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- :pre_runner_generate and the compile hooks read argument hash keys the
core never sets, so their tools always received an empty ${1}. Each
hook's arguments now come from one table of the keys the core builds.
:pre_runner_generate passes the test file, as documented, and both
compile hooks pass the source file as ${1} and the object file as ${2}.
- A hook configured as a list of tools failed validation, which walked
the list by index through the configuration walker. Each listed tool
is now validated directly.
- Hook validation added :logging to the project configuration rather
than to the hook's own tool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A real test build runs every test build hook with a script recording its
arguments, checking each against the argument its documentation
promises, including the object file compile hooks pass as ${2}. A
clobber afterward runs no build hook (#194).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WarningCollector groups GCC and Clang diagnostics with the lines that explain them: the function or include context before a warning, and the source line, caret, and any note after it. Output in other formats is still taken a line at a time, and compiler summary lines are left out. The plugin keeps each distinct warning once per build context, so a header's warning reached through every file including it is logged once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
:report_build_warnings_log ↳ :patterns replaces the default match of any line mentioning 'warning' with configured regular expressions, and :excludes drops warnings any of its expressions match, context included. Both default to empty, keeping the default match. An entry that is not a valid regular expression stops the build, naming its setting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GCC reports a header's warning after a function's warning with an 'At top level' line it leaves out when nothing came before, so the same header warning from two files looked distinct and was logged twice. A warning's identity now leaves out every context line before its diagnostic line, scope as well as include chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ceedling's stopwatch is the wall clock, a Time, on Windows, so :pre_build, :post_build, and the other timestamp hooks received a date string there rather than a count of seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Constants defined in describe blocks land on Object, so specs sharing a name warned of redefinition when run in one process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[skip ci]
[skip ci]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #194.
Summary
Command Hooks
The plugin had no specs at all. This PR fixes three bugs in it and covers it with unit, integration, and system specs.
:pre_compile_execute,:post_compile_execute, and:pre_runner_generateread argument-hash keys the core never sets, so their tools always received an empty${1}. Each hook's arguments now come from one table of the keys the core builds:${1}and the object file as${2};:pre_runner_generatepasses the test file, as documented.:loggingto the project configuration instead of to the hook's own tool.test:allruns every test-build hook with a recording script, checking each hook's documented argument. Aclobberafterward runs no build hook, which pins Comand hooks run after every command (including module:create, clobber, clean) #194.Build Warnings Log
WarningCollectorgroups GCC and Clang diagnostics with the lines that explain them: the function or include context before a warning, and the source line, caret, and any note after it. Output in other formats is collected a line at a time, and compiler summary lines are left out.:patternsand:excludestake regular expressions.:patternsreplaces the default match of any line mentioning "warning", and:excludesdrops warnings already accepted. An invalid entry stops the build, naming its setting.Docs
command-hooks.md:report-build-warnings-log.md: rewritten for context, deduplication,:patterns, and:excludes.Testing
command_hooks_spec.rbis new,warning_collector_spec.rbis new, andreport_build_warnings_log_spec.rbis extended.spec/system/command_hooks_spec.rb. With the old compile-hook key restored, it fails and shows the empty${1}.rake specs:units: 4587 examples, 0 failures.rake specs:integration: 436 examples, 0 failures.🤖 Generated with Claude Code