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

Make the Vale prose linter required #47907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
30 changes: 9 additions & 21 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:

permissions:
contents: read
pull-requests: read

steps:
- name: Checkout
Expand Down Expand Up @@ -114,34 +115,21 @@ jobs:
working-directory: 'docs'
run: yarn markdown-lint

- name: Test the docs build
working-directory: docs
run: yarn build

stylecheck:
name: Lint docs prose style
runs-on: ubuntu-latest
needs: changes
if: ${{ !startsWith(github.head_ref, 'dependabot/') && needs.changes.outputs.changed == 'true' && github.event_name == 'pull_request' }}
permissions:
pull-requests: read
steps:
- name: Check out the teleport repo
uses: actions/checkout@v4
with:
repository: "gravitational/teleport"

- name: Run the linter
- name: Lint docs prose
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
with:
version: 2.30.0
version: 3.9.0
# Take the comma-separated list of files returned by the "Check for
# relevant changes" job.
separator: ","
separator: ','
workdir: '${{ github.workspace }}/docs/content/teleport'
files: ${{ needs.changes.outputs.changed_files }}
# Restrict the linter to lines modified/added by a PR, not entire
# changed files.
filter_mode: added
fail_on_error: true
vale_flags: "--config=docs/.vale.ini"
vale_flags: '--config=${{ github.workspace }}/docs/content/teleport/docs/.vale.ini'

- name: Test the docs build
working-directory: 'docs'
run: yarn build
1 change: 1 addition & 0 deletions docs/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ mdx = md

[*.md]
BasedOnStyles = messaging,examples,3rd-party-products,structure
CommentDelimiters = "{/*,*/}"
Loading