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

docs: add link on linter without configuration #4843

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ldez
Copy link
Member

@ldez ldez commented Jun 24, 2024

This PR creates an invisible span with ID to generate an anchor for all linter names.

Result:

Screenshot 2024-06-26 at 09-04-04 Linters golangci-lint

link example: http://localhost:8000/usage/linters/#bodyclose

This also fixes:

  • "back to the top" link for linter without repo (ex: lll)
  • the behavior of "back to the top" link when the repo icon is not on the same line as the linter name (ex: staticcheck)

Fixes #4841

@ldez ldez added enhancement New feature or improvement area: docs labels Jun 24, 2024
@ldez ldez added this to the next milestone Jun 24, 2024
@ldez ldez requested a review from Antonboom June 25, 2024 20:08
Copy link
Contributor

@Antonboom Antonboom left a comment

Choose a reason for hiding this comment

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

GitHub icon newlined somewhere
Screenshot 2024-06-26 at 08 54 53

"Top" button have underscore
Screenshot 2024-06-26 at 08 55 20


Also, offtop, in contribution guideline need to fix .reference to next.reference
Screenshot 2024-06-26 at 08 58 03

Maybe do it in this PR to not spam issues?

@ldez
Copy link
Member Author

ldez commented Jun 26, 2024

GitHub icon newlined somewhere

It's just related to the size of the cell, it's expected because it's a table and the icon is not a character, I cannot fix that.
FYI there is already a non-breakable space ( ) between the text and the icon.

"Top" button have underscore

It's not an underscore but a link decoration: the emoji is a character and not an image so the "text" of the link has a decoration.

Also, offtop, in contribution guideline need to fix .reference to next.reference

I updated the file name.

@ldez
Copy link
Member Author

ldez commented Jun 26, 2024

I replaced the emoji with an icon.

Before:
Screenshot 2024-06-26 at 08-34-28 Linters golangci-lint

After:
Screenshot 2024-06-26 at 08-34-18 Linters golangci-lint

@ldez ldez requested a review from Antonboom June 26, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: add a way to link linter without settings on the linter page
3 participants