Comments (4)
Looks like go-critic was built with go1.22-20230908-RC04
which is...not something stable. This even isn't an official RC from what I understand. Fixing for this specific version is whac-a-mole game.
from go-critic.
Minimal reproduction:
package main
import "os"
func main() {
os.Exit(1)
}
$ gocritic check pnc.go
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x60316a]
goroutine 44 [running]:
go/types.(*Checker).handleBailout(0xc0003d2000, 0xc00056dba0)
/usr/lib/google-golang/src/go/types/check.go:339 +0x88
panic({0x7eb1c0?, 0xb53f60?})
...
package main
import "os"
func main() {
// os.Exit(1)
}
$ gocritic check pnc.go
$ # all good
from go-critic.
from go-critic.
Can you check that this works with Go 1.22 RC 2, please?
from go-critic.
Related Issues (20)
- sloppyTestFuncName incorrectly identifies helper function HOT 2
- new check: find identical condition
- bug: `rangeValCopy` still panics on code with generics HOT 3
- new check: I/O find close twice HOT 1
- go1.21: load embedded ruleguard rules: rules/rules.go:13: can't load fmt HOT 14
- unlambda: false positive HOT 1
- timeCmpSimplify: false positive, not before is unequal to after HOT 2
- dynamicFmtString: use rather fix errors.New than fmt.Errorf("%s" HOT 2
- new check: detect unnecessary gomock controller Finish call HOT 1
- emptyStringTest: handle len(s) > 0
- Please elaborate docs for `hugeParam`: Why 80 as default? HOT 4
- Disabling a non-existant check should not be a fatal error HOT 4
- deferUnlambda: False positive for mutated variable HOT 2
- Upgrade to golang 1.22 HOT 1
- explicitly enabled check is disabled by tag HOT 2
- feature request: able to disable `hugeParam` for some structs via `.golangci.yaml` HOT 2
- check/importShadow: panic due to concurrent access of `PkgObjects` map HOT 15
- regexpSimplify gives an incorrect simplification for `(foo|)`.
- Disable lint for a line of code. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-critic.