File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
actions/detect-relevant-changes Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 5454 DEFAULT_TYPE_PATTERNS[cmake]=$'CMakeLists.txt\n*.cmake'
5555 DEFAULT_TYPE_PATTERNS[python]=$'*.py'
5656 DEFAULT_TYPE_PATTERNS[jsonnet]=$'*.jsonnet\n*.libsonnet'
57-
57+ declare -A NON_GENERATED_TYPES
58+ NON_GENERATED_TYPES[jsonnet]="1"
59+
5860 parse_list() {
5961 local input="$1"
6062 printf '%s' "$input" | tr ',' '\n' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d'
@@ -126,6 +128,9 @@ runs:
126128 }
127129
128130 for type in "${REQUESTED_TYPES[@]}"; do
131+ if [ -n "${NON_GENERATED_TYPES[$type]}" ]; then
132+ continue
133+ fi
129134 patterns=${TYPE_PATTERNS[$type]:-}
130135 if [ -z "$patterns" ]; then
131136 echo "::warning::No patterns defined for type '$type'"
Original file line number Diff line number Diff line change @@ -101,7 +101,8 @@ jobs:
101101 id : lint
102102 working-directory : ${{ env.local_checkout_path }}
103103 run : |
104- find . \( -name "*.jsonnet" -o -name "*.jsonnet.in" -o -name "*.libsonnet" -o -name "*.libsonnet.in" \) -exec jsonnetfmt --test {} \;
104+ find . \( -name "*.jsonnet" -o -name "*.libsonnet" \) -print0 | xargs -0 -r -I {} \
105+ bash -c 'jsonnetfmt --test "{}" || (echo "FAILED: {}" && diff -u <(jsonnetfmt "{}") "{}" && exit 1)'
105106 continue-on-error : true
106107
107108 - name : Evaluate jsonnetfmt result
Original file line number Diff line number Diff line change 8181 id : lint
8282 working-directory : ${{ env.local_checkout_path }}
8383 run : |
84- find . \( -name "*.jsonnet" -o -name "*.jsonnet.in" -o -name "*.libsonnet" -o -name "*.libsonnet.in" \) -exec jsonnetfmt -i {} \;
84+ find . \( -name "*.jsonnet" -o -name "*.libsonnet" \) -print0 | xargs -0 -r jsonnetfmt -i
8585 continue-on-error : true
8686
8787 - name : Handle fix commit
You can’t perform that action at this time.
0 commit comments