greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

Unable to install from Dockerfile / alpine based #104

Open nvuillam opened 9 months ago

nvuillam commented 9 months ago

Dockerfile instructions:


          RUN curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/greglook/cljstyle/main/util/install-cljstyle \
              && chmod +x install-cljstyle \
              && ./install-cljstyle

Log:

5.842 Downloading https://github.com/greglook/cljstyle/releases/download/0.15.0/cljstyle_0.15.0_linux_x86_64.zip to /tmp
6.078 Archive:  cljstyle_0.15.0_linux_x86_64.zip
6.079 unzip: short read

And as https://github.com/greglook/cljstyle/releases/download/0.15.0/cljstyle_0.15.0_linux_x86_64.zip returns a 404 is makes sense :/

Issue visible here: https://github.com/oxsecurity/megalinter/actions/runs/7439147778/job/20238690106?pr=3268#step:8:304

greglook commented 9 months ago

I think you caught me between pushing the new code to the main branch and actually cutting the release. 😅 The new artifacts are platform-specific, since I have an M2 mac to build on now.

As to the build failure, it seems that some of the reorganization I did broke that step - I moved script/install-cljstyle to util/. I had been thinking about the install script as mostly a tool for humans, but it makes sense that folks would go to it as a one-step installer in containers as well. 🤔

nvuillam commented 9 months ago

@greglook thanks for the reply :)

Any chance to have a fix someday ? 👼

cljstyle has been integrated within MegaLinter and I'm pretty sure that @practicalli-johnny would be sad if next MegaLinter version would be without cljstyle ;)

greglook commented 9 months ago

Any chance to have a fix someday ? 👼

Can you try with the latest install script on main?

nvuillam commented 5 months ago

@greglook I still have the issue :( -> https://github.com/oxsecurity/megalinter/actions/runs/8862094296/job/24334661450?pr=3516

Setup log:

#12 2.300 Downloading https://github.com/greglook/cljstyle/releases/download/0.16.626/cljstyle_0.16.626_linux_amd64.zip to /tmp
#12 2.522 Archive:  cljstyle_0.16.626_linux_amd64.zip
#12 2.974   inflating: cljstyle
#12 2.979 Successfully installed cljstyle 0.16.626 in /usr/local/bin
#12 DONE 3.0s

cljstyle seems to always return -11 as status code

[cljstyle] command: ['cljstyle', 'check', 'clojure_bad_1.clj']
[cljstyle] CWD: /tmp/ab00bfe7-4299-4279-9444-daed54eb8052
[cljstyle] result: -11 
[cljstyle] command: ['cljstyle', 'check', 'clojure_bad_2.clj']
[cljstyle] CWD: /tmp/ab00bfe7-4299-4279-9444-daed54eb8052
[cljstyle] result: -11 
Linter version command: ['/usr/local/bin/cljstyle', 'version']
Linter version result: -11 
Unable to get version for lin