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

Change clj-kondo installation from Docker image to installation script #2368

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

bdovaz
Copy link
Collaborator

@bdovaz bdovaz commented Feb 17, 2023

Upgrades to the latest version automatically

https://github.com/clj-kondo/clj-kondo/blob/master/doc/install.md#installation-script-macos-and-linux

Fixes #2367

It also helps us to add arm64 compatibility when we finish #2273 since the docker image is only compatible with amd64.

https://hub.docker.com/r/cljkondo/clj-kondo/tags

@bdovaz bdovaz requested a review from nvuillam as a code owner February 17, 2023 16:58
@nvuillam
Copy link
Member

nvuillam commented Feb 17, 2023

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 6 0 0.01s
✅ BASH shellcheck 6 0 0.13s
✅ BASH shfmt 6 0 0 0.31s
✅ COPYPASTE jscpd yes no 2.93s
✅ DOCKERFILE hadolint 114 0 14.83s
✅ JSON eslint-plugin-jsonc 21 0 0 1.92s
✅ JSON jsonlint 19 0 0.26s
✅ JSON v8r 21 0 11.94s
⚠️ MARKDOWN markdownlint 309 0 230 6.33s
✅ MARKDOWN markdown-link-check 309 0 5.2s
✅ MARKDOWN markdown-table-formatter 309 0 0 14.81s
✅ OPENAPI spectral 1 0 1.53s
⚠️ PYTHON bandit 183 47 1.93s
✅ PYTHON black 183 0 0 3.66s
✅ PYTHON flake8 183 0 1.9s
✅ PYTHON isort 183 0 0 1.36s
✅ PYTHON mypy 183 0 6.25s
✅ PYTHON pylint 183 0 10.43s
⚠️ PYTHON pyright 183 246 15.44s
✅ REPOSITORY checkov yes no 26.49s
✅ REPOSITORY git_diff yes no 0.3s
✅ REPOSITORY secretlint yes no 11.49s
✅ REPOSITORY trivy yes no 25.35s
✅ SPELL cspell 745 0 17.56s
✅ SPELL misspell 566 0 0 0.77s
✅ XML xmllint 3 0 0 0.33s
✅ YAML prettier 81 0 0 2.64s
✅ YAML v8r 23 0 56.79s
✅ YAML yamllint 82 0 1.07s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@echoix
Copy link
Collaborator

echoix commented Feb 17, 2023

Why is it needed to use the script rather than docker? The images seem up to date? Personally, I'd rather Docker images and copying a single file or a couple files if possible. With docker images, when possible, we are able to build way faster (buildkit helps!) and not invalidate too much layers too.

@bdovaz
Copy link
Collaborator Author

bdovaz commented Feb 17, 2023

Why is it needed to use the script rather than docker? The images seem up to date? Personally, I'd rather Docker images and copying a single file or a couple files if possible. With docker images, when possible, we are able to build way faster (buildkit helps!) and not invalidate too much layers too.

@echoix if you have read, the docker image only works on amd64 and not arm64 and on the other hand, we have to use specific tags per version.

With this change we get to be compatible with arm64 and always be in the latest version without changes needed.

@nvuillam
Copy link
Member

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 6 0 0.01s
✅ BASH shellcheck 6 0 0.13s
✅ BASH shfmt 6 0 0 0.04s
✅ COPYPASTE jscpd yes no 2.49s
✅ DOCKERFILE hadolint 114 0 14.51s
✅ JSON eslint-plugin-jsonc 21 0 0 1.79s
✅ JSON jsonlint 19 0 0.21s
✅ JSON npm-package-json-lint yes no 0.65s
✅ JSON v8r 21 0 12.84s
⚠️ MARKDOWN markdownlint 309 2 230 5.51s
✅ MARKDOWN markdown-link-check 309 0 5.32s
✅ MARKDOWN markdown-table-formatter 309 2 0 14.84s
✅ OPENAPI spectral 1 0 1.69s
⚠️ PYTHON bandit 183 47 1.98s
✅ PYTHON black 183 0 0 3.59s
✅ PYTHON flake8 183 0 1.83s
✅ PYTHON isort 183 0 0 0.4s
✅ PYTHON mypy 183 0 6.72s
✅ PYTHON pylint 183 0 11.19s
⚠️ PYTHON pyright 183 244 16.63s
✅ REPOSITORY checkov yes no 28.37s
⚠️ REPOSITORY devskim yes 61 1.31s
✅ REPOSITORY dustilock yes no 1.59s
✅ REPOSITORY git_diff yes no 0.05s
✅ REPOSITORY secretlint yes no 8.21s
✅ REPOSITORY syft yes no 0.93s
✅ REPOSITORY trivy yes no 21.25s
✅ SPELL cspell 745 0 17.22s
✅ SPELL misspell 566 2 0 0.53s
✅ XML xmllint 3 0 0 0.03s
✅ YAML prettier 81 0 0 2.52s
✅ YAML v8r 23 0 59.13s
✅ YAML yamllint 82 0 1.2s

See detailed report in MegaLinter reports

You could have same capabilities but better runtime performances if you request a new MegaLinter flavor.

MegaLinter is graciously provided by OX Security

@echoix
Copy link
Collaborator

echoix commented Feb 17, 2023

I see. There's nothing wrong with this. Maybe one day we could look into making it as a build stage in order to keep the buildkit parallelism. Since we know it was possible to install it in megalinter by only copying a file. In my apk go PR that isn't merged yet since I need to undo changes, I was able to do this quite easily by using a yaml multi line string ( the one that starts with a pipe character) and just making sure the first item started with "from" and the other one with "COPY". Then I had a block of docker commands that could be used as a stage

Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

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

Great, as usual :)

@nvuillam nvuillam merged commit 41ceee5 into main Feb 17, 2023
@nvuillam nvuillam deleted the features/clj-kondo-manual-installation branch February 17, 2023 19:40
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.

3 participants