mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
* Updating advice
Copying 18764e6cbb/.github/actions/spelling/advice.md
* Update exclusions
* sort exclusions
* exclude .filters files based on updated engine suggestions
* exclude src/modules/previewpane/UnitTests-MarkdownPreviewHandler/HelperFiles/MarkdownWithHTMLImageTag.txt based on updated engine suggestions
* Upgrade check-spelling to v0.0.20-alpha3
Updates patterns to better handle guids
closes #14854
Adds a couple of other patterns:
* publicKeyToken
* @sha256:
* std::wregex
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
|
|
name: Spell checking
|
|
on:
|
|
pull_request_target:
|
|
push:
|
|
branches: ["**"]
|
|
tags-ignore: ["**"]
|
|
|
|
jobs:
|
|
spelling:
|
|
name: Spell checking
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
outputs:
|
|
internal_state_directory: ${{ steps.spelling.outputs.internal_state_directory }}
|
|
runs-on: ubuntu-latest
|
|
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
|
|
concurrency:
|
|
group: spelling-${{ github.event.pull_request.number || github.ref }}
|
|
# note: If you use only_check_changed_files, you do not want cancel-in-progress
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: checkout-merge
|
|
if: "contains(github.event_name, 'pull_request')"
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: refs/pull/${{github.event.pull_request.number}}/merge
|
|
- name: checkout
|
|
if: github.event_name == 'push'
|
|
uses: actions/checkout@v2
|
|
- name: check-spelling
|
|
id: spelling
|
|
uses: check-spelling/check-spelling@v0.0.20-alpha3
|
|
with:
|
|
config: .github/actions/spell-check
|
|
suppress_push_for_open_pull_request: 1
|
|
post_comment: 0
|
|
extra_dictionaries:
|
|
cspell:filetypes/filetypes.txt
|
|
cspell:html/html.txt
|
|
cspell:css/css.txt
|
|
check_extra_dictionaries: ''
|
|
- name: store-comment
|
|
if: failure()
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
retention-days: 1
|
|
name: "check-spelling-comment-${{ github.run_id }}"
|
|
path: |
|
|
${{ steps.spelling.outputs.internal_state_directory }}
|
|
|
|
comment:
|
|
name: Comment
|
|
runs-on: ubuntu-latest
|
|
needs: spelling
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
if: always() && needs.spelling.result == 'failure' && needs.spelling.outputs.internal_state_directory
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
- name: set up
|
|
run: |
|
|
mkdir /tmp/data
|
|
- name: retrieve-comment
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: "check-spelling-comment-${{ github.run_id }}"
|
|
path: /tmp/data
|
|
- name: comment
|
|
uses: check-spelling/check-spelling@v0.0.20-alpha3
|
|
with:
|
|
custom_task: comment
|
|
internal_state_directory: /tmp/data
|