diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c59d32e..a36fdcb7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,8 @@ repos: rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0 hooks: - id: fmt + # Pinning to a specific rustc version, so that we get consistent formatting + entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt args: ["--all", "--", "--check"] - id: clippy args: ["--all-targets", "--", "-D", "warnings"] diff --git a/deploy/helm/trino-operator/templates/deployment.yaml b/deploy/helm/trino-operator/templates/deployment.yaml index 39a90322..9562e490 100644 --- a/deploy/helm/trino-operator/templates/deployment.yaml +++ b/deploy/helm/trino-operator/templates/deployment.yaml @@ -16,8 +16,8 @@ spec: metadata: annotations: internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - {{- with .Values.podAnnotations }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..e25d3967 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,5 @@ +# This file includes unstable features, so you need to run "cargo +nightly fmt" to format your code. +# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered. + +imports_granularity = "Crate" +group_imports = "StdExternalCrate"