Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to run automated linting and markdown link checks on pull requests, along with repo-level linter configuration files to standardize lint behavior.
Changes:
- Add a
code-reviewGitHub Actions workflow running Super-Linter and Linkspector on PRs tomain - Add MarkdownLint and YAMLlint configuration under
.github/linters/ - Add Linkspector configuration under
.github/actions-config/
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
.github/workflows/code-review.yml |
New CI workflow for linting and link checking on PRs |
.github/linters/.yaml-lint.yml |
YAML lint rule configuration (line length, etc.) |
.github/linters/.markdown-lint.yml |
Markdown lint rule configuration |
.github/actions-config/.linkspector.yml |
Linkspector scan configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| VALIDATE_MARKDOWN: true | ||
| VALIDATE_POWERSHELL: true | ||
| VALIDATE_YAML: true | ||
| #YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml |
There was a problem hiding this comment.
This commented config path looks incorrect (.github/linters/.yamllint.yml), but the repo adds .github/linters/.yaml-lint.yml. Even though it's commented out, leaving the wrong path here is misleading when someone later enables it—update it to the actual config filename/path used in this repo.
| #YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml | |
| #YAMLLINT_CONFIG_FILE: .github/linters/.yaml-lint.yml |
| ################# | ||
| # Rules by tags # | ||
| ################# | ||
| blank_lines: false # Error on blank lines No newline at end of file |
There was a problem hiding this comment.
The inline comment contradicts the setting: blank_lines: false disables the blank_lines tag/rules, but the comment says it will error on blank lines. Update the comment (or the value) so the config is self-explanatory.
| blank_lines: false # Error on blank lines | |
| blank_lines: false # Disable rules related to blank lines |
| --- | ||
| name: Code Review - Linting & Link Checks | ||
|
|
||
| on: |
There was a problem hiding this comment.
This repo already suppresses yamllint's truthy rule for GitHub Actions triggers (see .github/workflows/wiki-sync.yml line 4) so that on: isn't flagged. Since this workflow will be linted too, add the same # yamllint disable-line rule:truthy (or quote the key) to prevent the YAML linter from failing on on:.
| on: | |
| on: # yamllint disable-line rule:truthy |
| line-length: | ||
| max: 900 | ||
| allow-non-breakable-words: true | ||
| allow-non-breakable-inline-mappings: false No newline at end of file |
There was a problem hiding this comment.
With YAML validation enabled, yamllint's default truthy rule typically flags GitHub Actions' on: keys unless they're quoted/disabled (you already handle this in wiki-sync.yml). Consider disabling the truthy rule in this repo-level .yaml-lint.yml so workflows like code-review.yml/code-test.yml don't need per-file suppressions.
| allow-non-breakable-inline-mappings: false | |
| allow-non-breakable-inline-mappings: false | |
| truthy: disable |
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@master |
There was a problem hiding this comment.
actions/checkout@master is a floating ref and can change unexpectedly (and is inconsistent with the v4 usage above). Pin this to a stable major tag (e.g. actions/checkout@v4) to avoid workflow breakages and supply-chain risk.
| uses: actions/checkout@master | |
| uses: actions/checkout@v4 |
| - name: Run linkspector | ||
| uses: umbrelladocs/action-linkspector@v1.3.4 | ||
| with: | ||
| github_token: ${{ secrets.github_token }} |
There was a problem hiding this comment.
secrets.github_token is not the standard built-in token name and is likely undefined (secrets are case-sensitive). For this action input, use the built-in ${{ secrets.GITHUB_TOKEN }} or ${{ github.token }} so the workflow can authenticate reliably.
| github_token: ${{ secrets.github_token }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |
Add pipeline and linters for link and linting