Skip to content

docs: new website #5965

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 21 commits into from
Aug 9, 2025
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See [contributing quick start](https://golangci-lint.run/contributing/quick-start/) on our website.
See [contributing quick start](https://golangci-lint.run/docs/contributing/) on our website.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ body:
required: true
- label: Yes, I've searched similar [issues on GitHub](https://github.com/golangci/golangci-lint/issues) and didn't find any.
required: true
- label: Yes, I've read the `typecheck` section of the [FAQ](https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors).
- label: Yes, I've read the `typecheck` section of the [FAQ](https://golangci-lint.run/docs/welcome/faq/#why-do-you-have-typecheck-errors).
Copy link
Member

Choose a reason for hiding this comment

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

I don't know too much about Hugo but is this new /docs part of the path due to the folder being docs? Can it be removed? As far as I can tell the only page not under /docs is the landing page. If we could drop /docs which is basically the whole site content less links would be broken and URLs would be shorter.

Copy link
Member Author

Choose a reason for hiding this comment

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

The /docs is related to the theme, but this is something positive because we also have /blog, so we will be able to publish tutorials, announcements, etc.

Copy link
Member Author

@ldez ldez Aug 9, 2025

Choose a reason for hiding this comment

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

Also, globally, all the themes have a landing page and /docs/.
I spent a lot of time looking for themes: it was a recurring task for 2 years.
I dug into GitHub and obscure websites, and good themes are extremely rare.

To define what I call a "good theme":

  • good looking
  • good internal design (maintainability and extensibility)
  • Uses go modules and not git submodules
  • No need for npm
  • Maintained

required: true
- label: Yes, I've tried with the standalone [linter](https://golangci-lint.run/usage/linters/) if available (e.g., gocritic, go vet, etc.).
- label: Yes, I've tried with the standalone [linter](https://golangci-lint.run/docs/linters/) if available (e.g., gocritic, go vet, etc.).
required: true
- label: I agree to follow this project's [Code of Conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file)
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ firstPRWelcomeComment: Hey, thank you for opening your first Pull Request !
# Comment to be posted to on first time issues
firstIssueWelcomeComment: >
Hey, thank you for opening your first Issue ! 🙂
If you would like to contribute we have a [guide for contributors](https://golangci-lint.run/contributing/quick-start/).
If you would like to contribute we have a [guide for contributors](https://golangci-lint.run/docs/contributing/).
2 changes: 1 addition & 1 deletion .github/new-linter-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order for a pull request adding a linter to be reviewed, the linter and the P
- [ ] It must have a valid license (AGPL is not allowed), and the file must contain the required information by the license, ex: author, year, etc.
- [ ] It must use Go version <= 1.22.0
- [ ] The linter repository must have a CI and tests.
- [ ] It must use [`go/analysis`](https://golangci-lint.run/contributing/new-linters/).
- [ ] It must use [`go/analysis`](https://golangci-lint.run/docs/contributing/new-linters/).
- [ ] It must have a valid tag, ex: `v1.0.0`, `v0.1.0`.
- [ ] It must not contain `init()`.
- [ ] It must not contain `panic()`.
Expand Down
2 changes: 1 addition & 1 deletion .github/peril/rules/invite-collaborator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Hey, @${username} — we just merged your PR to \`golangci-lint\`! 🔥🚀
This will add you to our team of maintainers. Accept the invite by visiting [this link](https://github.com/orgs/golangci/invitation).
By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.
More information about contributing is [here](https://golangci-lint.run/contributing/quick-start/).
More information about contributing is [here](https://golangci-lint.run/docs/contributing/).
Thanks again!
`;
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,31 @@ jobs:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
GO_VERSION: '1.24'
NODE_VERSION: '20.x'
HUGO_VERSION: 0.148.1
CGO_ENABLED: 0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: docs/package-lock.json

- run: go mod download

- run: npm install --legacy-peer-deps
working-directory: ./docs
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb

- name: Build Documentation
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
working-directory: ./docs
run: npm run build
run: |
hugo \
--gc --minify \
--baseURL "https://golangci-lint.run/"

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/pr-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,29 @@ jobs:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
GO_VERSION: '1.24'
NODE_VERSION: '20.x'
HUGO_VERSION: 0.148.1
CGO_ENABLED: 0

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: docs/package-lock.json

- run: go mod download

- run: npm install --legacy-peer-deps
working-directory: ./docs
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb

- name: Build Documentation
run: npm run build
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
working-directory: ./docs
run: |
hugo \
--gc --minify \
--baseURL "https://golangci-lint.run/"
2 changes: 1 addition & 1 deletion .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: "2"
linters:
# Default set of linters.
# The value can be:
# - `standard`: https://golangci-lint.run/usage/linters/#enabled-by-default
# - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default
# - `all`: enables all linters by default.
# - `none`: disables all linters by default.
# - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).
Expand Down
2 changes: 1 addition & 1 deletion .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: "2"
linters:
# Default set of linters.
# The value can be:
# - `standard`: https://golangci-lint.run/usage/linters/#enabled-by-default
# - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default
# - `all`: enables all linters by default.
# - `none`: disables all linters by default.
# - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ release:
header: |
`golangci-lint` is a free and open-source project built by volunteers.
If you value it, consider supporting us, the [maintainers](https://opencollective.com/golangci-lint) and [linter authors](https://golangci-lint.run/product/thanks/).
If you value it, consider supporting us, the [maintainers](https://donate.golangci.org) and [linter authors](https://golangci-lint.run/docs/product/thanks/).
We appreciate it! :heart:
For key updates, see the [changelog](https://golangci-lint.run/product/changelog/#{{ .Major }}{{ .Minor }}{{ .Patch }}).
For key updates, see the [changelog](https://golangci-lint.run/docs/product/changelog/#{{ .Major }}{{ .Minor }}{{ .Patch }}).
source:
enabled: true
Expand Down
47 changes: 23 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint)

`golangci-lint` is a free and open-source project built by volunteers.

If you value it, consider supporting us, we appreciate it! ❤️
If you value it, consider supporting us, we appreciate it!

[![Open Collective backers and sponsors](https://img.shields.io/badge/OpenCollective-Donate-blue?logo=opencollective&style=for-the-badge)](https://opencollective.com/golangci-lint)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Donate-blue?logo=github&style=for-the-badge)](https://github.com/sponsors/golangci)
[![Donate](https://img.shields.io/badge/Donate-❤️-blue?style=for-the-badge)](https://donate.golangci.org)

### v2.3.1

Expand Down Expand Up @@ -191,20 +190,20 @@ The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Do
### v2.0.0

1. Enhancements
* 🌟 New `golangci-lint fmt` command with dedicated [formatter configuration](https://golangci-lint.run/welcome/quick-start/#formatting)
* ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#command-migrate))
* ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
* ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default))
* ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#outputsort-order))
* 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode))
* 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#linters))
* 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#output))
* 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersfast))
* 🌟 New `golangci-lint fmt` command with dedicated [formatter configuration](https://golangci-lint.run/docs/welcome/quick-start/#formatting)
* ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#command-migrate))
* ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/))
* ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#issuesexclude-use-default))
* ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#outputsort-order))
* 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#runrelative-path-mode))
* 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#linters))
* 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#output))
* 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#lintersfast))
* 🌟 New option `linters.exclusions.warn-unused` to log a warning if an exclusion rule is unused.
2. New linters/formatters
* Add `golines` formatter https://github.com/segmentio/golines
3. Linters new features
* ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck))
* ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck))
* `go-critic`: from 0.12.0 to 0.13.0
* `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect dependencies)
* `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`)
Expand All @@ -224,11 +223,11 @@ The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Do
* `protogetter`: from 0.3.9 to 0.3.12
* `unparam`: from 8a5130ca722f to 0df0534333a4
5. Misc.
* 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
* 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
* 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
* 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names))
* 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
* 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/))
* 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/))
* 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/))
* 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#alternative-linter-names))
* 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/))
* Adds an option to display some commands as JSON:
* `golangci-lint config path --json`
* `golangci-lint help linters --json`
Expand All @@ -237,7 +236,7 @@ The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Do
* `golangci-lint formatters --json`
* `golangci-lint version --json`
6. Documentation
* [Migration guide](https://golangci-lint.run/product/migration-guide/)
* [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)

### v1.64.8

Expand Down Expand Up @@ -636,7 +635,7 @@ Cancelled due to a CI problem.
* Keep only `typecheck` issues when needed
* Don't hide `typecheck` errors inside diff processor
5. Misc.
* ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle))
* ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/docs/product/roadmap/#linter-deprecation-cycle))
* [`deadcode`](https://github.com/remyoudompheng/go-misc/tree/HEAD/deadcode): deprecated since v1.49.0 (2022-08-23).
* [`exhaustivestruct`](https://github.com/mbilski/exhaustivestruct): deprecated since v1.46.0 (2022-05-08).
* [`golint`](https://github.com/golang/lint): deprecated since v1.41.0 (2021-06-15).
Expand Down Expand Up @@ -710,7 +709,7 @@ GitHub Action (v5.1.0) for golangci-lint:
* `wrapcheck`: from 2.8.1 to 2.8.3
* Disable `copyloopvar` and `intrange` on Go < 1.22
3. Enhancements
* 🧩New custom linters system https://golangci-lint.run/plugins/module-plugins/
* 🧩New custom linters system https://golangci-lint.run/docs/plugins/module-plugins/
* Allow running only a specific linter without modifying the file configuration (`--enable-only`)
* Allow custom sort order for the reports (`output.sort-order`)
* Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
Expand All @@ -730,7 +729,7 @@ GitHub Action (v5.1.0) for golangci-lint:
* Improve 'no go files to analyze' message
* Use `GOTOOLCHAIN=auto` inside the Docker images
5. Documentation
* ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* ⚠️ Define the linter deprecation cycle https://golangci-lint.run/docs/product/roadmap/#linter-deprecation-cycle
* 🎉Use information from the previous release to create linter pages
* Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
* Reorganize documentation pages
Expand Down Expand Up @@ -1665,8 +1664,8 @@ IMPORTANT: `varcheck` and `deadcode` has been removed of default linters.
* `wastedassign`: bump to v0.2.0
* `wrapcheck`: bump to v1.0.0
3. documentation:
* improve [linters page](https://golangci-lint.run/usage/linters/) (versions, deprecation, and presets)
* add [cache directory](https://golangci-lint.run/usage/configuration/#cache) information
* improve [linters page](https://golangci-lint.run/docs/linters/) (versions, deprecation, and presets)
* add [cache directory](https://golangci-lint.run/docs/configuration/cli/#cache) information
* adding missing format options
* fix typos
4. Misc:
Expand Down
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ hyperfine:
$(BINARY): FORCE
go build -o $@ ./cmd/golangci-lint

docs/static/demo.gif: FORCE
vhs docs/golangci-lint.tape

assets/github-action-config.json: FORCE $(BINARY)
# go run ./scripts/gen_github_action_config/main.go $@
cd ./scripts/gen_github_action_config/; go run . ../../$@
Expand All @@ -102,6 +99,23 @@ go.mod: FORCE
go mod verify
go.sum: go.mod

# Documentation

docs_serve:
@make -C ./docs serve
.PHONY: docs_serve

docs_reset:
@make -C ./docs reset
.PHONY: docs_reset

docs_clean:
@make -C ./docs clean
.PHONY: docs_clean

docs/static/demo.gif: FORCE
vhs docs/golangci-lint.tape

website_copy_jsonschema:
go run ./scripts/website/copy_jsonschema/
.PHONY: website_copy_jsonschema
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ integrates with all major IDEs, and includes over a hundred linters.

## Install `golangci-lint`

- [On my machine](https://golangci-lint.run/welcome/install/#local-installation);
- [On CI/CD systems](https://golangci-lint.run/welcome/install/#ci-installation).
- [On my machine](https://golangci-lint.run/docs/welcome/install/#local-installation);
- [On CI/CD systems](https://golangci-lint.run/docs/welcome/install/#ci-installation).

## Documentation

Expand All @@ -31,7 +31,7 @@ Documentation is hosted at https://golangci-lint.run.

[![Open Collective backers and sponsors](https://img.shields.io/badge/OpenCollective-Donate-blue?logo=opencollective&style=for-the-badge)](https://opencollective.com/golangci-lint)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Donate-blue?logo=github&style=for-the-badge)](https://github.com/sponsors/golangci)
[![Linter Authors](https://img.shields.io/badge/Linter_Authors-Donate-blue?style=for-the-badge)](https://golangci-lint.run/product/thanks/)
[![Linter Authors](https://img.shields.io/badge/Linter_Authors-Donate-blue?style=for-the-badge)](https://golangci-lint.run/docs/product/thanks/)

`golangci-lint` is a free and open-source project built by volunteers.

Expand All @@ -47,7 +47,7 @@ If you value it, consider supporting us, we appreciate it! :heart:

## Contributors

This project exists thanks to all the people who contribute. [How to contribute](https://golangci-lint.run/contributing/quick-start/).
This project exists thanks to all the people who contribute. [How to contribute](https://golangci-lint.run/docs/contributing/).

<a href="https://github.com/golangci/golangci-lint/graphs/contributors">
<img src="https://opencollective.com/golangci-lint/contributors.svg?width=890&button=false&skip=golangcidev,CLAassistant,renovate,fossabot,golangcibot,kortschak,golangci-releaser,dependabot%5Bbot%5D" />
Expand Down
Loading
Loading