Skip to content

Commit

Permalink
Remove leaked-internal-reference comments
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Egan <charlie@styra.com>
  • Loading branch information
charlieegan3 authored and anderseknert committed Oct 31, 2024
1 parent e07a5d7 commit 1291b02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
8 changes: 4 additions & 4 deletions bundle/regal/config/exclusion_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test_all_cases_are_as_expected if {
some pattern, subcases in cases
res := {file |
some file, exp in subcases
act := config._exclude(pattern, file) # regal ignore:leaked-internal-reference
act := config._exclude(pattern, file)
exp != act
}
count(res) > 0
Expand Down Expand Up @@ -92,7 +92,7 @@ test_excluded_file_cli_overrides_config if {
}

test_trailing_slash if {
config._trailing_slash("foo/**/bar") == {"foo/**/bar", "foo/**/bar/**"} # regal ignore:leaked-internal-reference
config._trailing_slash("foo") == {"foo", "foo/**"} # regal ignore:leaked-internal-reference
config._trailing_slash("foo/**") == {"foo/**"} # regal ignore:leaked-internal-reference
config._trailing_slash("foo/**/bar") == {"foo/**/bar", "foo/**/bar/**"}
config._trailing_slash("foo") == {"foo", "foo/**"}
config._trailing_slash("foo/**") == {"foo/**"}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,14 @@ test_package_name_completion_on_typing_multiple_suggestions_when_invoked if {
}

test_build_suggestions if {
# regal ignore:leaked-internal-reference
provider._suggestions("foo.bar.baz", {"text": "foo"}) == ["foo.bar.baz"]

# regal ignore:leaked-internal-reference
provider._suggestions("foo.bar.baz", {"text": "bar"}) == ["bar.baz"]

# regal ignore:leaked-internal-reference
provider._suggestions("foo.bar.baz", {"text": "ba"}) == ["bar.baz", "baz"]
}

test_build_suggestions_invoked if {
# regal ignore:leaked-internal-reference
provider._suggestions("foo.bar.baz", {"text": ""}) == [
"foo.bar.baz",
"bar.baz",
Expand Down
3 changes: 0 additions & 3 deletions bundle/regal/main/main_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ test_main_lint if {
test_rules_to_run_not_excluded if {
cfg := {"rules": {"testing": {"test": {"level": "error"}}}}

# regal ignore:leaked-internal-reference
rules_to_run := main._rules_to_run with config.merged_config as cfg
with config.for_rule as {"level": "error"}
with input.regal.file.name as "p.rego"
Expand All @@ -370,7 +369,6 @@ test_notices if {
"severity": "none",
}

# regal ignore:leaked-internal-reference
notices := main.lint.notices with main._rules_to_run as {"idiomatic": {"testme"}}
with data.regal.rules.idiomatic.testme.notices as {notice}

Expand All @@ -397,7 +395,6 @@ test_report_custom_rule_failure if {
}

test_aggregate_bundled_rule if {
# regal ignore:leaked-internal-reference
agg := main.aggregate with main._rules_to_run as {"foo": {"bar"}}
with data.regal.rules as {"foo": {"bar": {"aggregate": {"baz"}}}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ test_aggregate_rule_surfaces_refs if {
}

test_import_graph if {
# regal ignore:leaked-internal-reference
r := rule._import_graph with input as {"aggregate": {
{
"aggregate_data": {"refs": {{"location": {"col": 12, "row": 3}, "package_path": "data.policy.b"}}},
Expand Down Expand Up @@ -130,7 +129,6 @@ test_import_graph if {
}

test_import_graph_self_import if {
# regal ignore:leaked-internal-reference
r := rule._import_graph with input as {"aggregate": {{
"aggregate_data": {"refs": {{"location": {"col": 12, "row": 4}, "package_path": "data.example"}}},
"aggregate_source": {"file": "example.rego", "package_path": ["example"]},
Expand All @@ -141,7 +139,6 @@ test_import_graph_self_import if {
}

test_self_reachable if {
# regal ignore:leaked-internal-reference
r := rule._self_reachable with rule._import_graph as {
"data.policy.a": {"data.policy.b"},
"data.policy.b": {"data.policy.c"}, "data.policy.c": {"data.policy.a"},
Expand All @@ -151,7 +148,6 @@ test_self_reachable if {
}

test_groups if {
# regal ignore:leaked-internal-reference
r := rule._groups with rule._import_graph as {
"data.policy.a": {"data.policy.b"},
"data.policy.b": {"data.policy.c"},
Expand All @@ -170,14 +166,12 @@ test_groups if {
}

test_groups_empty_graph if {
# regal ignore:leaked-internal-reference
r := rule._groups with rule._import_graph as {"data.policy.a": {}}

r == set()
}

test_package_locations if {
# regal ignore:leaked-internal-reference
r := rule._package_locations with input as {"aggregate": {
{
"aggregate_data": {"refs": {{"location": {"col": 12, "row": 3}, "package_path": "data.policy.b"}}},
Expand Down

0 comments on commit 1291b02

Please sign in to comment.