-
-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Describe the bug
I created a file .github/workflows/deploy.yml. Running megalinter in GitHub Actions will produce an error as v8r detects a schema which is incorrect.
v8r uses the following schemastore file to detect the required schema (https://github.com/SchemaStore/schemastore/blob/2e3b50930f40c237d0070414701ea7c44ca2c85e/src/api/json/catalog.json#L1073-L1078). Within this file an attribute fileMatch will be used to detect the schema based on the file path. MegaLinter does not pass a relative path (it will pass /github/workspace/.github/workflows/deploy.yml) hence the match will match with the wrong result.
This may or may not be an issue with v8r, schemastore or megalinter. I'm open for suggestions where to place this.
To Reproduce
Steps to reproduce the behavior:
- Create project dir and file called
mkdir -p v8r-test/.github/workflows && touch v8r-test/.github/workflows/deploy.yml - Run v8r from within project dir
cd v8r-test && npx v8r@latest .github/workflows/deploy.yml --verbose - Run v8r from outside the project dir
cd .. && npx v8r@latest .github/workflows/deploy.yml --verbose - See different results
Expected behavior
Step 2 and 3 should behave the same.