Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure on version 1.3.1 with go v1.20.2 #807

Closed
icp1994 opened this issue Mar 19, 2023 · 3 comments
Closed

Test failure on version 1.3.1 with go v1.20.2 #807

icp1994 opened this issue Mar 19, 2023 · 3 comments

Comments

@icp1994
Copy link

icp1994 commented Mar 19, 2023

Describe the bug
Same as title. I see that the latest version of Go that CI runs for the tests is 1.19.6 so maybe this is to be expected.

To Reproduce

$ git clone --depth=1 https://github.com/mgechev/revive
$ cd revive/
$ go test -race ./...

Expected behavior
Tests pass

Output

?   	github.com/mgechev/revive	[no test files]
?   	github.com/mgechev/revive/cli	[no test files]
?   	github.com/mgechev/revive/formatter	[no test files]
?   	github.com/mgechev/revive/lint	[no test files]
?   	github.com/mgechev/revive/internal/typeparams	[no test files]
?   	github.com/mgechev/revive/logging	[no test files]
ok  	github.com/mgechev/revive/config	0.023s
?   	github.com/mgechev/revive/rule	[no test files]
--- FAIL: TestReviveLint (0.00s)
    core_test.go:33: Expected failures to have 3 failures, but it has 5.
--- FAIL: TestReviveFormat (0.01s)
    core_test.go:66: Expected formatted failures '../testdata/if-return.go
          (15, 2)  https://revive.run/r#if-return         redundant if ...; err != nil check, just return error instead.  
          (88, 3)  https://revive.run/r#if-return         redundant if ...; err != nil check, just return error instead.  
          (95, 3)  https://revive.run/r#if-return         redundant if ...; err != nil check, just return error instead.  
          (91, 3)  https://revive.run/r#unreachable-code  unreachable code after this statement                           
          (98, 3)  https://revive.run/r#unreachable-code  unreachable code after this statement                           
        
        
         ✖ 5 problems (0 errors) (5 warnings)' to contain '(15, 2)  https://revive.run/r#if-return  redundant if ...; err != nil check, just return error instead.', but it didn't.
FAIL
FAIL	github.com/mgechev/revive/revivelib	0.019s
ok  	github.com/mgechev/revive/test	1.200s
FAIL

Desktop (please complete the following information):

  • OS: Void Linux
  • Version of Go: 1.20.2
@dtest
Copy link

dtest commented Mar 22, 2023

Looks to be because of this PR #799

Are there no automated tests for PRs?

@mgechev
Copy link
Owner

mgechev commented May 16, 2023

Seems to be working fine with Go 1.20.4. Are you still facing this issue?

@icp1994
Copy link
Author

icp1994 commented May 16, 2023

It passes following dc6909b so the issue is resolved.

@icp1994 icp1994 closed this as completed May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants