question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Diagnostics CLI: Add "Success" output message when no errors found

See original GitHub issue

Currently, the CLI diagnostics command does not return output when no warnings or errors are found. Example:

$ yarn rw diagnostics
yarn run v1.22.4
$ /Users/price/Repos/create-redwood-app/node_modules/.bin/rw diagnostics
✨  Done in 3.07s.

This can cause confusion as to whether anything was run at all and if the project is ok. Improved output may include:

  • count of checks run/completed
  • count of warnings found
  • count of errors found
  • 🏆 if everything is good

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
M0nicacommented, Oct 17, 2020

I think implementing these enhancements could be implemented between four tickets (1) improve the success state by making it more clear, 2) reformatting the CLI output, and 3 + 4)enhancing the diagnostics to include Prisma and TypeScript checks which could be worked on concurrently).

  1. updating the check/diagnostics CLI to output something along the lines of “Nothing to see here!” when there are no warnings or errors.
  2. update and reformat the current CLI output to have Redwood Core Diagnostics and then print out the individual warnings/errors. I am assuming GraphQL - but not necessarily Prisma, environment, routes, router, SDL files, service functions, TOML, the existing diagnostics in redwood/redwood all would fall under Redwood Core Diagnostics.
$ rw check
... 
[task output]
[task output]
etc
...

SUMMARY
- **Redwood Core Diagnostics** [2 Warnings, 1 Error]
  - _warning_: Your env vars are missing
  - _warning_: Name your queries
  - _error_: missing redwood.toml
  1. Update check/diagnostics CLI to integrate with TSC and output any of those errors. Would we want to also allow TSC warnings to print in addition to errors and or for the level that outputs to be configurable by the user?
$ rw check
... 
[task output]
[task output]
etc
...

SUMMARY
- **Redwood Core Diagnostics** [2 Warnings, 1 Error]
  - _warning_: Your env vars are missing
  - _warning_: Name your queries
  - _error_: missing redwood.toml
- **Typescript** [1 Warning]
  - _warning_: gratuitous use of 'any'
  1. Update check/diagnostics CLI to integrate with Prisma linting (I am not sure how straightforward this type of integration is 🤔)
... 
[task output]
[task output]
etc
...

SUMMARY
- **Redwood Core Diagnostics** [2 Warnings, 1 Error]
  - _warning_: Your env vars are missing
  - _warning_: Name your queries
  - _error_: missing redwood.toml
- **Prisma** [All Good]
0reactions
jtoarcommented, May 20, 2021

From a quick read it sounds like this was implemented but there’s still some good ideas here so I won’t close it outright just yet

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use PowerShell to handle errors generated by a Java CLI ...
Since you're using Start-Process without -Wait , the execution is asynchronous, so you cannot know the full content of the stdout and stderr ......
Read more >
Diagnostic messages - IBM
Report output has been saved in data set 'dsname'; CPP0601007E ... RESTORE Confirmation has been denied, SHIP Command will NOT be Executed; CPP0605003I...
Read more >
SetupDiag - Windows Deployment - Microsoft Learn
SetupDiag is a diagnostic tool that can be used to obtain details about why a Windows 10 upgrade was unsuccessful.
Read more >
Interpret the nrdiag output - New Relic Documentation
screen-nrdiag-output.png. The Diagnostics CLI outputs any issues it found with your installation, along with troubleshooting suggestions.
Read more >
11.3 Error Messages or Unexpected Output - Oracle Help Center
The line number changes over time. However, the error indicates that the tool was expecting an integer return value and no value was...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found