checkpoint-restore / checkpointctl

A tool for in-depth analysis of container checkpoints
Apache License 2.0
87 stars 15 forks source link

make: generate auto-completion files #118

Closed rst0git closed 5 months ago

rst0git commented 5 months ago

This pull request extends the Makefile with targets to generate, install, and uninstall auto-completion files.

github-actions[bot] commented 5 months ago

Test Results

49 tests  ±0   49 :white_check_mark: ±0   1s :stopwatch: ±0s  1 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit b76a3902. ± Comparison against base commit d132ca0d.

:recycle: This comment has been updated with latest results.

codecov-commenter commented 5 months ago

Codecov Report

Attention: 102 lines in your changes are missing coverage. Please review.

Comparison is base (9aa0386) 78.85% compared to head (b76a390) 78.67%. Report is 13 commits behind head on main.

Files Patch % Lines
internal/json.go 66.66% 58 Missing and 20 partials :warning:
internal/utils.go 66.00% 12 Missing and 5 partials :warning:
cmd/memparse.go 90.41% 4 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #118 +/- ## ========================================== - Coverage 78.85% 78.67% -0.19% ========================================== Files 6 9 +3 Lines 927 1158 +231 ========================================== + Hits 731 911 +180 - Misses 154 185 +31 - Partials 42 62 +20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

adrianreber commented 5 months ago

Do we need to keep the generated files in the repository?

rst0git commented 5 months ago

Do we need to keep the generated files in the repository?

I used an approach similar to Podman (https://github.com/containers/podman/tree/main/completions); it simplifies the installation process. With this approach we don't need to generate the auto-completion files every time we build/install checkpointctl, but we can use make completions to update them.

adrianreber commented 5 months ago

I kind of like it to have information about the completion in the main README file. No need from my side to move it somewhere else. Besides that, this looks good.