I'm using the linter to restrict the GORM Raw method. I run the linter with golangci-lint 1.53.2. The forbidigo configuration is:
forbidigo:
analyze-types: true
forbid:
- p: gorm.DB.Raw
msg: Example message.
Running the linter on the following example code it recognizes the first two instances but not the last one:
var db *gorm.DB
_ = db.Raw("...")
_ = db.Session(nil).Raw("...")
_ = db.Raw("...").Error
I'm using the linter to restrict the GORM Raw method. I run the linter with golangci-lint 1.53.2. The forbidigo configuration is:
Running the linter on the following example code it recognizes the first two instances but not the last one: