Skip to content

Checkers rst#7727

Open
khancyr wants to merge 3 commits into
ArduPilot:masterfrom
khancyr:checker
Open

Checkers rst#7727
khancyr wants to merge 3 commits into
ArduPilot:masterfrom
khancyr:checker

Conversation

@khancyr
Copy link
Copy Markdown
Contributor

@khancyr khancyr commented Apr 30, 2026

move check-ref-directives from update.py to pre-commit (gain 6s on build)
add another check on :ref: directives.
Add unittitest for both rst checks
make both rst check use pre-commit venv to run and not system one's.

tested locally with pre-commit run --all-files (all passed) and CI validate this also

@khancyr khancyr requested a review from peterbarker as a code owner April 30, 2026 10:44
@Hwurzburg
Copy link
Copy Markdown
Contributor

Hwurzburg commented Apr 30, 2026

does this mean those checks do not occur on local builds? I think that this means one would HAVE to run not only update.py but pre-commit to check local builds thoroughly before pushing as a PR to master, correct? would impact my workflow, but probably mainly only me

@khancyr
Copy link
Copy Markdown
Contributor Author

khancyr commented Apr 30, 2026

pre-commit should be part of the workflow anyway now, as we require it to pass CI. That is why I moved the check from update.py to pre-commit.
Another advantage is that is speed up a bit update.py so we need only one run with pre-commit to catch all the syntax mistakes

@Hwurzburg
Copy link
Copy Markdown
Contributor

@peterbarker ping

Copy link
Copy Markdown
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Does this mean you can make lots of changes and only discover there's a problem when you go to commit, rather than when you run update.py?

@khancyr
Copy link
Copy Markdown
Contributor Author

khancyr commented May 11, 2026

That is already the case, we have only one syntax check on update.py and it is not blocking, all other checks are on pre-commit call.
Notice that those check aren't failing sphinx build that why we added them.

If you prefer the other way, we could call pre-commit checks from update.py, that would and make it blocking. That would force the check to run without being too slow

@Hwurzburg
Copy link
Copy Markdown
Contributor

and there is a difference between server builds and local developer builds....AFAIAC, having update.py warnings for errors on local builds (no blocking to the site build locally) is fine....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants