[#6] noliteral: fix tests

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2023-08-01 14:40:00 +03:00
parent 2942b612a8
commit a1a45f5368
3 changed files with 3 additions and 14 deletions

View file

@ -12,6 +12,8 @@ import (
) )
func TestAnalyzer_negative(t *testing.T) { func TestAnalyzer_negative(t *testing.T) {
const countNegativeCases = 4
_, filename, _, _ := runtime.Caller(0) _, filename, _, _ := runtime.Caller(0)
dir := filepath.Dir(filename) dir := filepath.Dir(filename)
@ -32,7 +34,7 @@ func TestAnalyzer_negative(t *testing.T) {
_, err = run(pass) _, err = run(pass)
if Count != 6 { if Count != countNegativeCases {
t.Fail() t.Fail()
} }
if err != nil { if err != nil {

View file

@ -17,15 +17,6 @@ func (c *cfg) error_n() {
c.log.Error("logs.MSG") //unacceptable c.log.Error("logs.MSG") //unacceptable
} }
func (c *cfg) reportFlushError_n() {
c.log.reportFlushError("logs.MSG") //unacceptable
}
func (c *cfg) reportError_n() {
c.log.reportError("logs.MSG") //unacceptable
}
type Logger interface { type Logger interface {
Debug(msg string) Debug(msg string)

View file

@ -24,10 +24,6 @@ func (c *cfg) custom_ok_lit() {
c.log.Abyr("logs.MSG") //acceptable c.log.Abyr("logs.MSG") //acceptable
} }
func (c *cfg) custom_ok_lit() {
log.Abyr("logs.MSG") //acceptable
}
type Logger interface { type Logger interface {
Debug(msg string) Debug(msg string)
Info(msg string) Info(msg string)