You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff -u report_golden report || die "$1: wrong console output for multifile warnings (WORKSPACE exists)"
695
+
696
+
cd ..
697
+
698
+
# Test allowed symbol load locations
699
+
700
+
mkdir test_dir/allowed_locations
701
+
cd test_dir/allowed_locations
702
+
703
+
cat > BUILD <<EOF
704
+
load(":f.bzl", "s1", "s2")
705
+
load(":a.bzl", "s3")
706
+
load(":a.bzl", "s4")
707
+
EOF
708
+
709
+
cat > buildifier.tables <<EOF
710
+
{
711
+
"AllowedSymbolLoadLocations": {
712
+
"s1": [":z.bzl"],
713
+
"s3": [":y.bzl", ":x.bzl"],
714
+
"s4": [":a.bzl"]
715
+
}
716
+
}
717
+
EOF
718
+
719
+
cat > report_golden <<EOF
720
+
BUILD:1: allowed-symbol-load-locations: Symbol "s1" must be loaded from :z.bzl. (https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#allowed-symbol-load-locations)
721
+
BUILD:2: allowed-symbol-load-locations: Symbol "s3" must be loaded from one of the allowed locations: :x.bzl, :y.bzl. (https://github.com/bazelbuild/buildtools/blob/main/WARNINGS.md#allowed-symbol-load-locations)
0 commit comments