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

orphaned-content check isn't discovering all orphaned files, including files that are missing from any TOCs #521

Open
ScriptAutomate opened this issue Feb 15, 2025 · 1 comment · May be fixed by #522
Labels
bug Something isn't working

Comments

@ScriptAutomate
Copy link

Describe the bug

tests/orphaned-content.py isn't actually discovering all files that are unlinked or mislinked across the repository, and isn't ensuring that the TOCs are including all files in the repository.

To Reproduce

  1. Run python tests/orphaned-content.py
  2. See only single result that hasn't been addressed: ./src/deployment-guides/img/tpsm-ag-on-vsphere/new-project-sup-svcs.png
  3. Try a simple grep to see whether any document references some files:
    • find src/ -name 'tpsm-ag-on-vsphere-dep.md' && grep -irsn 'tpsm-ag-on-vsphere-dep.md' src/
    • find src/ -name 'tap-on-tkgi.md' && grep -irsn 'tap-on-tkgi.md' src/
    • find src/ -name 'tko-data-protection.md' && grep -irsn 'tko-data-protection.md' src/
    • etc.
  4. See that the files, though they indeed exist, aren't being linked to from anywhere else

Expected behavior

That all these files should be failing the tests/orphaned-content.py tests.

Not only that, but this repo claims a TOC at src/toc.md. Many of the files throughout the repository are not listed in this TOC, and it appears that their are many other TOC files (./src/toc-air-gap.md, ./src/toc-edge.md, etc.).

If you combine all the links within this TOC files, there still are several files that aren't linked to from any of these TOCs. Missing links to non-TOC MD files should be surfaced. If the repo is meant to be used differently, and these TOCs aren't meant to function as I believe they do, than the repo documentation should be expanded to help reflect this.

@ScriptAutomate ScriptAutomate added the bug Something isn't working label Feb 15, 2025
@ScriptAutomate
Copy link
Author

This is something I can work on, and will submit a PR for.

ScriptAutomate added a commit to ScriptAutomate/tanzu-validated-solutions that referenced this issue Feb 15, 2025
ScriptAutomate added a commit to ScriptAutomate/tanzu-validated-solutions that referenced this issue Feb 15, 2025
@ScriptAutomate ScriptAutomate linked a pull request Feb 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant