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

Failure to find Globbed files when trying to run the linter as part of Github Actions #406

Closed volovikariel closed 6 months ago

volovikariel commented 9 months ago

In my repo, the lint stage of my GHWF failed with INFO Linting file './internal/docs/apis/**/*.yaml' against 42 rules: https://quobix.com/vacuum/rulesets/recommended, despite running fine locally image

Running it with a find command instead works fine.

Any idea why Globs don't seem to work in GH Actions?

daveshanley commented 9 months ago

My guess is that its the shell which is doing the globbing, vacuum is getting pre-globbed files most of the time directly from the shell.

The same problem exists on windows, so this is a feature we need to add.

volovikariel commented 9 months ago

I see. I'm not sure what the standard way of going about this is, as a file name could contain * characters. image

Should the user pass in a flag to signify that it's a Glob pattern, and then we can simply(?) use filepath::glob to generate a slice of file names as opposed to relying on args directly?

daveshanley commented 8 months ago

I think we will need to, there isn't any other way to determine a pattern is being used, if the shell is not globbing for us.