Open alex-novikov-1990 opened 2 years ago
Every linter has some # nolint
statement, I couldnt even find such a thing on eemeli/yaml ...
It is unproductive to have many "false alarms" in your environment when you know the code is correct but there is some limitation on the linter (or schema, etc).
I've similar problem. Since I started using gitlab-ci.yml !reference
feature, I have critical error in my code. Only solution, mentioned in many places, is to disable RedHat YAML extension. Hope you can add some # ignore this line
etc. soon. Your extension gives a lot of useful tips and checks syntax very well. This is the only problem I had with it so far.
@zvalcav To fix that issue, add to vocodes settings:
"yaml.customTags": [
"!reference sequence"
],
@jwthomp it worked. Thank you very much :-)
Any updates on this?
I'm using a url on the gitlab environment and the schema says only http
or https
are allowed. I'd like to use my custom url protocol pk://
. Anyway to disable this check or just for this one line?
Is there any way to not put settings into .vscode
but directly reference in the .yml file?
I have multiple files with different custom tags and it will be difficult to put them all into VSCode configuration.
# ...Excerpt from serverless.yml...
layers:
# yaml-schema-disable-next-line incorrect-type
- { Ref: FontsLambdaLayer }
@huksley I like your idea a lot. Would be nice to have this. Any update now?
I also need this feature due to an upstream with an incorrectly strict schema.
I'd also like this a lot, for the same reasons as everyone else
I often write Azure DevOps pipeline templates and since there're quite a few non-standard yaml syntax that DevOps uses, I got red lines complaining about incorrect syntax or something not match the pattern
on pretty much all the template files due to how the upstream Azure pipeline schema is designed for writing the pipeline in one single azure-pipeline.yml
file. Wish there is a feature for me to disable errors on certain lines in within the file.
This feature would be good, I have this problem with CircleCI config file config.yml.
I really don't understand how this isn't a thing already ... there is no way the people who use this product aren't running into the same issue as all of us ... how could they just keep on going in life knowing this is a problem ... it is beyond annoying and should be such a simple fix
I'm running into this issue, does anyone know of a workaround to disable for this type of scenario?
Context I am using Serverless Framework and when I use its variables in a CloudFormation section yaml-schema complains (note: both the variable transformation and the deployment works as expected)
Is there a way I can at least override that in vscode similar to the yaml.customTags
mentioned in https://github.com/redhat-developer/vscode-yaml/issues/666#issuecomment-1130290691 above?
Thanks!
Ad a lot of others, since my compose file is using ENV vars...
I'm facing the same issue. @msivasubramaniaan @gorkem Excuse the ping, but is anyone on the team able to chime in on this, and the duplicate issues?
Facing the same issue when templating a yaml file with terraform. I.e.
%{ if node_type_index != "server-0" }
server: https://<snip>
%{ endif }
Same issue here. In my (recurring) instance, for Kustomize strategicpatchmerge files as already described in #915
Serverless YAML also commonly uses functions, it too has that annoying lint error:
We really need an "ignore" list for YAML!
Is there any update on this issue, I would like the ability to disable a line with a comment
Bump +1 for this
+1 Bump this was originally requested 2+ years ago
+1
Any update on this? Can you keep us updated?
Same here. I have many like this which I want to ignore
Is there a way to disable in neovim Incorrect type
with a comment? In lua this is easy to do with:
---@diagnostic disable-next-line: missing-fields
formatting = {...
2 years and 5 months, and this is still unresolved?
Hello @ArjixWasTaken
We don't have enough developer to look at this at the moment. We will try to address it at the earliest. Mean time we are happy to receive contributions as well.
Hello @ArjixWasTaken
We don't have enough developer to look at this at the moment. We will try to address it at the earliest. Mean time we are happy to receive contributions as well.
So it is not a matter of you refusing such a feature, but a lack of manpower?
Throwing a vote for # noqa
to ignore errors on a specific line.
Please add this!
Is your enhancement related to a problem? Please describe.
The schema definition is out of my control and has a flaw: one property is defined as string, but accepts arbitrary objects. This leads to false errors.
Describe the solution you would like
I would like to be able to disable linting for some properties via comments in the code. Something like
# yaml-schema disable-next-line
.Describe alternatives you have considered
I considered disabling linting completely for the whole file or for the schema. But these alternatives are not precise enough.
Additional context