Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixer: Prep for 1.0 tests #1319

Merged
merged 5 commits into from
Jan 8, 2025
Merged

Conversation

charlieegan3
Copy link
Member

No description provided.

}

deny = true
allow = true #no space
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn’t it used to be that way before because the formatter would rewrite it to
allow = true
and we wanted to make sure we didn’t have that in our output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, originally I didn't want to have the complicated formatting logic in these tests, but I think it's fine and have reverted this in b174300.

[]fixes.Fix{
&fixes.UseAssignmentOperator{},
&fixes.NoWhitespaceComment{},
&fixes.DirectoryPackageMismatch{},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't want formatting here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@@ -14,10 +13,9 @@ func NewDefaultFixes() []Fix {
return []Fix{
&Fmt{},
&Fmt{
// this effectively maps the fix for violations from the
// use-rego-v1 rule to just format the file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@charlieegan3 charlieegan3 merged commit 83b8f33 into StyraInc:opa1.0 Jan 8, 2025
2 of 5 checks passed
@charlieegan3 charlieegan3 deleted the fixer-tests branch January 8, 2025 15:37
anderseknert pushed a commit that referenced this pull request Jan 8, 2025
* fixer: Prep for 1.0 tests

Signed-off-by: Charlie Egan <[email protected]>

* fixer/fmt: Add tests for other rego versions

Signed-off-by: Charlie Egan <[email protected]>

* fixer: Update fixer e2e test

Signed-off-by: Charlie Egan <[email protected]>

* Correct formatting of launch.json

* fixer: Return formatting to Fixer test

Signed-off-by: Charlie Egan <[email protected]>

---------

Signed-off-by: Charlie Egan <[email protected]>
charlieegan3 added a commit that referenced this pull request Jan 9, 2025
* fixer: Prep for 1.0 tests

Signed-off-by: Charlie Egan <[email protected]>

* fixer/fmt: Add tests for other rego versions

Signed-off-by: Charlie Egan <[email protected]>

* fixer: Update fixer e2e test

Signed-off-by: Charlie Egan <[email protected]>

* Correct formatting of launch.json

* fixer: Return formatting to Fixer test

Signed-off-by: Charlie Egan <[email protected]>

---------

Signed-off-by: Charlie Egan <[email protected]>
anderseknert pushed a commit that referenced this pull request Jan 13, 2025
* fixer: Prep for 1.0 tests

Signed-off-by: Charlie Egan <[email protected]>

* fixer/fmt: Add tests for other rego versions

Signed-off-by: Charlie Egan <[email protected]>

* fixer: Update fixer e2e test

Signed-off-by: Charlie Egan <[email protected]>

* Correct formatting of launch.json

* fixer: Return formatting to Fixer test

Signed-off-by: Charlie Egan <[email protected]>

---------

Signed-off-by: Charlie Egan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants