Skip to content

Refactors and warning for unlinked manuals#57

Draft
saecki wants to merge 5 commits intointegration-testsfrom
unlinked-manuals
Draft

Refactors and warning for unlinked manuals#57
saecki wants to merge 5 commits intointegration-testsfrom
unlinked-manuals

Conversation

@saecki
Copy link
Copy Markdown
Member

@saecki saecki commented Mar 23, 2026

Closes #50

Initially I just wanted to implement the warning for unlinked manuals/docs, which needs both information from the manifest and the readme. Looking at the code, I thought I'd just refactor the manifest and readme checks to generate output. That got a bit out of hand, and turned into quite large changes 😅

The fundamental refactors are:

  • A PackagePath struct that allows both retrieving the full path and the path relative to the package directory. This cleared things up quite a bit for me, because previously it was a little bit of a guessing game if a Path was relative or not.
  • A Spanned struct that wraps a value and associates it with a Range<usize>, which is extensively used when parsing the TOML manifest.
  • The manifest and readme checks return the parsed and validated information, which can be used in other checks.

I still think these refactors are worth while, and allow to more easily add more complex checks in the future.

@saecki saecki force-pushed the unlinked-manuals branch from 47ee740 to 0e822d4 Compare March 23, 2026 11:27
@saecki saecki force-pushed the unlinked-manuals branch 2 times, most recently from 6df53d7 to 112e149 Compare April 13, 2026 14:47
@saecki saecki force-pushed the unlinked-manuals branch from 112e149 to b51d628 Compare April 13, 2026 14:59
@saecki saecki changed the base branch from main to integration-tests April 13, 2026 15:05
@saecki
Copy link
Copy Markdown
Member Author

saecki commented Apr 13, 2026

I've rebased onto the integration-test branch, this PR should be merged #58.
The aero-navigator package already had an unlinked manual, so I didn't add any new reference tests.

Copy link
Copy Markdown
Member

@elegaanz elegaanz left a comment

Choose a reason for hiding this comment

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

Thank you so much for that PR, the code definitely looks much better now and will be much more pleasant to work with.

Comment thread src/check/path.rs
Comment thread src/check/manifest.rs Outdated
Comment thread src/check/manifest.rs
Comment thread src/check/files.rs Outdated
Comment thread src/check/imports.rs Outdated
@saecki saecki force-pushed the unlinked-manuals branch 2 times, most recently from 5c3747c to 025d5db Compare April 17, 2026 13:00
@saecki saecki marked this pull request as draft April 20, 2026 10:27
@saecki saecki force-pushed the unlinked-manuals branch from 025d5db to 5b350cd Compare April 20, 2026 12:54
@saecki saecki force-pushed the unlinked-manuals branch from 5b350cd to 2d2590e Compare April 20, 2026 12:59
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.

Warning for unlinked manual.pdf files

2 participants