megalinter icon indicating copy to clipboard operation
megalinter copied to clipboard

v8r configuration file not working?

Open bdovaz opened this issue 1 year ago • 12 comments

This page describes how to create a configuration file for this linter: https://github.com/chris48s/v8r#configuration

In my case, I want to customize several schemas because in the repository there are several azure-pipelines*.yml or docker-compose*.yml files that not having the standard name, it does not take the schema and I want to indicate it.

When running megalinter it seems that it is as if this file does not exist.

bdovaz avatar Oct 17 '22 10:10 bdovaz

Usually, I would suggest adding YAML_V8R_CONFIG_FILE: LINTER_DEFAULT to your MegaLinter config, but the setting doesn’t appear to exist. Feel free to open a pull request to add this setting.

Kurt-von-Laven avatar Oct 17 '22 21:10 Kurt-von-Laven

I have added the field in the descriptor, as I don't quite understand the whole flow in megalinter descriptors, seeing the link in my first post and how the configuration file resolution works in this linter, do you think something else is needed?

bdovaz avatar Oct 18 '22 20:10 bdovaz

@bdovaz config_file_name will make that cli_config_arg_name will be used if the file is found in

  • root folder of the repo
  • .github/linters
  • TEMPLATES (default config in megalinter)

cli_config_arg_name is -c by default, does v8r understand this arg ?

nvuillam avatar Oct 18 '22 20:10 nvuillam

@nvuillam According to this link: https://github.com/chris48s/v8r#configuration

It says that you don't need to pass any parameter and that it automatically looks for it in the working directory under the listed names and by default I have chosen ".v8rrc.yml" but that's why I don't understand what to do in this PR. This linter supposedly does not need to pass any parameter, it simply looks for files with those names in the working directory and that is what does not work with megalinter and it does if I run the linter outside on my own with the npm package, for example: v8r filetocheck.yml

bdovaz avatar Oct 18 '22 20:10 bdovaz

The problem is that the list of files is sent in absolute format, cwd is not the root of the repo. I have a PR pending but there is still some bug so I can't merge it yet :/

nvuillam avatar Oct 18 '22 20:10 nvuillam

Ok, I'll wait then, can you mention here which one it is? To have it tracked

bdovaz avatar Oct 18 '22 20:10 bdovaz

@bdovaz this one https://github.com/oxsecurity/megalinter/pull/1877

If you find why there is some strange stuff provoking timeout.... you're a MegaLinter hero ! :D ( I'm very busy at my actual job these days, I unfortunately have less time for open source :/ )

nvuillam avatar Oct 18 '22 22:10 nvuillam

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

github-actions[bot] avatar Nov 18 '22 01:11 github-actions[bot]

Any news?

bdovaz avatar Nov 18 '22 07:11 bdovaz

We still need to make pass the PR that uses relative paths :/

nvuillam avatar Nov 18 '22 08:11 nvuillam

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

github-actions[bot] avatar Dec 19 '22 00:12 github-actions[bot]

No stale, waiting for #1877

bdovaz avatar Dec 19 '22 07:12 bdovaz