Merge pull request #330454 from Aleksanaa/ci-nixf-tidy
workflows/check-nixf-tidy.yml: temporarily ignore sema-escaping-with
This commit is contained in:
commit
74aba63e9f
14
.github/workflows/check-nixf-tidy.yml
vendored
14
.github/workflows/check-nixf-tidy.yml
vendored
@ -41,6 +41,16 @@ jobs:
|
|||||||
run: "nix-env -f '<nixpkgs>' -iAP nixf jq"
|
run: "nix-env -f '<nixpkgs>' -iAP nixf jq"
|
||||||
- name: Check that Nix files pass nixf-tidy
|
- name: Check that Nix files pass nixf-tidy
|
||||||
run: |
|
run: |
|
||||||
|
# Filtering error messages we don't like
|
||||||
|
nixf_wrapper(){
|
||||||
|
nixf-tidy --variable-lookup < "$1" | jq -r '
|
||||||
|
[
|
||||||
|
"sema-escaping-with"
|
||||||
|
]
|
||||||
|
as $ignored_errors|[.[]|select(.sname as $s|$ignored_errors|index($s)|not)]
|
||||||
|
'
|
||||||
|
}
|
||||||
|
|
||||||
failedFiles=()
|
failedFiles=()
|
||||||
|
|
||||||
# Don't report errors to file overview
|
# Don't report errors to file overview
|
||||||
@ -74,11 +84,11 @@ jobs:
|
|||||||
continue
|
continue
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -n "$source" ]] && [[ "$(nixf-tidy --variable-lookup < ${{ env.base }}/"$source")" != '[]' ]] 2>/dev/null; then
|
if [[ -n "$source" ]] && [[ "$(nixf_wrapper ${{ env.base }}/"$source")" != '[]' ]] 2>/dev/null; then
|
||||||
echo "Ignoring file $file because it doesn't pass nixf-tidy in the base commit"
|
echo "Ignoring file $file because it doesn't pass nixf-tidy in the base commit"
|
||||||
echo # insert blank line
|
echo # insert blank line
|
||||||
else
|
else
|
||||||
nixf_report="$(nixf-tidy --variable-lookup < "$dest")"
|
nixf_report="$(nixf_wrapper "$dest")"
|
||||||
if [[ "$nixf_report" != '[]' ]]; then
|
if [[ "$nixf_report" != '[]' ]]; then
|
||||||
echo "$dest doesn't pass nixf-tidy. Reported by nixf-tidy:"
|
echo "$dest doesn't pass nixf-tidy. Reported by nixf-tidy:"
|
||||||
errors=$(echo "$nixf_report" | jq -r --arg dest "$dest" '
|
errors=$(echo "$nixf_report" | jq -r --arg dest "$dest" '
|
||||||
|
Loading…
Reference in New Issue
Block a user