Skip to content

Commit

Permalink
Renamed files and folders for breaking_changes code (GoogleCloudPlatf…
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath authored and rainshen49 committed Aug 12, 2024
1 parent e53178b commit 9bc71af
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"sort"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"testing"
Expand Down Expand Up @@ -42,4 +42,4 @@ var resourceConfigRemovingAResourceTestCases = []resourceInventoryTestCase{
new: nil,
wantViolations: true,
},
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"sort"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package rules
package breaking_changes

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
4 changes: 2 additions & 2 deletions tools/diff-processor/cmd/breaking_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sort"

"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/diff"
"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/rules"
"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/breaking_changes"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -43,7 +43,7 @@ func newBreakingChangesCmd(rootOptions *rootOptions) *cobra.Command {
}
func (o *breakingChangesOptions) run() error {
schemaDiff := o.computeSchemaDiff()
breakingChanges := rules.ComputeBreakingChanges(schemaDiff)
breakingChanges := breaking_changes.ComputeBreakingChanges(schemaDiff)
sort.Slice(breakingChanges, func(i, j int) bool {
return breakingChanges[i].Message < breakingChanges[j].Message
})
Expand Down
4 changes: 2 additions & 2 deletions tools/diff-processor/cmd/breaking_changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/diff"
"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/rules"
"github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor/breaking_changes"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestBreakingChangesCmd(t *testing.T) {
out := make([]byte, buf.Len())
buf.Read(out)

var got []rules.BreakingChange
var got []breaking_changes.BreakingChange
if err = json.Unmarshal(out, &got); err != nil {
t.Fatalf("Failed to unmarshall output: %s", err)
}
Expand Down

0 comments on commit 9bc71af

Please sign in to comment.