Skip to content

initial commit#34

Open
jfaurskov wants to merge 12 commits intoAzure:mainfrom
jfaurskov:codereview
Open

initial commit#34
jfaurskov wants to merge 12 commits intoAzure:mainfrom
jfaurskov:codereview

Conversation

@jfaurskov
Copy link
Copy Markdown
Collaborator

Add pipeline and linters for link and linting

Copilot AI review requested due to automatic review settings March 24, 2026 15:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-review GitHub Actions workflow running Super-Linter and Linkspector on PRs to main
  • 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
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
#YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yml
#YAMLLINT_CONFIG_FILE: .github/linters/.yaml-lint.yml

Copilot uses AI. Check for mistakes.
#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines No newline at end of file
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
blank_lines: false # Error on blank lines
blank_lines: false # Disable rules related to blank lines

Copilot uses AI. Check for mistakes.
---
name: Code Review - Linting & Link Checks

on:
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:.

Suggested change
on:
on: # yamllint disable-line rule:truthy

Copilot uses AI. Check for mistakes.
line-length:
max: 900
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: false No newline at end of file
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
allow-non-breakable-inline-mappings: false
allow-non-breakable-inline-mappings: false
truthy: disable

Copilot uses AI. Check for mistakes.

steps:
- name: Checkout code
uses: actions/checkout@master
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
uses: actions/checkout@master
uses: actions/checkout@v4

Copilot uses AI. Check for mistakes.
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1.3.4
with:
github_token: ${{ secrets.github_token }}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
github_token: ${{ secrets.github_token }}
github_token: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants