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

add jq to dockerfile #1858

Closed
justinrush opened this issue Mar 19, 2021 · 8 comments
Closed

add jq to dockerfile #1858

justinrush opened this issue Mar 19, 2021 · 8 comments
Labels
enhancement New feature or improvement

Comments

@justinrush
Copy link

Is your feature request related to a problem? Please describe.
When running the tool to generate code quality reports its helpful to be able to tee the output to a file and to some human readable output using jq.

Describe the solution you'd like
RUN apk update && apk add --no-cache jq=1.6-r1

Describe alternatives you've considered
maintain a local fork :(

@justinrush justinrush added the enhancement New feature or improvement label Mar 19, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 19, 2021

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@sayboras
Copy link
Member

In my opinion, golangci-lint docker image should be just bare minimum (e.g. base image + golangci-lint binary). So while adding one more tool (like jq) is trivial, it will lead to few implications:

  • request to add one more tool
  • more responsibilities to maintain versions
  • security vulnerabilities

@justinrush
Copy link
Author

In my opinion, golangci-lint docker image should be just bare minimum (e.g. base image + golangci-lint binary). So while adding one more tool (like jq) is trivial, it will lead to few implications:

  • request to add one more tool
  • more responsibilities to maintain versions
  • security vulnerabilities

I don't disagree with the sentiment but at the same time using code quality as an output either requires that you run two jobs, one with non-human and output to file, and another to screen... Or create a private image based on the latest, and then keep maintaining that.

If there is some sed/awk magic people are using instead, I'm game, please share. I just don't want to maintain a private image for a pubic tool for something so basic.

@ldez
Copy link
Member

ldez commented Mar 19, 2021

I agree with @sayboras.

I guess that you are using the json output format, instead of adding jq to pipe the output, we can just add another output format like "json for human"

May be related to #481

@ldez
Copy link
Member

ldez commented Mar 19, 2021

could you provide more information about your use case?

@ldez ldez added the feedback required Requires additional feedback label Mar 19, 2021
@justinrush
Copy link
Author

could you provide more information about your use case?

The use case is this CI task that sticks computer readable information in an artifact and human readable stuff to the screen:

golangci-lint run --out-format code-climate | tee go-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'

@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Mar 30, 2022
@justinrush
Copy link
Author

this is closed by #2386

@ldez ldez removed feedback required Requires additional feedback stale No recent correspondence or work activity labels Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants