Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update our yamllint configuration file #200

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,69 @@
# Rather than breaking up descriptions into multiline strings we disable that
# specific rule in yamllint for this file.
# yamllint disable rule:line-length
- color: "eb6420"
- color: eb6420
description: This issue or pull request is awaiting the outcome of another issue or pull request
name: blocked
- color: "000000"
description: This issue or pull request involves changes to existing functionality
name: breaking change
- color: "d73a4a"
- color: d73a4a
description: This issue or pull request addresses broken functionality
name: bug
- color: "07648d"
- color: 07648d
description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks)
name: code.gov
- color: "0366d6"
- color: 0366d6
description: Pull requests that update a dependency file
name: dependencies
- color: "5319e7"
- color: 5319e7
description: This issue or pull request improves or adds to documentation
name: documentation
- color: "cfd3d7"
- color: cfd3d7
description: This issue or pull request already exists or is covered in another issue or pull request
name: duplicate
- color: "b005bc"
- color: b005bc
description: A high-level objective issue encompassing multiple issues instead of a specific unit of work
name: epic
- color: "000000"
description: Pull requests that update GitHub Actions code
name: github-actions
- color: "0e8a16"
- color: 0e8a16
description: This issue or pull request is well-defined and good for newcomers
name: good first issue
- color: "ff7518"
- color: ff7518
description: Pull request that should count toward Hacktoberfest participation
name: hacktoberfest-accepted
- color: "a2eeef"
- color: a2eeef
description: This issue or pull request will add or improve functionality, maintainability, or ease of use
name: improvement
- color: "fef2c0"
- color: fef2c0
description: This issue or pull request is not applicable, incorrect, or obsolete
name: invalid
- color: "ce099a"
- color: ce099a
description: This pull request is ready to merge during the next Lineage Kraken release
name: kraken 🐙
- color: "a4fc5d"
- color: a4fc5d
description: This issue or pull request requires further information
name: need info
- color: "fcdb45"
- color: fcdb45
description: This pull request is awaiting an action or decision to move forward
name: on hold
- color: "ef476c"
- color: ef476c
description: This issue is a request for information or needs discussion
name: question
- color: "d73a4a"
- color: d73a4a
description: This issue or pull request addresses a security issue
name: security
- color: "00008b"
- color: 00008b
description: This issue or pull request adds or otherwise modifies test code
name: test
- color: "1d76db"
- color: 1d76db
description: This issue or pull request pulls in upstream updates
name: upstream update
- color: "d4c5f9"
- color: d4c5f9
description: This issue or pull request increments the version number
name: version bump
- color: "ffffff"
- color: ffffff
description: This issue will not be incorporated
name: wontfix
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: build

on:
on: # yamllint disable-line rule:truthy
merge_group:
types:
- checks_requested
Expand Down Expand Up @@ -92,16 +92,16 @@ jobs:
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
env:
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
go${{ steps.setup-go.outputs.go-version }}-\
packer${{ steps.setup-env.outputs.packer-version }}-\
tf${{ steps.setup-env.outputs.terraform-version }}-"
tf${{ steps.setup-env.outputs.terraform-version }}-
with:
key: "${{ env.BASE_CACHE_KEY }}\
key: ${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('**/requirements-test.txt') }}-\
${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"
${{ hashFiles('**/.pre-commit-config.yaml') }}
# Note that the .terraform directory IS NOT included in the
# cache because if we were caching, then we would need to use
# the `-upgrade=true` option. This option blindly pulls down the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: sync-labels

on:
on: # yamllint disable-line rule:truthy
push:
paths:
- .github/labels.yml
Expand Down
14 changes: 7 additions & 7 deletions .mdl_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ default: true
# MD003/heading-style/header-style - Heading style
MD003:
# Enforce the ATX-closed style of header
style: "atx_closed"
style: atx_closed

# MD004/ul-style - Unordered list style
MD004:
# Enforce dashes for unordered lists
style: "dash"
style: dash

# MD013/line-length - Line length
MD013:
Expand All @@ -30,7 +30,7 @@ MD024:
# MD029/ol-prefix - Ordered list item prefix
MD029:
# Enforce the `1.` style for ordered lists
style: "one"
style: one

# MD033/no-inline-html - Inline HTML
MD033:
Expand All @@ -42,19 +42,19 @@ MD033:
# MD035/hr-style - Horizontal rule style
MD035:
# Enforce dashes for horizontal rules
style: "---"
style: ---

# MD046/code-block-style - Code block style
MD046:
# Enforce the fenced style for code blocks
style: "fenced"
style: fenced

# MD049/emphasis-style - Emphasis style should be consistent
MD049:
# Enforce asterisks as the style to use for emphasis
style: "asterisk"
style: asterisk

# MD050/strong-style - Strong style should be consistent
MD050:
# Enforce asterisks as the style to use for strong
style: "asterisk"
style: asterisk
45 changes: 42 additions & 3 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@
extends: default

rules:
braces:
# Do not allow non-empty flow mappings
forbid: non-empty
# Allow up to one space inside braces. This is required for Ansible compatibility.
max-spaces-inside: 1

brackets:
# Do not allow non-empty flow sequences
forbid: non-empty

comments:
# Ensure that inline comments have at least one space before the preceding content.
# This is required for Ansible compatibility.
min-spaces-from-content: 1

# yamllint does not like it when you comment out different parts of
# dictionaries in a list. You can see
# https://github.com/adrienverge/yamllint/issues/384 for some examples of
# this behavior.
comments-indentation: disable

indentation:
# Ensure that block sequences inside of a mapping are indented
indent-sequences: true
# Enforce a specific number of spaces
spaces: 2

# yamllint does not allow inline mappings that exceed the line length by
# default. There are many scenarios where the inline mapping may be a key,
# hash, or other long value that would exceed the line length but cannot
Expand All @@ -18,6 +39,24 @@ rules:
# Allows a 10% overage from the default limit of 80
max: 88

# yamllint doesn't like when we use yes and no for true and false,
# but that's pretty standard in Ansible.
truthy: disable
# Using anything other than strings to express octal values can lead to unexpected
# and potentially unsafe behavior. Ansible strongly recommends against such practices
# and these rules are needed for Ansible compatibility. Please see the following for
# more information:
# https://ansible.readthedocs.io/projects/lint/rules/risky-octal/
octal-values:
# Do not allow explicit octal values (those beginning with a leading 0o).
forbid-explicit-octal: true
# Do not allow implicit octal values (those beginning with a leading 0).
forbid-implicit-octal: true
jsf9k marked this conversation as resolved.
Show resolved Hide resolved

quoted-strings:
# Allow disallowed quotes (single quotes) for strings that contain allowed quotes
# (double quotes).
allow-quoted-quotes: true
# Apply these rules to keys in mappings as well
check-keys: true
# We prefer double quotes for strings when they are needed
quote-type: double
# Only require quotes when they are necessary for proper processing
required: only-when-needed
Loading