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: get linter running correctly locally #1296

Merged
merged 2 commits into from
Jan 30, 2023
Merged

fix: get linter running correctly locally #1296

merged 2 commits into from
Jan 30, 2023

Conversation

markphelps
Copy link
Collaborator

Before

mage lint
Linting...
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] Can't run linter goanalysis_metalinter: goimports: can't extract issues from gofmt diff output "--- /Users/markphelps/workspace/flipt/rpc/flipt/auth/auth.pb.go.orig\t2023-01-27 15:51:11\n+++ /Users/markphelps/workspace/flipt/rpc/flipt/auth/auth.pb.go\t2023-01-27 15:51:11\n@@ -7,14 +7,15 @@\n package auth\n \n import (\n+\treflect \"reflect\"\n+\tsync \"sync\"\n+\n \t_ \"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options\"\n \tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n \tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n \temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n \tstructpb \"google.golang.org/protobuf/types/known/structpb\"\n \ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n-\treflect \"reflect\"\n-\tsync \"sync\"\n )\n \n const (\n": can't parse patch: parsing time "2023-01-27 15:51:11" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"
WARN [linters context] sqlclosecheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
ERRO Running error: 1 error occurred:
	* can't run linter goanalysis_metalinter: goimports: can't extract issues from gofmt diff output "--- /Users/markphelps/workspace/flipt/rpc/flipt/auth/auth.pb.go.orig\t2023-01-27 15:51:11\n+++ /Users/markphelps/workspace/flipt/rpc/flipt/auth/auth.pb.go\t2023-01-27 15:51:11\n@@ -7,14 +7,15 @@\n package auth\n \n import (\n+\treflect \"reflect\"\n+\tsync \"sync\"\n+\n \t_ \"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options\"\n \tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n \tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n \temptypb \"google.golang.org/protobuf/types/known/emptypb\"\n \tstructpb \"google.golang.org/protobuf/types/known/structpb\"\n \ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n-\treflect \"reflect\"\n-\tsync \"sync\"\n )\n \n const (\n": can't parse patch: parsing time "2023-01-27 15:51:11" as "2006-01-02 15:04:05 -0700": cannot parse "" as "-0700"

Error: failed to lint: running "golangci-lint run" failed with exit code 3

After

mage lint
Linting...
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [linters context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] sqlclosecheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.

@markphelps markphelps requested a review from a team as a code owner January 27, 2023 20:51
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2023

Codecov Report

Merging #1296 (9978515) into main (906fe7f) will decrease coverage by 0.04%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1296      +/-   ##
==========================================
- Coverage   79.88%   79.85%   -0.04%     
==========================================
  Files          43       43              
  Lines        3267     3267              
==========================================
- Hits         2610     2609       -1     
- Misses        527      528       +1     
  Partials      130      130              
Impacted Files Coverage Δ
internal/storage/oplock/sql/sql.go 95.41% <0.00%> (-0.92%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@markphelps markphelps enabled auto-merge (squash) January 30, 2023 12:34
@markphelps markphelps merged commit d0b365b into main Jan 30, 2023
@markphelps markphelps deleted the local-lint-fix branch January 30, 2023 12:38
markphelps added a commit that referenced this pull request Jan 31, 2023
* main:
  chore: bump prom verison (#1305)
  Otel improvements (#1306)
  fix: disable csp headers in non-release mode for ui dev (#1304)
  chore(deps): bump go.opentelemetry.io/otel/exporters/jaeger (#1299)
  chore(deps): bump google.golang.org/grpc from 1.52.0 to 1.52.3 (#1303)
  feat(logging): support custom time, level and message keys (#1295)
  fix: get linter running correctly locally (#1296)
  chore(deps): bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0 (#1301)
  chore(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1298)
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.

None yet

3 participants