Skip to content

docs: reorganize configuration files #5048

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 2 commits into from
Sep 29, 2024
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Sep 27, 2024

Reorganize the configuration references (and the configuration) to improve readability.

Before:

  • run
  • output
  • linters-settings
  • linters
  • issues
  • severity

After:

  • linters
  • linters-settings
  • issues
  • output
  • run
  • severity

@ldez ldez added enhancement New feature or improvement area: docs labels Sep 27, 2024
@ldez ldez added this to the next milestone Sep 27, 2024
@ldez ldez changed the title docs: Reorganize the configuration files docs: reorganize configuration files Sep 27, 2024
@ldez ldez force-pushed the docs/config-order branch from ca7a80c to 96d1d43 Compare September 27, 2024 21:26
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

Having linters before linters settings sounds very reasonable although for me personally I think general golangci-lint specific configuration starting at LOC 2000 is very far down and that linters and linters setting should come last.

But it's not a very strong opinion so go for it!

@ldez
Copy link
Member Author

ldez commented Sep 29, 2024

My logic was "new user" related:

  • first, you choose your linters
  • then you configure linters
  • then you apply exclusions
  • then you customize the output
  • then you increase your timeout
  • then you don't use severities 😸

But each section will still be split inside the doc of the configuration https://golangci-lint.run/usage/configuration/

So this has just a light impact.

@bombsimon
Copy link
Member

  • then you don't use severities 😸

Haha, this one was the best one!

I get your reasoning around adding and configuring linters, linters settings and exclusions first. And for proper documentation I don't think reading the reference config with thousands of lines is the best anyway.

@ldez ldez merged commit 88c8a68 into golangci:master Sep 29, 2024
16 checks passed
@ldez ldez deleted the docs/config-order branch September 29, 2024 19:32
@ldez ldez modified the milestones: next, v1.62 Nov 10, 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.

2 participants