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

Fix linter errors #316

Merged
merged 1 commit into from Jul 23, 2021
Merged

Fix linter errors #316

merged 1 commit into from Jul 23, 2021

Conversation

mem
Copy link
Contributor

@mem mem commented Jul 15, 2021

The linter is correctly flagging this bit:

fmt.Fprintf(w, ExpectedMessage)

because it's a formatting function that doesn't appear to be formatting
anything (since there are not additional arguments after the formatting
string).

staticcheck has started flagging this import:

"github.com/golang/protobuf/proto"

because that package has been rewritten and published as
google.golang.org/protobuf. The new package is not a drop-in replacement
for the old one, even if the staticcheck diagnostic suggests otherwise.
Newer versions of the old package are actually implemented in terms of
the new one. For this code base in particular, some of the text
marshalling functions have disappeared in the new package and they need
to be implemented in terms of the new reflection package. Until an
adequate solution is found, simply ignore the error.

Closes: #281

Signed-off-by: Marcelo E. Magallon marcelo.magallon@grafana.com

The linter is correctly flagging this bit:

	fmt.Fprintf(w, ExpectedMessage)

because it's a formatting function that doesn't appear to be formatting
anything (since there are not additional arguments after the formatting
string).

staticcheck has started flagging this import:

	"github.com/golang/protobuf/proto"

because that package has been rewritten and published as
google.golang.org/protobuf. The new package is not a drop-in replacement
for the old one, even if the staticcheck diagnostic suggests otherwise.
Newer versions of the old package are actually implemented in terms of
the new one. For this code base in particular, some of the text
marshalling functions have disappeared in the new package and they need
to be implemented in terms of the new reflection package. Until an
adequate solution is found, simply ignore the error.

Closes: #281

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
@mem mem requested a review from roidelapluie July 15, 2021 15:13
@roidelapluie roidelapluie merged commit 5f27aa2 into main Jul 23, 2021
@roidelapluie roidelapluie deleted the mem/fix_linter_errors branch July 23, 2021 13:15
@roidelapluie
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

golangci-lint reports issues
2 participants