Skip to content

Commit

Permalink
Update linter settings
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-burt committed Nov 27, 2024
1 parent 60430f2 commit cf2a95d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 28 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ linters-settings:
linters:
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- errcheck
Expand All @@ -24,8 +23,6 @@ linters:
- govet
- ineffassign
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- varcheck
6 changes: 3 additions & 3 deletions internal/remote/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ func deleteEmpty(parent map[string]interface{}, key string) {
// contains empty objects. It makes an assumption that there is actually no reason an empty object
// needs to be updated for a Kubernetes resource considering that the server would already have an object
// there on initial create if needed. Things considered empty will be of the form:
// {}
// { metadata: { labels: {}, annotations: {} }
// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } }
//
// {}
// { metadata: { labels: {}, annotations: {} }
// { metadata: { labels: {}, annotations: {} }, spec: { foo: { bar: {} } } }
func isEmptyPatch(patch []byte) bool {
var root map[string]interface{}
err := json.Unmarshal(patch, &root)
Expand Down
4 changes: 3 additions & 1 deletion vm/internal/importers/data-source.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ type DataSourceImporter struct {

// NewDataSourceImporter returns an importer that can resolve paths for the specified datasource.
// It processes entries of the form
// data://{name}[/{path-to-be-resolved}]
//
// data://{name}[/{path-to-be-resolved}]
//
// If no path is provided, it is set to "/"
func NewDataSourceImporter(source datasource.DataSource) *DataSourceImporter {
exact := fmt.Sprintf("%s://%s", dsPrefix, source.Name())
Expand Down
21 changes: 10 additions & 11 deletions vm/internal/importers/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,22 @@ type globEntry struct {
//
// That is, given the following directory structure:
//
// lib
// - a.json
// - b.json
// caller
// - c.libsonnet
// lib
// - a.json
// - b.json
// caller
// - c.libsonnet
//
// where c.libsonnet has the following contents
//
// import 'glob-import:../lib/*.json'
// import 'glob-import:../lib/*.json'
//
// evaluating `c.libsonnet` will return jsonnet code of the following form:
//
// {
// '../lib/a.json': import '../lib/a.json',
// '../lib/b.json': import '../lib/b.json',
// }
//
// {
// '../lib/a.json': import '../lib/a.json',
// '../lib/b.json': import '../lib/b.json',
// }
type GlobImporter struct {
innerVerb string
prefix string
Expand Down
20 changes: 10 additions & 10 deletions vm/vars_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
Copyright 2021 Splunk Inc.
Copyright 2021 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package vm

Expand Down

0 comments on commit cf2a95d

Please sign in to comment.