Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display errors and warnings in a more human-readable format #316

Closed
willosborne opened this issue Jul 26, 2024 · 1 comment
Closed

Display errors and warnings in a more human-readable format #316

willosborne opened this issue Jul 26, 2024 · 1 comment
Assignees
Labels
CLI enhancement New feature or request
Milestone

Comments

@willosborne
Copy link
Member

Feature Request

Description of Problem:

Currently validation report is output as a JSON object. We have a --format flag that lets you optionally set JUnit for XML output, but no option for easy human-readable data in a colour-coded table.

I think there's also room for a summary of the errors, so that you can see at a glance how many errors and validations there were.

Potential Solutions:

Add a new output mode that uses a library to display validation in a table, rather than as JSON.
This may not even require a library - see the console.table() method: https://developer.mozilla.org/en-US/docs/Web/API/console/table_static

Coloured labels for errors would also help improve the glance value - one library I found was colors: https://www.npmjs.com/package/colors

@willosborne willosborne added the enhancement New feature or request label Jul 26, 2024
@jpgough-ms jpgough-ms added the CLI label Oct 7, 2024
@rocketstack-matt rocketstack-matt added this to the 1.0 milestone Oct 17, 2024
@Thels Thels self-assigned this Nov 14, 2024
@Thels
Copy link
Member

Thels commented Nov 27, 2024

Been looking at this on my dev-316 branch - this is what I've got so far - this is using a combination of cliui / chalk and string-table ( which is like console.table() but allows manipulation/interrogation of the generated string )

image

Currently if you have true under "Issues Found?` it will change colour depending on the current state. Got an error? It will be red - warning? Yellow.

I tried displaying the table of output using cliui too but it really struggles with variable length content from my experiments.

Thels added a commit to Thels/architecture-as-code that referenced this issue Nov 27, 2024
Introducing a `-pretty` flag to the validate command.
Thels added a commit to Thels/architecture-as-code that referenced this issue Nov 28, 2024
Introducing a `-pretty` flag to the validate command.

Text fixture fixes.

Code Review Suggested Changes

WIP - Lint Fixes
Thels added a commit to Thels/architecture-as-code that referenced this issue Nov 28, 2024
Introducing a `-pretty` flag to the validate command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants