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

chore: check documentation lint #454

Merged
merged 1 commit into from
Sep 2, 2023
Merged

Conversation

Valentin271
Copy link
Member

@Valentin271 Valentin271 commented Aug 30, 2023

Description

Adds a check-doc job to the Makefile. This job checks for errors and warnings in the doc-comments.

Makefile structure

I've added a meta-job check that runs check-code and check-doc.
The check job is run in CI so now the pipelines would check for code and documentation.

check-code replaces the old check job.

For me this is not a breaking change as it concerns tooling and not public APIs. I've also checked every place the cargo check job could have been referenced.

Job implementation

I've used an unstable Rustdoc flag: --check, see here. Here is the tracking issue.

I've used cargo rustdoc instead of cargo doc to pass flags down to rustdoc.
I didn't use the env variable RUSTDOCFLAGS because cargo-make doesn't cleanup task scoped env after execution, so it would interfere with other jobs.


Fixes #451

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #454 (5b93ef0) into main (927a5d8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #454   +/-   ##
=======================================
  Coverage   90.03%   90.03%           
=======================================
  Files          40       40           
  Lines       11127    11127           
=======================================
  Hits        10018    10018           
  Misses       1109     1109           

@Valentin271
Copy link
Member Author

I've added a meta-job check that runs check-code and check-doc.
The check job is run in CI so now the pipelines would check for code and documentation.

check-code replaces the old check job.

For me this is not a breaking change as it concerns tooling and not public APIs. I've also checked every place the cargo check job could have been referenced.

This was failing in the pipeline since the check pipeline wasn't run with nightly.

I think putting check-doc makes more sense in the lint pipeline (style-check Makefile job).
It is already running nightly and only runs on ubuntu which is enough for checking documentation.

@joshka
Copy link
Member

joshka commented Sep 1, 2023

Thanks for the PR!

@joshka joshka added this pull request to the merge queue Sep 1, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to Branch Protection failures Sep 1, 2023
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@joshka joshka merged commit 5f6aa30 into ratatui:main Sep 2, 2023
@Valentin271 Valentin271 deleted the chore/check-doc branch September 2, 2023 15:53
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.

Check documentation build
2 participants