Skip to content

revive: invalid line number 526 (should be < 230) #5289

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

Closed
6 of 7 tasks
caichao1103 opened this issue Jan 3, 2025 · 3 comments
Closed
6 of 7 tasks

revive: invalid line number 526 (should be < 230) #5289

caichao1103 opened this issue Jan 3, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@caichao1103
Copy link

caichao1103 commented Jan 3, 2025

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

Panic: the_only_name: package "upgrade" (isInitialPkg: true, needAnalyzeSource: true): invalid line number 526 (should be < 230)

Version of golangci-lint

$ golangci-lint --version
v1.63.3

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
level=error msg="[runner] Panic: the_only_name: package \"upgrade\" (isInitialPkg: true, needAnalyzeSource: true): invalid line number 526 (should be < 230): goroutine 118016 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x5e\ngithub.com/golangci/golangci-lint/pkg/goanalysis.(*action).analyzeSafe.func1()\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_action.go:50 +0x277\npanic({0x11be420?, 0xc093345b70?})\n\truntime/panic.go:785 +0x132\ngo/token.(*File).LineStart(0xc001c6ce80?, 0x386e?)\n\tgo/token/position.go:232 +0x168\ngithub.com/golangci/golangci-lint/pkg/golinters/revive.toIssue(0xc024696d20, 0xc049eb2440)\n\tgithub.com/golangci/golangci-lint/pkg/golinters/revive/revive.go:187 +0x24c\ngithub.com/golangci/golangci-lint/pkg/golinters/revive.(*wrapper).run(0xc00190e080, 0xc0007180c0, 0xc024696d20)\n\tgithub.com/golangci/golangci-lint/pkg/golinters/revive/revive.go:156 +0x4d2\ngithub.com/golangci/golangci-lint/pkg/golinters/revive.New.func1.1(0x0?)\n\tgithub.com/golangci/golangci-lint/pkg/golinters/revive/revive.go:61 +0x37\ngithub.com/golangci/golangci-lint/pkg/goanalysis.(*action).analyze.func3(0xc0068b9560, 0xc024696d20)\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_checker.go:182 +0xeb\ngithub.com/golangci/golangci-lint/pkg/goanalysis.(*action).analyze(0xc0068b9560)\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_checker.go:208 +0xa9c\ngithub.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001f3d310, {0x141c83e, 0xd}, 0xc005f47f48)\n\tgithub.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x44\ngithub.com/golangci/golangci-lint/pkg/goanalysis.(*action).analyzeSafe(0x0?)\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_action.go:54 +0x71\ngithub.com/golangci/golangci-lint/pkg/goanalysis.(*loadingPackage).analyze.func2(0xc0068b9560)\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_loadingpackage.go:83 +0xa5\ncreated by github.com/golangci/golangci-lint/pkg/goanalysis.(*loadingPackage).analyze in goroutine 3921\n\tgithub.com/golangci/golangci-lint/pkg/goanalysis/runner_loadingpackage.go:78 +0x1e9\n"

level=error msg="Running error: can't run linter goanalysis_metalinter\ngoanalysis_metalinter: the_only_name: package \"upgrade\" (isInitialPkg: true, needAnalyzeSource: true): invalid line number 526 (should be < 230)"

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

@caichao1103 caichao1103 added the bug Something isn't working label Jan 3, 2025
Copy link

boring-cyborg bot commented Jan 3, 2025

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

@ldez
Copy link
Member

ldez commented Jan 3, 2025

Hello @caichao1103,

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.

@ldez ldez added the feedback required Requires additional feedback label Jan 3, 2025
@ldez ldez changed the title Panic: the_only_name: package \"upgrade\" (isInitialPkg: true, needAnalyzeSource: true): invalid line number 526 (should be < 230) revive: invalid line number 526 (should be < 230) Jan 3, 2025
@ldez
Copy link
Member

ldez commented Jan 3, 2025

potentially fixed by #5291 but as this issue is 90% incomplete it's not possible to check that.

@ldez ldez closed this as completed Jan 3, 2025
@ldez ldez removed the feedback required Requires additional feedback label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants