Skip to content

Commit

Permalink
Configure quoted strings rule for yamllint
Browse files Browse the repository at this point in the history
Add a configuration for the `quoted-strings` rule that matches our best
practices. Other files are updated to comply with these new settings.
  • Loading branch information
mcdonnnj committed Dec 4, 2024
1 parent dd102fe commit dc891af
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 31 deletions.
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
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
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
11 changes: 11 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ rules:
forbid-explicit-octal: true
# Do not allow implicit octal values (those beginning with a leading 0).
forbid-implicit-octal: true

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

0 comments on commit dc891af

Please sign in to comment.