Skip to content

Commit bb30bbe

Browse files
authored
docs: define linter deprecation cycle (#4474)
1 parent 167204c commit bb30bbe

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/src/docs/usage/install/index.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,29 @@ As such, we recommend using the fixed minor version and fixed or the latest patc
151151
For example, in our [GitHub Action](https://github.com/golangci/golangci-lint-action) we require users to explicitly set the minor version of `golangci-lint`
152152
and we always use the latest patch version.
153153

154+
## Linter Deprecation Cycle
155+
156+
A linter can be deprecated for various reasons, e.g. the linter stops working with a newer version of Go or the author has abandoned its linter.
157+
158+
The deprecation of a linter will follow 3 phases:
159+
160+
1. **Display of a warning message**: The linter can still be used (unless it's completely non-functional), but it's recommended to remove it from your configuration.
161+
2. **Display of an error message**: At this point, you should remove the linter. The original implementation is replaced by a placeholder that does nothing.
162+
3. **Removal of the linter** from golangci-lint.
163+
164+
Each phase corresponds to a minor version:
165+
166+
- v1.0.0 -> warning message
167+
- v1.1.0 -> error message
168+
- v1.2.0 -> linter removed
169+
170+
Otherwise, the deprecated linters are removed from presets immediately when they are deprecated (phase 1).
171+
172+
We will provide clear information about those changes on different supports: changelog, logs, social network, etc.
173+
174+
We consider the removal of a linter as non-breaking changes for golangci-lint itself.
175+
No major version will be created when a linter is removed.
176+
154177
## Next
155178

156179
[Quick Start: how to use `golangci-lint`](/usage/quick-start).

0 commit comments

Comments
 (0)