microsoft / microsoft/typescript-analyze-trace

Change exit codes to be more CI friendly

Open
#39 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
429
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Currently, the tool states

Exits with code 0 if highlights were found, 1 if no highlights were found, and 2 if an error occurred

Using this tool within CI, a non-0 exit code typically causes the job to fail which doesn't feel congruent with "no highlights found" (which to my understanding means there's no noteworthy findings?)

Would it make sense to swap the 0 and 1 exit codes? Or to at least add an argument that swaps them?

TIA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI entry point that assigns the documented exit codes: 0 when highlights are found, 1 when none are found, and 2 on errors. Decide whether the behavior should be swapped or made configurable, then verify the selected behavior in CI-style usage and update the exit-code documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.