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

Make mllints linters run in parallel instead of sequentially #10

Merged
merged 11 commits into from
May 13, 2021

Conversation

bvobart
Copy link
Owner

@bvobart bvobart commented May 13, 2021

No description provided.

bvobart added 11 commits May 11, 2021 18:12
…to run multiple linters in parallel, no more than the amount of available CPU threads. Each task that results from this can be awaited individually or awaited all at the same time, receiving results as they come in
… pretty-print a Runner's running and completed tasks
… allowing mllint.Runner to run tasks directly on the current thread when the runner is nil
… all tasks as running or done. Refactors Runner to await being done with printing and to await task completions

Honestly, just try it out for yourself, it's pretty sick :)
…duces RunnerProgress interface and BasicRunnerProgress for non-interactive terminals. Also adds --progress-plain flags and --force to overwrite output file if it already exists
…ter.Name()) and use that to prettify printing task
…ometimes not be able to find one specific task index
@bvobart bvobart self-assigned this May 13, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #10 (13d1264) into main (f3feb4a) will increase coverage by 0.65%.
The diff coverage is 87.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   83.30%   83.95%   +0.65%     
==========================================
  Files          32       38       +6     
  Lines         551      692     +141     
==========================================
+ Hits          459      581     +122     
- Misses         68       81      +13     
- Partials       24       30       +6     
Impacted Files Coverage Δ
utils/cli.go 0.00% <0.00%> (ø)
commands/mllint/runner.go 77.19% <77.19%> (ø)
commands/mllint/progress_live.go 91.30% <91.30%> (ø)
linters/common/composite.go 97.67% <91.66%> (-2.33%) ⬇️
commands/mllint/collector.go 100.00% <100.00%> (ø)
commands/mllint/progress.go 100.00% <100.00%> (ø)
commands/mllint/progress_basic.go 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3feb4a...13d1264. Read the comment docs.

@bvobart bvobart merged commit 7f0f8fe into main May 13, 2021
@bvobart bvobart deleted the parallel-linters branch May 13, 2021 22:11
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.

2 participants