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

golint does not print backtrace #231

Closed
DifferentialOrange opened this issue Nov 18, 2022 · 4 comments · Fixed by #254
Closed

golint does not print backtrace #231

DifferentialOrange opened this issue Nov 18, 2022 · 4 comments · Fixed by #254
Assignees
Labels
code health Improve code readability, simplify maintenance and so on enhancement

Comments

@DifferentialOrange
Copy link
Member

It is a pain to debug errors like

  Error: S1002: should omit comparison to bool constant, can be simplified to `connected` (gosimple)
  Error: SA5001: should check returned error before deferring conn.Close() (staticcheck)
  Error: SA5001: should check returned error before deferring conn.Close() (staticcheck)

without having any information about what file and line they are referred to.

@DifferentialOrange DifferentialOrange added enhancement teamE code health Improve code readability, simplify maintenance and so on labels Nov 18, 2022
@oleg-jukovec
Copy link
Collaborator

oleg-jukovec commented Nov 24, 2022

Yes, we need to fix it on CI ( golangci/golangci-lint-action#119 , tarantool/tt#116 ), but on the local machine you could to use the make target:

$ make golangci-lint 
golangci-lint run -E goimports -D errcheck
connection_pool/connection_pool.go:46:19: undeclared name: `tarantool` (typecheck)
	Discovered(conn *tarantool.Connection, role Role) error

@DifferentialOrange
Copy link
Member Author

DifferentialOrange commented Nov 28, 2022

Yes, we need to fix it on CI ( golangci/golangci-lint-action#119 , tarantool/tt#116 ), but on the local machine you could to use the make target:

$ make golangci-lint 
golangci-lint run -E goimports -D errcheck
connection_pool/connection_pool.go:46:19: undeclared name: `tarantool` (typecheck)
	Discovered(conn *tarantool.Connection, role Role) error

To be honest, it's not really helpful to receive any issues for local run and do not receive them in CI.

image

@oleg-jukovec
Copy link
Collaborator

oleg-jukovec commented Nov 30, 2022

Do we need to save such messages in pull requests code?
123

@DifferentialOrange
Copy link
Member Author

Do we need to save such messages in pull requests code? 123

I never used them. It may worth to ask other developers.

@oleg-jukovec oleg-jukovec self-assigned this Dec 27, 2022
oleg-jukovec added a commit that referenced this issue Dec 27, 2022
After the patch golangci-lint prints a file and a line number.

Closes #231
oleg-jukovec added a commit that referenced this issue Dec 27, 2022
After the patch golangci-lint prints a file and a line number [1].

1. golangci/golangci-lint-action#119

Closes #231
oleg-jukovec added a commit that referenced this issue Dec 27, 2022
After the patch golangci-lint prints a file and a line number [1].

1. golangci/golangci-lint-action#119

Closes #231
oleg-jukovec added a commit that referenced this issue Dec 27, 2022
The patch adds a second golangci-lint run that prints errors in
human-readable format [1].

1. golangci/golangci-lint-action#119

Closes #231
oleg-jukovec added a commit that referenced this issue Dec 28, 2022
The patch adds a second golangci-lint run that prints errors in
human-readable format [1].

1. golangci/golangci-lint-action#119

Closes #231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Improve code readability, simplify maintenance and so on enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants