False positive with github actions yaml
dosas opened this issue ยท 3 comments
dosas commented
---
on:
push:
tags: ['**']
...
When running
yamllint --strict
Actual:
warning truthy value should be one of [false, true] (truthy)
Expected:
No warning
dosas commented
@adrienverge Could you be a little bit more verbose about it?
andrewimeson commented
@dosas this is an issue report with a lot of duplicates (e.g. #430). It's not a problem, it's intended default behavior.
Your options are:
-
Quote the key
--- name: Run tests "on": [push, pull_request]
-
Disable the rule with a line comment
--- name: Run tests on: [push, pull_request] # yamllint disable-line rule:truthy
-
Disable key checking in the yamllint configuration (e.g.
.yamllint.yaml
)--- extends: default rules: truthy: check-keys: false
adrienverge commented
Thanks @andrewimeson ๐
Since #650 and yamllint 1.34.0 there is yet another solution: declare the YAML version explicitly:
%YAML 1.2
---
name: Run tests
on: [push, pull_request]