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

feat(docs-linter): add lint for local links #2416

Merged
merged 34 commits into from
Jun 28, 2024

Conversation

leohhhn
Copy link
Contributor

@leohhhn leohhhn commented Jun 21, 2024

Description

This PR improves the docs linter by adding a os.Stat check for local files. It will notify the user if a link to a local file is broken by trying to find the file in question on the filesystem.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.71%. Comparing base (f547d7d) to head (04081ac).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2416   +/-   ##
=======================================
  Coverage   54.70%   54.71%           
=======================================
  Files         583      583           
  Lines       78499    78499           
=======================================
+ Hits        42944    42947    +3     
+ Misses      32347    32344    -3     
  Partials     3208     3208           
Flag Coverage Δ
contribs/gnodev 23.81% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
contribs/gnokeykc 0.00% <ø> (ø)
contribs/gnomd 0.00% <ø> (ø)
gno.land 62.54% <ø> (ø)
misc/autocounterd 0.00% <ø> (ø)
misc/genproto 0.00% <ø> (ø)
misc/genstd 73.90% <ø> (ø)
misc/goscan 0.00% <ø> (ø)
misc/logos 17.38% <ø> (ø)
misc/loop 0.00% <ø> (ø)
tm2 54.45% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leohhhn leohhhn added the 📖 documentation Improvements or additions to documentation label Jun 21, 2024
@leohhhn leohhhn marked this pull request as ready for review June 21, 2024 18:53
@leohhhn leohhhn requested review from a team and moul as code owners June 21, 2024 18:53
@leohhhn leohhhn requested review from thehowl and removed request for a team June 21, 2024 18:53
@leohhhn leohhhn changed the title docs(linter): add lint for local links misc(docs-linter): add lint for local links Jun 21, 2024
@leohhhn leohhhn changed the title misc(docs-linter): add lint for local links feat(docs-linter): add lint for local links Jun 21, 2024
Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Seems like a sound change. I've left a few comments that should addressed before merging but all good other than that 👍

misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/urls.go Show resolved Hide resolved
misc/docs-linter/urls.go Outdated Show resolved Hide resolved
misc/docs-linter/main.go Outdated Show resolved Hide resolved
@leohhhn leohhhn requested a review from ajnavarro as a code owner June 24, 2024 17:11
misc/docs-linter/links.go Outdated Show resolved Hide resolved
misc/docs-linter/urls.go Outdated Show resolved Hide resolved
@leohhhn leohhhn mentioned this pull request Jun 25, 2024
7 tasks
leohhhn added a commit that referenced this pull request Jun 25, 2024
<!-- please provide a detailed description of the changes made in this
pull request. -->

## Description

This PR fixes a few broken links in the docs, cherry-picked from #2416.

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
@leohhhn leohhhn added the don't merge Please don't merge this functionality temporarily label Jun 28, 2024
@leohhhn leohhhn removed the don't merge Please don't merge this functionality temporarily label Jun 28, 2024
@leohhhn leohhhn merged commit 10a6f7e into gnolang:master Jun 28, 2024
109 checks passed
@leohhhn leohhhn deleted the docs/linter-files branch June 28, 2024 12:52
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
<!-- please provide a detailed description of the changes made in this
pull request. -->

## Description

This PR fixes a few broken links in the docs, cherry-picked from gnolang#2416.

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
<!-- please provide a detailed description of the changes made in this
pull request. -->

## Description

This PR improves the docs linter by adding a `os.Stat` check for local
files. It will notify the user if a link to a local file is broken by
trying to find the file in question on the filesystem.

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>

---------

Co-authored-by: deelawn <dboltz03@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants