Skip to content

Commit

Permalink
feat(yamllint): add explicit settings for octal-values
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 7, 2019
1 parent 7038f15 commit 929ce19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length
title: 'chore(issues): update `Bug report` & `Feature request` templates [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/58'
title: 'chore(yamllint): update ignored paths and add `octal-values` [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/59'
# yamllint enable rule:line-length
github:
owner: saltstack-formulas
Expand Down Expand Up @@ -212,7 +212,9 @@ ssf_node_anchors:
max: 88
# new-line-at-end-of-file: {}
# new-lines: {}
# octal-values: {}
octal-values:
forbid-implicit-octal: 'true'
forbid-explicit-octal: 'true'
# quoted-strings: {}
# trailing-spaces: {}
# truthy: {}
Expand Down
7 changes: 7 additions & 0 deletions ssf/files/default/.yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,10 @@ rules:
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
{%- endif %}
max: {{ yamllint.rules.get('line-length').max }}

{#- Don't need the `if` here since we're always providing a `octal-values` setting #}
octal-values:
{%- set yl_ov = yamllint.rules.get('octal-values') %}
{{- format_ignore(yl_ov) }}
forbid-implicit-octal: {{ yamllint.rules.get('octal-values').get('forbid-implicit-octal') }}
forbid-explicit-octal: {{ yamllint.rules.get('octal-values').get('forbid-explicit-octal') }}

0 comments on commit 929ce19

Please sign in to comment.