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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .automation/generated/flavors-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,10 @@
[
"2023-02-16T01:07:41",
2778653
],
[
"2023-02-17T17:51:42",
2780933
]
],
"ci_light": [
Expand Down Expand Up @@ -2601,6 +2605,10 @@
[
"2023-02-16T01:07:41",
48142
],
[
"2023-02-17T17:51:42",
48449
]
],
"cupcake": [
Expand Down Expand Up @@ -2883,6 +2891,10 @@
[
"2023-02-16T01:07:41",
2834
],
[
"2023-02-17T17:51:42",
2897
]
],
"dart": [
Expand Down Expand Up @@ -5095,6 +5107,10 @@
[
"2023-02-16T01:07:41",
114610
],
[
"2023-02-17T17:51:42",
115387
]
],
"dotnet": [
Expand Down Expand Up @@ -6397,6 +6413,10 @@
[
"2023-02-16T01:07:41",
349110
],
[
"2023-02-17T17:51:42",
349522
]
],
"go": [
Expand Down Expand Up @@ -7699,6 +7719,10 @@
[
"2023-02-16T01:07:41",
16793
],
[
"2023-02-17T17:51:42",
16837
]
],
"java": [
Expand Down Expand Up @@ -9001,6 +9025,10 @@
[
"2023-02-16T01:07:41",
108751
],
[
"2023-02-17T17:51:42",
108949
]
],
"javascript": [
Expand Down Expand Up @@ -10303,6 +10331,10 @@
[
"2023-02-16T01:07:41",
201057
],
[
"2023-02-17T17:51:42",
201991
]
],
"php": [
Expand Down Expand Up @@ -11605,6 +11637,10 @@
[
"2023-02-16T01:07:41",
45239
],
[
"2023-02-17T17:51:42",
45348
]
],
"python": [
Expand Down Expand Up @@ -12907,6 +12943,10 @@
[
"2023-02-16T01:07:41",
158821
],
[
"2023-02-17T17:51:42",
159537
]
],
"ruby": [
Expand Down Expand Up @@ -14205,6 +14245,10 @@
[
"2023-02-16T01:07:41",
2957
],
[
"2023-02-17T17:51:42",
2968
]
],
"rust": [
Expand Down Expand Up @@ -15503,6 +15547,10 @@
[
"2023-02-16T01:07:41",
4564
],
[
"2023-02-17T17:51:42",
4576
]
],
"salesforce": [
Expand Down Expand Up @@ -16805,6 +16853,10 @@
[
"2023-02-16T01:07:41",
16627
],
[
"2023-02-17T17:51:42",
16668
]
],
"scala": [
Expand Down Expand Up @@ -18105,6 +18157,10 @@
[
"2023-02-16T01:07:41",
2895
],
[
"2023-02-17T17:51:42",
2998
]
],
"swift": [
Expand Down Expand Up @@ -19403,6 +19459,10 @@
[
"2023-02-16T01:07:41",
3161
],
[
"2023-02-17T17:51:42",
3164
]
],
"terraform": [
Expand Down Expand Up @@ -20705,6 +20765,10 @@
[
"2023-02-16T01:07:41",
176969
],
[
"2023-02-17T17:51:42",
178103
]
]
}
4 changes: 2 additions & 2 deletions .automation/generated/linter-helps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"checkstyle": "10.7.0",
"chktex": "1.7.6",
"clippy": "0.1.67",
"clj-kondo": "2023.01.20",
"clj-kondo": "2023.02.17",
"coffeelint": "5.2.11",
"cpplint": "1.6.1",
"csharpier": "0.22.1",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- [semgrep](https://semgrep.dev/) from 1.11.0 to **1.12.0** on 2023-02-16
- [trivy](https://aquasecurity.github.io/trivy/) from 0.37.2 to **0.37.3** on 2023-02-16
- [cspell](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell) from 6.24.0 to **6.26.1** on 2023-02-16
- [clj-kondo](https://github.com/borkdude/clj-kondo) from 2023.01.20 to **2023.02.17** on 2023-02-17
<!-- linter-versions-end -->

## [v6.19.0] - 2023-02-05
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#############################################################################################
#FROM__START
FROM mvdan/shfmt:latest-alpine as shfmt
FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker
FROM ghcr.io/assignuser/chktex-alpine:latest as chktex
Expand Down Expand Up @@ -281,7 +280,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"

#COPY__START
COPY --from=shfmt /bin/shfmt /usr/bin/
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
COPY --from=chktex /usr/bin/chktex /usr/bin/
Expand Down Expand Up @@ -412,7 +410,9 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \
&& mv "${BICEP_EXE}" "${BICEP_DIR}" \

# clj-kondo installation
# Managed with COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
&& curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo \

# csharpier installation
&& /usr/share/dotnet/dotnet tool install -g csharpier \
Expand Down
2 changes: 1 addition & 1 deletion docs/all_linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| [**checkstyle**](https://github.com/checkstyle/checkstyle){target=_blank} | 10.7.0 | [LGPL-2.1](licenses/checkstyle.md) | [![GitHub stars](https://img.shields.io/github/stars/checkstyle/checkstyle?cacheSeconds=3600)](https://github.com/checkstyle/checkstyle){target=_blank} | [JAVA](descriptors/java_checkstyle.md) | :heart: | [MegaLinter reference](https://checkstyle.sourceforge.io/index.html#Related_Tools_Active_Tools){target=_blank} |
| [**chktex**](https://www.nongnu.org/chktex){target=_blank} | 1.7.6 | <!-- --> | <!-- --> | [LATEX](descriptors/latex_chktex.md) | :white_circle: | [Web Site](https://www.nongnu.org/chktex){target=_blank} |
| [**clippy**](https://github.com/rust-lang/rust-clippy){target=_blank} | 0.1.67 | [Other](licenses/clippy.md) | [![GitHub stars](https://img.shields.io/github/stars/rust-lang/rust-clippy?cacheSeconds=3600)](https://github.com/rust-lang/rust-clippy){target=_blank} | [RUST](descriptors/rust_clippy.md) | :white_circle: | [Repository](https://github.com/rust-lang/rust-clippy){target=_blank} |
| [**clj-kondo**](https://github.com/borkdude/clj-kondo){target=_blank} | 2023.01.20 | [EPL-1.0](licenses/clj-kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo){target=_blank} | [CLOJURE](descriptors/clojure_clj_kondo.md) | :heart: | [MegaLinter reference](https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md#github){target=_blank} |
| [**clj-kondo**](https://github.com/borkdude/clj-kondo){target=_blank} | 2023.02.17 | [EPL-1.0](licenses/clj-kondo.md) | [![GitHub stars](https://img.shields.io/github/stars/borkdude/clj-kondo?cacheSeconds=3600)](https://github.com/borkdude/clj-kondo){target=_blank} | [CLOJURE](descriptors/clojure_clj_kondo.md) | :heart: | [MegaLinter reference](https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md#github){target=_blank} |
| [**coffeelint**](https://github.com/clutchski/coffeelint){target=_blank} | 5.2.11 | [Other](licenses/coffeelint.md) | [![GitHub stars](https://img.shields.io/github/stars/clutchski/coffeelint?cacheSeconds=3600)](https://github.com/clutchski/coffeelint){target=_blank} | [COFFEE](descriptors/coffee_coffeelint.md) | :white_circle: | [Repository](https://github.com/clutchski/coffeelint){target=_blank} |
| [**cpplint**](https://github.com/cpplint/cpplint){target=_blank} | 1.6.1 | [Other](licenses/cpplint.md) | [![GitHub stars](https://img.shields.io/github/stars/cpplint/cpplint?cacheSeconds=3600)](https://github.com/cpplint/cpplint){target=_blank} | [C](descriptors/c_cpplint.md)<br/> [CPP](descriptors/cpp_cpplint.md) | :white_circle: | [Repository](https://github.com/cpplint/cpplint){target=_blank} |
| [**csharpier**](https://github.com/belav/csharpier){target=_blank} | 0.22.1 | [MIT](licenses/csharpier.md) | [![GitHub stars](https://img.shields.io/github/stars/belav/csharpier?cacheSeconds=3600)](https://github.com/belav/csharpier){target=_blank} | [CSHARP](descriptors/csharp_csharpier.md) | :white_circle: | [Repository](https://github.com/belav/csharpier){target=_blank} |
Expand Down
12 changes: 7 additions & 5 deletions docs/descriptors/clojure_clj_kondo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: How to use clj-kondo (configure, ignore files, ignore errors, help

## clj-kondo documentation

- Version in MegaLinter: **2023.01.20**
- Version in MegaLinter: **2023.02.17**
- Visit [Official Web Site](https://github.com/borkdude/clj-kondo#readme){target=_blank}
- See [How to configure clj-kondo rules](https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#configuration){target=_blank}
- If custom `.clj-kondo/config.edn` config file is not found, [.clj-kondo/config.edn](https://github.com/oxsecurity/megalinter/tree/main/TEMPLATES/.clj-kondo/config.edn){target=_blank} will be used
Expand Down Expand Up @@ -91,7 +91,7 @@ clj-kondo --lint --config .clj-kondo/config.edn myfile.clj
### Help content

```shell
clj-kondo v2023.01.20
clj-kondo v2023.02.17


Options:
Expand All @@ -114,7 +114,7 @@ Options:
nearest `.clj-kondo` directory in the current and parent directories.

--config <config>: config may be a file or an EDN expression. See
https://cljdoc.org/d/clj-kondo/clj-kondo/2023.01.20/doc/configuration
https://cljdoc.org/d/clj-kondo/clj-kondo/2023.02.17/doc/configuration

--config-dir <config-dir>: use this config directory instead of auto-detected
.clj-kondo dir.
Expand All @@ -138,7 +138,9 @@ Options:

- Dockerfile commands :
```dockerfile
FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
RUN curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo

```

6 changes: 3 additions & 3 deletions flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#############################################################################################
#FROM__START
FROM mvdan/shfmt:latest-alpine as shfmt
FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker
FROM zricethezav/gitleaks:v8.15.3 as gitleaks
Expand Down Expand Up @@ -243,7 +242,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"

#COPY__START
COPY --from=shfmt /bin/shfmt /usr/bin/
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/
Expand Down Expand Up @@ -301,7 +299,9 @@ RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --c
# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/

# clj-kondo installation
# Managed with COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
&& curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo \

# hadolint installation
# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
Expand Down
6 changes: 3 additions & 3 deletions flavors/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#############################################################################################
#FROM__START
FROM mvdan/shfmt:latest-alpine as shfmt
FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker
FROM yoheimuta/protolint:latest as protolint
Expand Down Expand Up @@ -193,7 +192,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"

#COPY__START
COPY --from=shfmt /bin/shfmt /usr/bin/
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
COPY --from=protolint /usr/local/bin/protolint /usr/bin/
Expand Down Expand Up @@ -227,7 +225,9 @@ RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --c
# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/

# clj-kondo installation
# Managed with COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
&& curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo \

# hadolint installation
# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
Expand Down
9 changes: 6 additions & 3 deletions linters/clojure_clj_kondo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#FROM__START
FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo

#FROM__END

##################
Expand Down Expand Up @@ -114,15 +114,18 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \
#############################################################################################

#COPY__START
COPY --from=clj-kondo /bin/clj-kondo /usr/bin/

#COPY__END

#############################################################################################
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#OTHER__START
# clj-kondo installation
# Managed with COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
RUN curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo


#OTHER__END

Expand Down
6 changes: 4 additions & 2 deletions megalinter/descriptors/clojure.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ linters:
- "clj-kondo --lint --config .clj-kondo/config.edn myfile.clj"
install:
dockerfile:
- FROM cljkondo/clj-kondo:2023.01.20-alpine as clj-kondo
- COPY --from=clj-kondo /bin/clj-kondo /usr/bin/
- |
RUN curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \
&& chmod +x install-clj-kondo \
&& ./install-clj-kondo
ide:
atom:
- name: linter-kondo
Expand Down