Skip to content

Commit

Permalink
Remove leading/trailing newlines following whitespace linter recommen…
Browse files Browse the repository at this point in the history
…dation
  • Loading branch information
artmello committed Dec 6, 2019
1 parent a077482 commit d4fa006
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion kyaml/copyutil/copyutil_test.go
Expand Up @@ -79,7 +79,6 @@ func TestDiff_additionalDestFiles(t *testing.T) {
diff, err := Diff(s, d)
assert.NoError(t, err)
assert.ElementsMatch(t, diff.List(), []string{"a2"})

}

// TestDiff_srcDestContentsDiffer verifies if the file contents
Expand Down
2 changes: 0 additions & 2 deletions kyaml/kio/byteio_reader.go
Expand Up @@ -138,7 +138,6 @@ func (r *ByteReader) Read() ([]*yaml.RNode, error) {
len(values) == 1 && // Only unwrap if there is only 1 value
(meta.Kind == ResourceListKind || meta.Kind == "List") &&
node.Field("items") != nil {

r.WrappingKind = meta.Kind
r.WrappingAPIVersion = meta.APIVersion

Expand All @@ -154,7 +153,6 @@ func (r *ByteReader) Read() ([]*yaml.RNode, error) {
// add items
output = append(output, yaml.NewRNode(items.Value.Content()[i]))
}

}
continue
}
Expand Down
1 change: 0 additions & 1 deletion kyaml/kio/byteio_reader_test.go
Expand Up @@ -87,7 +87,6 @@ elems:

assert.Equal(t, ResourceListKind, r.WrappingKind)
assert.Equal(t, ResourceListAPIVersion, r.WrappingAPIVersion)

}

func TestByteReader_Read_wrappedList(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion kyaml/kio/byteio_writer.go
Expand Up @@ -54,7 +54,6 @@ func (w ByteWriter) Write(nodes []*yaml.RNode) error {
encoder := yaml.NewEncoder(w.Writer)
defer encoder.Close()
for i := range nodes {

// clean resources by removing annotations set by the Reader
if !w.KeepReaderAnnotations {
_, err := nodes[i].Pipe(yaml.ClearAnnotation(kioutil.IndexAnnotation))
Expand Down
2 changes: 0 additions & 2 deletions kyaml/kio/filters/fmtr_test.go
Expand Up @@ -145,7 +145,6 @@ spec:

// TestFormatInput_service verifies a Service yaml is formatted correctly
func TestFormatInput_service(t *testing.T) {

y := `
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -178,7 +177,6 @@ spec:

// TestFormatInput_service verifies a Service yaml is formatted correctly
func TestFormatInput_validatingWebhookConfiguration(t *testing.T) {

y := `
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
Expand Down
2 changes: 0 additions & 2 deletions kyaml/kio/pkgio_reader_test.go
Expand Up @@ -79,7 +79,6 @@ func TestLocalPackageReader_Read_empty(t *testing.T) {
assert.Contains(t, err.Error(), "must specify package path")
}
assert.Nil(t, nodes)

}

func TestLocalPackageReader_Read_pkg(t *testing.T) {
Expand Down Expand Up @@ -207,7 +206,6 @@ func TestLocalPackageReader_Read_pkgOmitAnnotations(t *testing.T) {
{path: s.root},
}
for _, p := range paths {

// empty path
rfr := LocalPackageReader{PackagePath: p.path, OmitReaderAnnotations: true}
nodes, err := rfr.Read()
Expand Down
1 change: 0 additions & 1 deletion kyaml/yaml/example_test.go
Expand Up @@ -872,7 +872,6 @@ func ExampleRNode_Elements() {
// Element: 2
// name: baz
// args: ['run.sh']

}

func ExampleRNode_ElementValues() {
Expand Down
1 change: 0 additions & 1 deletion kyaml/yaml/fns.go
Expand Up @@ -129,7 +129,6 @@ func (c FieldClearer) Filter(rn *RNode) (*RNode, error) {
}

for i := 0; i < len(rn.Content()); i += 2 {

// if name matches, remove these 2 elements from the list because
// they are treated as a fieldName/fieldValue pair.
if rn.Content()[i].Value == c.Name {
Expand Down
1 change: 0 additions & 1 deletion kyaml/yaml/match.go
Expand Up @@ -104,7 +104,6 @@ func (p *PathMatcher) doField(rn *RNode) (*RNode, error) {

// doSeq iterates over a sequence and appends elements matching the path regex to p.Val
func (p *PathMatcher) doSeq(rn *RNode) (*RNode, error) {

// parse the field + match pair
var err error
p.field, p.matchRegex, err = SplitIndexNameValue(p.Path[0])
Expand Down
1 change: 0 additions & 1 deletion kyaml/yaml/merge3/visitor.go
Expand Up @@ -135,7 +135,6 @@ func (m Visitor) getStrValues(nodes walk.Sources) (strValues, error) {
if err != nil {
return strValues{}, err
}

}
if nodes.Dest() != nil && nodes.Dest().YNode() != nil {
s := nodes.Dest().YNode().Style
Expand Down

0 comments on commit d4fa006

Please sign in to comment.