Thread (19 messages) 19 messages, 3 authors, 2025-03-19

Re: [PATCH v3 0/3] Add a static analysis job to prevent assertions with side effects

From: Taylor Blau <hidden>
Date: 2025-03-19 22:27:59

On Wed, Mar 19, 2025 at 04:22:55PM +0000, Elijah Newren via GitGitGadget wrote:
Changes since v1:

 * Tweaked commit message for patch 2 Changes since v2:
 * Rename BUT_IF_NOT() -> ASSERT(). Didn't have a strong opinion on the set
   of alternatives Junio gave, so went with Taylor's small preference. If
   anyone has a strong preference here, I can pick a different alternative.
 * Fixed shell style issues (indentation, multi-line pipes, multiple lines
   with stderr redirects) in patch 2

Elijah Newren (3):
  git-compat-util: introduce ASSERT() macro
  ci: add build checking for side-effects in assert() calls
  treewide: replace assert() with ASSERT() in special cases

 Makefile                      |  4 ++++
 ci/check-unsafe-assertions.sh | 18 ++++++++++++++++++
 ci/run-static-analysis.sh     |  2 ++
 diffcore-rename.c             |  2 +-
 git-compat-util.h             |  8 ++++++++
 merge-ort.c                   |  4 ++--
 merge-recursive.c             |  2 +-
 object-file.c                 |  2 +-
 parallel-checkout.c           |  2 +-
 scalar.c                      |  4 ++--
 sequencer.c                   |  2 +-
 11 files changed, 41 insertions(+), 9 deletions(-)
 create mode 100755 ci/check-unsafe-assertions.sh
Thanks, this version LGTM.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help