File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11* .pyc
22.idea
33
4+ regressionfiles.diff
5+ regressionfiles_nocomments.yaml
6+ regressionfiles_sorted.yaml
7+
48# input files
59* .in
610
Original file line number Diff line number Diff line change 99 rev : " v5.0.0"
1010 hooks :
1111 - id : check-yaml
12+ - repo : local
13+ hooks :
14+ - id : sort-regressionfiles-yaml
15+ name : Sort regressionfiles.yaml
16+ entry : ./sort_regressionfiles_yaml.sh
17+ language : script
18+ files : ^regressionfiles\.yaml$
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ if ! command -v jq >& /dev/null; then
6+ echo " 'jq' not installed"
7+ exit 1
8+ fi
9+ if ! command -v yq >& /dev/null; then
10+ echo " 'yq' not installed"
11+ exit 1
12+ fi
13+
14+ yq -y ' .' regressionfiles.yaml > regressionfiles_nocomments.yaml
15+ yq -y -s ' .[0].regressions|=sort_by(.loc_entry)|.[0]' regressionfiles.yaml > regressionfiles_sorted.yaml
16+ if ! git diff --no-index regressionfiles_nocomments.yaml regressionfiles_sorted.yaml > regressionfiles.diff; then
17+ cat regressionfiles.diff
18+ exit 1
19+ fi
You can’t perform that action at this time.
0 commit comments