docs: improve 'install from sources' section (#5050)
This commit is contained in:
		
							parent
							
								
									59562859b5
								
							
						
					
					
						commit
						094668e305
					
				@ -132,31 +132,26 @@ Colored output:
 | 
				
			|||||||
docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} golangci-lint run -v
 | 
					docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} golangci-lint run -v
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Install from Source
 | 
					### Install from Sources
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Note: such `go install`/`go get` installation aren't guaranteed to work. We recommend using binary installation.
 | 
					Such `go install`/`go get` or "tools pattern" installations aren't guaranteed to work.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<details>
 | 
					We recommend using binary installation.
 | 
				
			||||||
<summary>Why?</summary>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
`go install`/`go get` installation isn't recommended because of the following points:
 | 
					Those installations aren't recommended because of the following points:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. Some users use `-u` flag for `go get`, which upgrades our dependencies. Resulting configuration wasn't tested and isn't guaranteed to work.
 | 
					1. Those installations are compiling golangci-lint locally, the Go version used to build will depend on your local Go version.
 | 
				
			||||||
2. [`go.mod`](https://github.com/golangci/golangci-lint/blob/master/go.mod) replacement directive doesn't apply. It means a user will be using patched version of `golangci-lint` if we use such replacements.
 | 
					2. Some users use `-u` flag for `go get`, which upgrades our dependencies. Resulting binary was not tested and is not guaranteed to work.
 | 
				
			||||||
3. We've encountered a lot of issues with Go modules hashes.
 | 
					3. When using "tools pattern", the dependencies of a tool can modify the dependencies of another. Resulting binary was not tested and is not guaranteed to work.
 | 
				
			||||||
4. It allows installation from `master` branch which can't be considered stable.
 | 
					4. We've encountered issues with Go modules hashes due to unexpected recreation of dependency tags.
 | 
				
			||||||
5. It's slower than binary installation.
 | 
					5. `go.mod` replacement directives don't apply transitively. It means a user will be using patched version of `golangci-lint` if we use such replacements.
 | 
				
			||||||
 | 
					6. It allows installation from main branch which can't be considered stable.
 | 
				
			||||||
</details>
 | 
					7. It's slower than binary installation.
 | 
				
			||||||
 | 
					 | 
				
			||||||
<div style="margin-top: 2em;">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@{.LatestVersion}
 | 
					go install github.com/golangci/golangci-lint/cmd/golangci-lint@{.LatestVersion}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Next
 | 
					## Next
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Quick Start: how to use `golangci-lint`](/welcome/quick-start/).
 | 
					[Quick Start: how to use `golangci-lint`](/welcome/quick-start/).
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user