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

Use modern version of validator to validate Dependabot configuration files #420

Merged
merged 1 commit into from
Nov 30, 2023
Merged
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
14 changes: 6 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"{{.WORKFLOW_TEMPLATES_PATH}}/test-python-poetry-task.yml" \
"{{.WORKFLOWS_PATH}}"

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-workflows-task/Taskfile.yml

Check warning on line 75 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

75:121 [line-length] line too long (131 > 120 characters)
ci:validate:
desc: Validate GitHub Actions workflows against their JSON schema
vars:
Expand Down Expand Up @@ -363,24 +363,22 @@
DATA_PATH: ".github/dependabot.yml"
# The asset Dependabot configuration files.
ASSETS_DATA_PATH: "workflow-templates/assets/dependabot/**/dependabot.yml"
PROJECT_FOLDER:
sh: pwd
WORKING_FOLDER:
sh: task utility:mktemp-folder TEMPLATE="dependabot-validate-XXXXXXXXXX"
cmds:
- wget --quiet --output-document="{{.SCHEMA_PATH}}" {{.SCHEMA_URL}}
- |
cd "{{.WORKING_FOLDER}}" # Workaround for https://github.com/npm/cli/issues/3210
npx ajv-cli@{{.SCHEMA_DRAFT_4_AJV_CLI_VERSION}} validate \
npx ajv-cli validate \
--all-errors \
--strict=false \
-s "{{.SCHEMA_PATH}}" \
-d "{{.PROJECT_FOLDER}}/{{.DATA_PATH}}"
-d "{{.DATA_PATH}}"
- |
cd "{{.WORKING_FOLDER}}" # Workaround for https://github.com/npm/cli/issues/3210
npx ajv-cli@{{.SCHEMA_DRAFT_4_AJV_CLI_VERSION}} validate \
npx ajv-cli validate \
--all-errors \
--strict=false \
-s "{{.SCHEMA_PATH}}" \
-d "{{.PROJECT_FOLDER}}/{{.ASSETS_DATA_PATH}}"
-d "{{.ASSETS_DATA_PATH}}"

docs:generate:
desc: Create all generated documentation content
Expand Down Expand Up @@ -410,7 +408,7 @@
-s "{{.SCHEMA_PATH}}" \
-d "{{.PROJECT_FOLDER}}/{{.DATA_PATH}}"

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-files-task/Taskfile.yml

Check warning on line 411 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

411:121 [line-length] line too long (127 > 120 characters)
general:check-filenames:
desc: Check for non-portable filenames
cmds:
Expand Down Expand Up @@ -443,7 +441,7 @@
echo
echo "Prohibited characters found in filenames"
echo "See:"
echo "https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions:~:text=except%20for%20the%20following"

Check warning on line 444 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

444:121 [line-length] line too long (142 > 120 characters)
false
}
- |
Expand Down Expand Up @@ -476,11 +474,11 @@
echo
echo "Reserved filenames found"
echo "See:"
echo "https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions:~:text=use%20the%20following-,reserved%20names,-for%20the%20name"

Check warning on line 477 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

477:121 [line-length] line too long (169 > 120 characters)
false
}

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml

Check warning on line 481 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

481:121 [line-length] line too long (140 > 120 characters)
general:check-formatting:
desc: Check basic formatting style of all files
cmds:
Expand All @@ -491,7 +489,7 @@
fi
- ec

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml

Check warning on line 492 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

492:121 [line-length] line too long (127 > 120 characters)
general:check-spelling:
desc: Check for commonly misspelled words
deps:
Expand All @@ -499,7 +497,7 @@
cmds:
- poetry run codespell

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-files-task/Taskfile.yml

Check warning on line 500 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

500:121 [line-length] line too long (127 > 120 characters)
general:check-symlinks:
desc: Check for bad symlinks
cmds:
Expand All @@ -526,7 +524,7 @@
false
}

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml

Check warning on line 527 in Taskfile.yml

View workflow job for this annotation

GitHub Actions / Generate problem matcher output

527:121 [line-length] line too long (127 > 120 characters)
general:correct-spelling:
desc: Correct commonly misspelled words where possible
deps:
Expand Down
Loading