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

autogenerated_exclude: increase scanner buffer #955

Merged
merged 3 commits into from
Feb 3, 2020

Conversation

ernado
Copy link
Member

@ernado ernado commented Feb 3, 2020

Some lines can be very long, so increase scanner
buffer to mitigate this.

Fix #954

Some lines can be very long, so increase scanner
buffer to mitigate this.

Fix golangci#954
@ernado ernado requested review from tpounds and jirfag February 3, 2020 09:25
@ernado
Copy link
Member Author

ernado commented Feb 3, 2020

I've checked for resource usage regressions on kubernetes sources with cold cache and disabled unused linter.

Patch:

golangci-lint has version SNAPSHOT-888446ba556b10a4f6012227c98664ce165c2d3f built from 888446b on 2020-02-03T09:38:08Z
Command exited with non-zero status 1
	Command being timed: "/src/golangci-lint/dist/golangci-lint_linux_amd64/golangci-lint run --disable unused --timeout 1h"
	User time (seconds): 472.43
	System time (seconds): 5.38
	Percent of CPU this job got: 702%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:08.04
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 2956784
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 636892
	Voluntary context switches: 244492
	Involuntary context switches: 74899
	Swaps: 0
	File system inputs: 0
	File system outputs: 124632
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 1

v1.23.2:

golangci-lint has version 1.23.2 built from fd621bd on 2020-02-02T22:12:01Z
Command exited with non-zero status 1
	Command being timed: "/src/golangci-lint/bin/golangci-lint run --disable unused --timeout 1h"
	User time (seconds): 473.22
	System time (seconds): 5.67
	Percent of CPU this job got: 698%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:08.54
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 3011788
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 653022
	Voluntary context switches: 221368
	Involuntary context switches: 94506
	Swaps: 0
	File system inputs: 0
	File system outputs: 124648
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 1

Looks like there are no regressions.

@ernado
Copy link
Member Author

ernado commented Feb 3, 2020

I've checked it with mattermost/mattermost@1a82e3e

Before fix:

$ /src/golangci-lint/bin/golangci-lint run
WARN [runner] Can't process result by autogenerated_exclude processor: can't filter issue result.Issue{FromLinter:"golint", Text:"exported var SystemEmojis should have comment or be unexported", SourceLines:[]string(nil), Replacement:(*result.Replacement)(nil), Pkg:(*packages.Package)(0xc0016c30e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"model/emoji_data.go", Offset:132, Line:6, Column:5}, HunkPos:0}: failed to get doc of file model/emoji_data.go: failed to scan file: bufio.Scanner: token too long 

After fix there is no warning.

@ernado ernado merged commit 18ab7a0 into golangci:master Feb 3, 2020
@agnivade
Copy link
Contributor

agnivade commented Feb 4, 2020

Are we going to have a new patch release soon ?

@ernado
Copy link
Member Author

ernado commented Feb 4, 2020

Yes, please expect binaries for v1.23.3 within ~15min, CI/CD is already in progress.

@ernado ernado deleted the fix-max-token-size branch February 4, 2020 20:35
korjavin pushed a commit to korjavin/golangci-lint-1 that referenced this pull request Mar 10, 2020
* tag 'v1.23.7': (140 commits)
  dev: prepare v1.23.7
  autogenerated_exclude: increase scanner max buffer size
  dev: use go1.14
  change increase to increasing in timeout error
  dev: release v1.23.6
  tools: update goreleaser
  dev: release v1.23.5
  Support Go 1.14rc1.
  Simplify alpine Dockerfile
  add missing mips option
  Update to latest x/tools (golangci#930)
  fix golangci#869 by removing lock file after unlocking (golangci#947)
  dev: release v1.23.3
  autogenerated_exclude: increase scanner buffer (golangci#955)
  gocritic: update disabled check warning message
  Add MIPS arch support
  dev: release v1.23.2
  Fix misspelled words. (golangci#952)
  Add Intuit to README.md (golangci#936)
  fix golangci.yml reference
  ...
@ldez ldez added this to the v1.23 milestone Mar 6, 2024
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.

autogenerated_exclude: bufio.Scanner: token too long
3 participants