Skip to content

Commit

Permalink
Remove code that set the ref head env var (#353)
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Eknert <anders@styra.com>
  • Loading branch information
anderseknert committed Sep 30, 2023
1 parent de17845 commit 57d77d1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Regal

[![Build Status](https://github.com/styrainc/regal/workflows/Build/badge.svg?branch=main)](https://github.com/styrainc/regal/actions)
![OPA v0.56.0](https://openpolicyagent.org/badge/v0.56.0)
![OPA v0.57.0](https://openpolicyagent.org/badge/v0.57.0)

Regal is a linter for [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/), with the goal of making your
Rego magnificent!
Expand Down
5 changes: 1 addition & 4 deletions internal/test/rego_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import (
"github.com/styrainc/regal/pkg/builtins"
)

// nolint:paralleltest,tparallel
func TestRunRegoUnitTests(t *testing.T) {
// TODO: Temporary until this requirement is removed from OPA
// Once removed, re-add t.Parallel()
t.Setenv("EXPERIMENTAL_GENERAL_RULE_REFS", "true")
t.Parallel()

ctx := context.Background()
bdl := filepath.Join("..", "..", "bundle")
Expand Down
5 changes: 0 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ func main() {
// Evaluate options for logging later
log.SetFlags(0)

// TODO: Temporary until this requirement is removed from OPA
if err := os.Setenv("EXPERIMENTAL_GENERAL_RULE_REFS", "true"); err != nil {
log.Fatal(err)
}

if err := cmd.RootCommand.Execute(); err != nil {
os.Exit(1)
}
Expand Down
11 changes: 0 additions & 11 deletions pkg/linter/linter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package linter
import (
"bytes"
"context"
"log"
"os"
"path/filepath"
"testing"

Expand All @@ -17,15 +15,6 @@ import (
"github.com/styrainc/regal/pkg/rules"
)

func TestMain(m *testing.M) {
// Temporary until this requirement is removed from OPA
if err := os.Setenv("EXPERIMENTAL_GENERAL_RULE_REFS", "true"); err != nil {
log.Fatal(err)
}

os.Exit(m.Run())
}

func TestLintWithDefaultBundle(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 57d77d1

Please sign in to comment.