File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- # noreassign
1+ # reassign
22
33A linter that detects when reassigning a top-level variable in another package.
44
55## Install
66
77``` bash
8- go install github.com/curioswitch/go-noreassign
8+ go install github.com/curioswitch/go-reassign
99```
1010
1111## Usage
1212
1313``` bash
14- noreassign ./...
14+ reassign ./...
1515```
1616
1717Change the pattern to match against variables being reassigned. By default, only ` EOF ` and ` Err* ` variables are checked.
1818
1919``` bash
20- noreassign -pattern " .*" ./...
20+ reassign -pattern " .*" ./...
2121```
2222
2323## Background
Original file line number Diff line number Diff line change 1- package noreassign
1+ package reassign
22
33import (
4- "github.com/curioswitch/go-noreassign /internal/analyzer"
4+ "github.com/curioswitch/go-reassign /internal/analyzer"
55 "golang.org/x/tools/go/analysis"
66)
77
Original file line number Diff line number Diff line change 11package main
22
33import (
4- "github.com/curioswitch/go-noreassign /internal/analyzer"
4+ "github.com/curioswitch/go-reassign /internal/analyzer"
55 "golang.org/x/tools/go/analysis/singlechecker"
66)
77
Original file line number Diff line number Diff line change 1- module github.com/curioswitch/go-noreassign
1+ module github.com/curioswitch/go-reassign
22
33go 1.18
44
You can’t perform that action at this time.
0 commit comments