Open Pandapip1 opened 2 months ago
This isn't currently possible, but I have two suggestions:
Move the comment to be above the line
jobs:
markdownlint:
name: 🖋️ Markdownlint
runs-on: ubuntu-latest
steps:
- name: 📦 Checkout Repository
# v4.1.5
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
with:
fetch-depth: 2
Disable the line-length rule for part of the file, and optionally re-enable it for the rest of the file
jobs:
markdownlint:
name: 🖋️ Markdownlint
runs-on: ubuntu-latest
steps:
# yamllint disable rule:line-length
- name: 📦 Checkout Repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 2
- name: 🐍 Setup Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
# yamllint enable rule:line-length
- name: 🐚 Do stuff that you still want line-length linted on
run: |
for _ in {1..100}; do
echo hi
done
Move the comment to be above the line
Unfortunately, this isn't possible due to the automatic dependency update system (Renovate) being used.
Disable the line-length rule for part of the file, and optionally re-enable it for the rest of the file
I've just disabled that particular rule globally for now.
The ideal situation would be to be able to do something like
# yamllint disable-for-item *.uses rule:line-length
steps:
I have the following config:
Due to other tooling I have, those lines with
uses
are always going to be too long. I'd like to disable theline-length
rule, but only for those lines, and without spammingyamllint disable-line
everywhere.