Skip to content

Commit

Permalink
feat(rubocop): move LineLength cop from Metrics to Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Feb 14, 2020
1 parent 3d07b8d commit f6b21ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vim: ft=yaml
---
# General overrides used across formulas in the org
Metrics/LineLength:
Layout/LineLength:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
Max: 88
Expand Down
6 changes: 3 additions & 3 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "ci(kitchen+travis+inspec): fix '`'amazonlinux-2-py3'`' [skip ci]"
body: '* Semi-automated using https://github.com/myii/ssf-formula/pull/128'
title: "chore(rubocop): move '`'LineLength'`' cop from '`'Metrics'`' to '`'Layout'`' [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/129'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -152,7 +152,7 @@ ssf_node_anchors:
rubocop:
AllCops: {}
Cops:
Metrics/LineLength:
Layout/LineLength:
Bugbear: *line_length_bugbear
Default: *line_length_default
Max: *line_length_bugbear
Expand Down
14 changes: 7 additions & 7 deletions ssf/files/default/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# vim: ft=yaml
---
# General overrides used across formulas in the org
{%- set MLL = 'Metrics/LineLength' %}
{{ MLL }}:
{%- set rbcp_MLL = rubocop.Cops.get(MLL) %}
{%- if rbcp_MLL.Max == rbcp_MLL.Bugbear %}
# Increase from default of `{{ rbcp_MLL.Default }}`
{%- set LLL = 'Layout/LineLength' %}
{{ LLL }}:
{%- set rbcp_LLL = rubocop.Cops.get(LLL) %}
{%- if rbcp_LLL.Max == rbcp_LLL.Bugbear %}
# Increase from default of `{{ rbcp_LLL.Default }}`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
{%- endif %}
Max: {{ rbcp_MLL.Max }}
Max: {{ rbcp_LLL.Max }}

{%- if rubocop.AllCops %}

Expand All @@ -30,7 +30,7 @@ AllCops:
{%- if semrel_formula == 'template' %}
# <REMOVEME
{%- endif %}
{%- for cop, config in rubocop.Cops.items() if cop not in [MLL] %}
{%- for cop, config in rubocop.Cops.items() if cop not in [LLL] %}
{{ cop }}:
{#- This is purposefully simplistic for the time being,
until (if ever) more advanced configuration is necessary #}
Expand Down

0 comments on commit f6b21ad

Please sign in to comment.