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

Allow checking a single file or stdin. Test output function and move it to API. #10

Merged
merged 4 commits into from
Mar 27, 2020

Conversation

sudermanjr
Copy link
Member

@sudermanjr sudermanjr commented Mar 26, 2020

Single file input

This fixes #7 by allowing you to helm template foo | pluto detect -

Removed usage text from the README. It was hard to update and it was annoying. I expanded the quickstart to have more examples of usage to cover that documentation instead.

Output Function

This required me to move the output into the api. Seemed annoying at first, but I think the test coverage is worth it.

Renamed ParseOutput to DisplayOutput and handled more cases of output.

Fixes #9

@sudermanjr sudermanjr requested a review from lucasreed as a code owner March 26, 2020 21:56
@sudermanjr
Copy link
Member Author

Example output using stdin:

└─ helm template . | pluto detect - --show-non-deprecated
KIND         VERSION   DEPRECATED   RESOURCE NAME
Deployment   apps/v1   false        RELEASE-NAME-goldilocks-controller
Deployment   apps/v1   false        RELEASE-NAME-goldilocks-dashboard

@sudermanjr sudermanjr force-pushed the sudermanjr/stdin-single-file branch from df1a0aa to aa756e2 Compare March 26, 2020 23:11
@codecov
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #10 into master will increase coverage by 5.98%.
The diff coverage is 79.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
+ Coverage   46.37%   52.36%   +5.98%     
==========================================
  Files           4        5       +1     
  Lines         207      254      +47     
==========================================
+ Hits           96      133      +37     
- Misses        106      111       +5     
- Partials        5       10       +5     
Impacted Files Coverage Δ
pkg/api/output.go 78.72% <78.72%> (ø)
pkg/finder/finder.go 80.00% <100.00%> (ø)

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 a4a13df...3192562. Read the comment docs.

@sudermanjr sudermanjr changed the title Allow checking a single file or stdin Allow checking a single file or stdin. Test output function and move it to API. Mar 26, 2020
Copy link
Contributor

@lucasreed lucasreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!! Small nit inline but it works great in my testing.

cmd/root.go Outdated Show resolved Hide resolved
@sudermanjr sudermanjr merged commit 5dbdc32 into master Mar 27, 2020
@sudermanjr sudermanjr deleted the sudermanjr/stdin-single-file branch March 27, 2020 15:15
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.

Don't show header if no results are to be printed Support helm templates in static files check
2 participants