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

build: have vale lint only run on affected files #30378

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- id: files
uses: jitterbit/get-changed-files@v1
Copy link
Member

Choose a reason for hiding this comment

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

I don't have any alternative to offer right now, but jitterbit/get-changed-files#55 and the lack of recent activity in that repo might be issues worth considering.

Copy link
Contributor

@michelle-purcell michelle-purcell Jan 16, 2023

Choose a reason for hiding this comment

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

@maxandersen &@famod -

On my sandbox, I tested the exact Vale configuration that is suggested in this PR and added yaml gradle dev ..bad stuff to catch vale! to line 58 in one file doc-contribute-docs-howto.adoc.

The jitterbit et al config updates in this PR work perfectly afaics! The Vale Job in the same PR containing 1 edited adoc file now only takes 2 seconds instead of 1minute and 5 seconds!! Super job 👍 Thank you for your help to tweak this.

I also submitted PR #30397 to target main with some tweaks to rules and the vale.ini as per the discussion above. Most of the config is optional and was specific to another project that checked .rst, properties, markdown and other doc source formats.

Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest using a fork of that action which doesn't use the deprecated set-output command: jitterbit/get-changed-files#55 (comment)
(at least until the original action shows signs of improvement)

Copy link
Contributor

@michelle-purcell michelle-purcell Jan 17, 2023

Choose a reason for hiding this comment

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

@famod & @maxandersen - FYI - The Vale GitHub action issue was just updated to report that a fix "should be out next week." The same contributor is also working on a performance fix relating to Vale unnecessarily running all files when the config is set to report only problems with the diff. 🤞 # 82.

Copy link
Member Author

Choose a reason for hiding this comment

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

@michelle-purcell got a link to that issue? if the vale github action is being updated we might just wait for that...

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

okey so the fix they plan on next week is to just having the fail on error issue.

so i would say we merge what we have to getthe doc check to be much faster.

with:
format: 'json'
- name: Vale Linter
continue-on-error: true
uses: errata-ai/vale-action@reviewdog
with:
fail_on_error: false
vale_flags: "--no-exit --config=docs/.vale.ini"
filter_mode: diff_context
files: docs/src/main/asciidoc/
files: ${{ steps.files.outputs.added_modified }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}