Skip to content

Commit ab04894

Browse files
authored
Merge pull request #417 from ndeloof/fix_lint
2 parents 8e0e2c3 + 82b4b2e commit ab04894

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ build-validate-image:
3232

3333
.PHONY: lint
3434
lint: build-validate-image
35-
docker run --rm $(IMAGE_PREFIX)validate bash -c "golangci-lint run --config ./golangci.yml ./..."
35+
docker run --rm $(IMAGE_PREFIX)validate bash -c "golangci-lint run --config ./.golangci.yml ./..."
3636

3737
.PHONY: check-license
3838
check-license: build-validate-image

loader/loader.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,13 +750,6 @@ func resolveMaybeUnixPath(workingDir string, path string) string {
750750
return filePath
751751
}
752752

753-
func resolveSecretsPath(secret types.SecretConfig, workingDir string, lookupEnv template.Mapping) types.SecretConfig {
754-
if !secret.External.External && secret.File != "" {
755-
secret.File = resolveMaybeUnixPath(workingDir, secret.File)
756-
}
757-
return secret
758-
}
759-
760753
// TODO: make this more robust
761754
func expandUser(path string) string {
762755
if strings.HasPrefix(path, "~") {

loader/loader_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,10 +1901,7 @@ func TestComposeFileWithVersion(t *testing.T) {
19011901
config, err := loadYAMLWithEnv(string(b), env)
19021902
assert.NilError(t, err)
19031903

1904-
workingDir, err := os.Getwd()
1905-
assert.NilError(t, err)
1906-
1907-
expectedConfig := withVersionExampleConfig(workingDir, homeDir)
1904+
expectedConfig := withVersionExampleConfig()
19081905

19091906
sort.Slice(config.Services, func(i, j int) bool {
19101907
return config.Services[i].Name > config.Services[j].Name

loader/with-version-struct_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ import (
2020
"github.com/compose-spec/compose-go/types"
2121
)
2222

23-
func withVersionExampleConfig(workingDir, homeDir string) *types.Config {
23+
func withVersionExampleConfig() *types.Config {
2424
return &types.Config{
25-
Services: withVersionServices(workingDir, homeDir),
25+
Services: withVersionServices(),
2626
Networks: withVersionNetworks(),
2727
Volumes: withVersionVolumes(),
2828
}
2929
}
3030

31-
func withVersionServices(workingDir, homeDir string) []types.ServiceConfig {
31+
func withVersionServices() []types.ServiceConfig {
3232
return []types.ServiceConfig{
3333
{
3434
Name: "web",

schema/schema.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
package schema
1818

1919
import (
20+
// Enable support for embedded static resources
21+
_ "embed"
2022
"fmt"
2123
"strings"
2224
"time"
2325

2426
"github.com/xeipuuv/gojsonschema"
25-
26-
// Enable support for embedded static resources
27-
_ "embed"
2827
)
2928

3029
type portsFormatChecker struct{}
3130

32-
func (checker portsFormatChecker) IsFormat(input interface{}) bool {
31+
func (checker portsFormatChecker) IsFormat(_ interface{}) bool {
3332
// TODO: implement this
3433
return true
3534
}

0 commit comments

Comments
 (0)