Errors in `if` expressions go undetected
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 113
- Forks
- 34
- Avg merge
- 14h 10m
- Merged PRs (30d)
- 5
Description
Well, turns out that #44 isn't really an improvement since false if-expressions are reported as failures.
So you can't distinguish between "if expression evaluates to false" and "if expression is syntactically wrong" in the logs.
The actual problem is in console.Run which reports a non-zero exit code as error and combines stdout+stderr.
Maybe console.Run should check for non-empty stderr instead ? 🤔
Or a separate console.If is needed ? 🤷🏻♂️
Contributor guide
No contributing guide indexed for this repository
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 with pkg/console/console.go, especially console.Run at the linked location, and trace how if expressions distinguish stdout from stderr and non-zero exit codes. Reproduce both a false if-expression and a syntactically invalid one; done means the logs distinguish those outcomes without reporting a valid false result as a failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100