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

Golangci v1.60.1 opposed to v1.60.2 #4934

Closed
6 of 7 tasks
youssefhassan opened this issue Aug 21, 2024 · 5 comments
Closed
6 of 7 tasks

Golangci v1.60.1 opposed to v1.60.2 #4934

youssefhassan opened this issue Aug 21, 2024 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@youssefhassan
Copy link

youssefhassan commented Aug 21, 2024

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Golangci v.1.60.1 was working fine, but after the update to v1.60.2 which came as I use the GitHub actions version
https://github.com/sc-actions-forks/golangci-lint-action/tree/master

Error: ../../../go/pkg/mod/github.com/newrelic/go-agent/[email protected]/newrelic/sql_driver.go:47:37: predeclared any requires go1.18 or later (typecheck)
  func sendSecureEventSQL(query, args any) any {
                                      ^
  Error: ../../../go/pkg/mod/github.com/newrelic/go-agent/[email protected]/newrelic/sql_driver.go:51:43: predeclared any requires go1.18 or later (typecheck)
  func sendSecureEventSQLPrepare(query, obj any) {
                                            ^
  Error: ../../../go/pkg/mod/github.com/newrelic/go-agent/v3@v3.[33](https://github.com/soundcloud/gateway/actions/runs/10475562539/job/29012503998#step:6:35).1/newrelic/sql_driver.go:55:46: predeclared any requires go1.18 or later (typecheck)
  func sendSecureEventSQLPrepareArgs(args, obj any) any {

while using Go 1.21

Version of golangci-lint

$ golangci-lint --version
# Paste output here

Configuration

# paste configuration file or CLI flags here

Go environment

$ go version && go env
# paste output here

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here

A minimal reproducible example or link to a public repository

// add your code here

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

@youssefhassan youssefhassan added the bug Something isn't working label Aug 21, 2024
Copy link

boring-cyborg bot commented Aug 21, 2024

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez removed the bug Something isn't working label Aug 21, 2024
@ldez
Copy link
Member

ldez commented Aug 21, 2024

Hello,

To be able to process your issue as quickly as possible,
can you edit your issue to add missing elements, fix the invalid elements, and complete the sections?

Section Status
Welcome 🟠
Description of the problem 🟠
Version of golangci-lint 🔴
Configuration 🔴
Go environment 🔴
Verbose output of running 🔴
A minimal reproducible example or link to a public repository 🔴
Validation 🔴
Supporter 🟢

Legend:

  • 🟢: The section is complete and valid.
  • 🟠: The section is incomplete.
  • 🔴: The section is missing or invalid.

Golangci v.1.60.1 was working fine, but after the update to v1.60.2 which came as I use the GitHub actions version
https://github.com/sc-actions-forks/golangci-lint-action/tree/master

You are not using the official GitHub Action and this fork is not up-to-date.

@ldez ldez added the feedback required Requires additional feedback label Aug 21, 2024
@amyjbaer
Copy link

I am having similar issues. Additionally having these

Error: gen/routes.go:27:3: missing type in composite literal (typecheck)

This is occuring for custom types it seems

type CustomType []otherType

and unable to see inherited fields

type Example struct {
  otherStruct
} 

type otherStruct struct {
  SomeField string
}

// linter complains
Example.SomeField

@ldez
Copy link
Member

ldez commented Aug 21, 2024

If you are facing the same problem, the best way to contribute is to provide the following information:

A "working" code example or link to a public repository.

golangci-lint --version
cat .golangci.yml
go version && go env
golangci-lint cache clean
golangci-lint run -v

@ldez
Copy link
Member

ldez commented Aug 22, 2024

Duplicate of #4942

@ldez ldez marked this as a duplicate of #4942 Aug 22, 2024
@ldez ldez closed this as completed Aug 22, 2024
@ldez ldez added duplicate This issue or pull request already exists and removed feedback required Requires additional feedback labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants