Skip to content

Commit 929ce19

Browse files
committed
feat(yamllint): add explicit settings for octal-values
* adrienverge/yamllint#204
1 parent 7038f15 commit 929ce19

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ssf/defaults.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ ssf_node_anchors:
1717
# An alternative method could be to use:
1818
# `git describe --abbrev=0 --tags`
1919
# yamllint disable rule:line-length
20-
title: 'chore(issues): update `Bug report` & `Feature request` templates [skip ci]'
21-
body: '* Automated using https://github.com/myii/ssf-formula/pull/58'
20+
title: 'chore(yamllint): update ignored paths and add `octal-values` [skip ci]'
21+
body: '* Automated using https://github.com/myii/ssf-formula/pull/59'
2222
# yamllint enable rule:line-length
2323
github:
2424
owner: saltstack-formulas
@@ -212,7 +212,9 @@ ssf_node_anchors:
212212
max: 88
213213
# new-line-at-end-of-file: {}
214214
# new-lines: {}
215-
# octal-values: {}
215+
octal-values:
216+
forbid-implicit-octal: 'true'
217+
forbid-explicit-octal: 'true'
216218
# quoted-strings: {}
217219
# trailing-spaces: {}
218220
# truthy: {}

ssf/files/default/.yamllint

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ rules:
8484
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
8585
{%- endif %}
8686
max: {{ yamllint.rules.get('line-length').max }}
87+
88+
{#- Don't need the `if` here since we're always providing a `octal-values` setting #}
89+
octal-values:
90+
{%- set yl_ov = yamllint.rules.get('octal-values') %}
91+
{{- format_ignore(yl_ov) }}
92+
forbid-implicit-octal: {{ yamllint.rules.get('octal-values').get('forbid-implicit-octal') }}
93+
forbid-explicit-octal: {{ yamllint.rules.get('octal-values').get('forbid-explicit-octal') }}

0 commit comments

Comments
 (0)