Closed malatinigreenly closed 1 year ago
If all you want is to validate the YAML and not to actually lint it for style issues or potentially misleading syntax, you probably don't want to use yamllint.
I think you could put the config directly into a file in your repo (e.g. .yamllint.yml
) and then have the following run: yamllint . -c .yamllint.yml
.
In your run command you also have
&& yamllint -c ./yamllint.yaml && yamllint .
at the end, so you will once use your relaxed config and then the default config, which might be confusing.
Ok thanks @Deaddy, @andrewimeson ! :D I found a solution doing this :
name: Validate-YAML
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate relaxed YAML file
run: ./.github/workflows/config/script.sh
shell: bash
With
#!/bin/bash
yamllint --no-warnings -d "{extends:relaxed,rules:{ document-start: disable, trailing-spaces: disable}}" ./apps/
I thought at first not using yamllint @andrewimeson but then I was not sure what else to use
Hi ! I found this very useful snippet in stackoverflow
I would need to edit the configuration file to have an extremely relaxed config. But I am not very used to github actions so I am not sure how to do it.
I would like to have the necessary rules to make sure that the file is well formatted and would be compiled, but I would like other warning or errors (such as line length) to be disabled. I am doing this silly change :
but it does not work. Would you have some tips please ?
Please excuse my bad English.
Could you help me please ?
Thanks a lot guys !!