Skip to content

Commit

Permalink
add broken test case which reorders and separates imports
Browse files Browse the repository at this point in the history
We split into three groups rather than two.
Fixing this right now is tricky, due to go/ast positions.
However, we can add the test case to increase test coverage,
and to ensure that we don't lose the reproducer.

For #225.
  • Loading branch information
mvdan committed Apr 8, 2023
1 parent 05ac8b3 commit 48add90
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions testdata/script/std-imports.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ import (

"nodomainother/mod.withdot/pkg1"
)

// TODO: fix issue 225.
import (
"path/filepath"
"time"
"github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/yaml"
)
-- foo.go.golden --
package p

Expand Down Expand Up @@ -171,3 +180,14 @@ import (
"io"
"nodomainother/mod.withdot/pkg1"
)

// TODO: fix issue 225.
import (
"path/filepath"
"time"

"github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
"k8s.io/apimachinery/pkg/types"

"sigs.k8s.io/yaml"
)

0 comments on commit 48add90

Please sign in to comment.