Skip to content

docs: add link on linter without configuration #4843

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

Merged
merged 10 commits into from
Jul 3, 2024

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 force-pushed the feat/doc-links branch from e804e7f to c0aaf6c Compare June 24, 2024 16:51
@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 ldez force-pushed the feat/doc-links branch from c0aaf6c to 3fcc9ef Compare June 26, 2024 06:14
@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
@ldez
Copy link
Member Author

ldez commented Jul 1, 2024

ping @Antonboom

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.

It's just related to the size of the cell,

I just do not realize why we receive different column width in equal sections?

Screenshot 2024-07-03 at 09 50 50

@ldez
Copy link
Member Author

ldez commented Jul 3, 2024

I just do not realize why we receive different column width in equal sections?

because it's 2 separated tables.

@ldez ldez merged commit 7745be9 into golangci:master Jul 3, 2024
16 checks passed
@ldez ldez deleted the feat/doc-links branch July 3, 2024 11:29
@Antonboom
Copy link
Contributor

because it's 2 separated tables.

but why in the second one the description width is shorter? with equal rems

@ccoVeille
Copy link
Contributor

That's why we do backend. Because we have no patience for such mess and nonsense.

I don't understand how frontend can work without becoming insane 😁

@ldez
Copy link
Member Author

ldez commented Jul 3, 2024

but why in the second one the description width is shorter? with equal rems

Because the sizes of the cells are computed based on the size of the cells of one table.
As there are 2 tables, there are 2 different computations.
The 2 tables don't have the same content, so the cell sizes are different.

@ldez ldez modified the milestones: next, v1.60 Aug 14, 2024
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
4 participants