diagnose exit code
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 238
- Forks
- 106
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 6
Description
Currently, the diagnose utility prints all output to stdout and returns 0 regardless of warnings. Would it make sense to return a non-zero exit status if there's an error with any of the checks?
This would make it easier to programmatically distinguish CmdStan runs with diagnostic warnings in the shell. As far as I know, currently the diagnose output needs to be checked manually or the output loaded into one of the programming language specific packages.
The return line in diagnose.cpp can just return the bool value from the variable has_error, or a more specific exit code can be used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in diagnose.cpp at the return line and inspect how the has_error variable is set by the checks. Change the exit status behavior as described, then verify that a diagnostic error produces a non-zero status while a clean run remains successful.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100