We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 601d72f commit 3c4b426Copy full SHA for 3c4b426
integration-tests/run.sh
@@ -50,8 +50,19 @@ normalize_config() {
50
' "$file" | sort
51
;;
52
xml)
53
- # For XML files, do not sort, just output as-is
54
- cat "$file"
+ # For XML files, ignore order of <rule ref=.../> lines for comparison
+ awk '
55
+ BEGIN { n = 0; end = ""; }
56
+ /^ *<rule ref=/ { rules[++n] = $0; next }
57
+ /^ *<\/ruleset>/ { end = $0; next }
58
+ { print }
59
+ END {
60
+ # Sort and print rules
61
+ n = asort(rules, sorted_rules)
62
+ for (i = 1; i <= n; i++) print sorted_rules[i]
63
+ if (end) print end
64
+ }
65
+ ' "$file"
66
67
*)
68
# For other files, just sort
0 commit comments