daveshanley / vacuum

vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports.
https://quobix.com/vacuum
MIT License
580 stars 48 forks source link

add test files? How to debug? #365

Closed bbrink1 closed 10 months ago

bbrink1 commented 10 months ago

My local vacuum git is reporting no test files for vacuum. Is this accurate? If so, I highly recommend adding test files to help with subtle debugging and to make sure uncommon features don't break as you make changes.

I'm running into an implementation issue and attempting to debug.. I realize that it is likely local, and yet am not getting a stack trace with the error. Only see "exit status 1" on cli just after the summary count of errors, warnings et cetera, so there are no details. What are your recommendations on debugging?

ps, I used jq to format the json swagger file, before processing.

daveshanley commented 10 months ago

There are currently 704 tests in vacuum. It has pretty good coverage, over the top of the 1601 tests that currently exist inside libopenapi. That results in 99.8% coverage for libopenapi, which is about as high as it can go.

Screenshot 2023-11-09 at 4 08 45 PM

Most files in the project have tests, you can see them via the _test.go extension.

The implementation detail is tricky to diagnose, without knowing what spec you are using, and what command you are using and which flags you're using.

bbrink1 commented 10 months ago

Thank you for the details. Yeah, I'm going to re-install golang first to get standard tests detected and working, then will proceed with your guidance.