Skip to content

Fix CI step that silently swallows numpydoc failures#697

Open
wali-reheman wants to merge 2 commits into
numpy:mainfrom
wali-reheman:fix/cli-test-exit-code
Open

Fix CI step that silently swallows numpydoc failures#697
wali-reheman wants to merge 2 commits into
numpy:mainfrom
wali-reheman:fix/cli-test-exit-code

Conversation

@wali-reheman

Copy link
Copy Markdown

The 'echo '! cmd' | bash' pattern in the CLI test steps always returns 0 (echo's exit code), even when numpydoc itself crashes. This means real failures get silently swallowed.

Fixed by running the commands directly and using || true to allow expected validation failures while still catching actual errors.

The 'echo '! cmd' | bash' pattern was masking real numpydoc crashes
because 'echo' always returns 0. Now runs directly with || true to
allow expected validation failures while still catching actual crashes.
Comment thread .github/workflows/test.yml Outdated
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
! numpydoc render numpydoc.tests.test_main._invalid_docstring
numpydoc validate numpydoc.tests.test_main._capture_stdout
echo '! numpydoc validate numpydoc.tests.test_main._docstring_with_errors' | bash
numpydoc validate numpydoc.tests.test_main._docstring_with_errors || true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why || true here instead of the prefixed-! pattern above?

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.

2 participants