feat: automatically handle ktlint updates (#5049)

This commit is contained in:
Marco Ferrari 2023-12-24 14:47:34 +01:00 committed by GitHub
parent b214a59ca7
commit fa7cb563d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 1 deletions

View file

@ -65,6 +65,14 @@ updates:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "gradle"
commit-message:
prefix: "deps(java)"
directory: "/dependencies/ktlint"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
# Maintain dev dependencies for docker
- package-ecosystem: "docker"
commit-message:

View file

@ -252,7 +252,6 @@ RUN /install-clj-kondo.sh && rm -rf /install-clj-kondo.sh
##################
# Install ktlint #
##################
ARG KTLINT_VERSION='0.47.1'
COPY scripts/install-ktlint.sh /
RUN --mount=type=secret,id=GITHUB_TOKEN /install-ktlint.sh && rm -rf /install-ktlint.sh

12
dependencies/ktlint/build.gradle vendored Normal file
View file

@ -0,0 +1,12 @@
repositories {
mavenLocal()
mavenCentral()
}
// Hold this dependency here so we can get automated updates using DependaBot
dependencies {
implementation 'com.pinterest.ktlint:ktlint-cli:0.47.1'
}
group 'com.github.super-linter'
version '1.0.0-SNAPSHOT'

View file

@ -2,6 +2,12 @@
set -euo pipefail
KTLINT_VERSION="$(
set -euo pipefail
grep <"ktlint/build.gradle" "ktlint" | awk -F ':' '{print $3}' | tr -d "'"
)"
echo "Installing Ktlint: ${KTLINT_VERSION}"
url=$(
set -euo pipefail
curl -s \