8000 analysis: allow running without concurrency by joshuasing · Pull Request #11 · joshuasing/golicenser · GitHub
[go: up one dir, main page]

Skip to content

analysis: allow running without concurrency #11

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

Merged
merged 1 commit into from
Apr 20, 2025

Conversation

joshuasing
Copy link
Owner
@joshuasing joshuasing commented Apr 20, 2025

golangci-lint handles concurrency internally, meaning we should avoid creating an unnecessary goroutine and instead allow MaxConcurrent to be set to 0, meaning files should be processed synchronously.

This also optimises for when MaxConcurrent is set to 1, since it is the same as using no concurrency and we can skip using goroutines.

cmd/golicenser keeps the previous default of GOMAXPROCS * 2 for the MaxConcurrent value.

golangci/golangci-lint@a314c0e (#5751)

@joshuasing joshuasing added the type: refactor This improves existing functionality label Apr 20, 2025
@joshuasing joshuasing force-pushed the joshua/max-concurrent-golangci branch 2 times, most recently from b59438c to 3118967 Compare April 20, 2025 05:04
golangci-lint handles concurrency internally, meaning we should avoid
creating an unnecessary goroutine and instead allow MaxConcurrent to be
set to 0, meaning files should be processed synchronously.

This also optimises for when MaxConcurrent is set to 1, since it is the
same as using no concurrency and we can skip using goroutines.

cmd/golicenser keeps the previous default of `runtime.NumCPU() * 2` for
the MaxConcurrent value.
@joshuasing joshuasing force-pushed the joshua/max-concurrent-golangci branch from 3118967 to 6bacac5 Compare April 20, 2025 05:06
@joshuasing joshuasing merged commit 9f0b55f into main Apr 20, 2025
6 checks passed
@joshuasing joshuasing deleted the joshua/max-concurrent-golangci branch April 20, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor This improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0