Skip to content

Commit 679ce87

Browse files
authored
Merge pull request #5437 from gofogo/paasops-6-dupword-v0
chore(codebase): enable dupword linter
2 parents 4276764 + 9a9661a commit 679ce87

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ linters:
44
default: none
55
enable: # golangci-lint help linters
66
- copyloopvar # A linter detects places where loop variables are copied. https://golangci-lint.run/usage/linters/#copyloopvar
7-
- dogsled
7+
- dogsled # Checks assignments with too many blank identifiers. https://golangci-lint.run/usage/linters/#dogsled
8+
- dupword # Duplicate word. https://golangci-lint.run/usage/linters/#dupword
89
- goprintffuncname
910
- govet
1011
- ineffassign

docs/flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
| `--exoscale-apizone="ch-gva-2"` | When using Exoscale provider, specify the API Zone (optional) |
134134
| `--exoscale-apikey=""` | Provide your API Key for the Exoscale provider |
135135
| `--exoscale-apisecret=""` | Provide your API Secret for the Exoscale provider |
136-
| `--rfc2136-host=` | When using the RFC2136 provider, specify the host of the DNS server (optionally specify multiple times when when using --rfc2136-load-balancing-strategy) |
136+
| `--rfc2136-host=` | When using the RFC2136 provider, specify the host of the DNS server (optionally specify multiple times when using --rfc2136-load-balancing-strategy) |
137137
| `--rfc2136-port=0` | When using the RFC2136 provider, specify the port of the DNS server |
138138
| `--rfc2136-zone=RFC2136-ZONE` | When using the RFC2136 provider, specify zone entry of the DNS server to use (can be specified multiple times) |
139139
| `--[no-]rfc2136-create-ptr` | When using the RFC2136 provider, enable PTR management |

endpoint/crypto_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestEncrypt(t *testing.T) {
4545
t.Error("Data decryption failed, empty string should be as result")
4646
}
4747

48-
// Verify that decrypt returns an error and empty data if unencrypted input is is supplied
48+
// Verify that decrypt returns an error and empty data if unencrypted input is supplied
4949
decryptedtext, _, err = DecryptText(plaintext, aesKey)
5050
require.Error(t, err)
5151
if decryptedtext != "" {

pkg/apis/externaldns/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ func App(cfg *Config) *kingpin.Application {
587587
app.Flag("exoscale-apisecret", "Provide your API Secret for the Exoscale provider").Default(defaultConfig.ExoscaleAPISecret).StringVar(&cfg.ExoscaleAPISecret)
588588

589589
// Flags related to RFC2136 provider
590-
app.Flag("rfc2136-host", "When using the RFC2136 provider, specify the host of the DNS server (optionally specify multiple times when when using --rfc2136-load-balancing-strategy)").Default(defaultConfig.RFC2136Host[0]).StringsVar(&cfg.RFC2136Host)
590+
app.Flag("rfc2136-host", "When using the RFC2136 provider, specify the host of the DNS server (optionally specify multiple times when using --rfc2136-load-balancing-strategy)").Default(defaultConfig.RFC2136Host[0]).StringsVar(&cfg.RFC2136Host)
591591
app.Flag("rfc2136-port", "When using the RFC2136 provider, specify the port of the DNS server").Default(strconv.Itoa(defaultConfig.RFC2136Port)).IntVar(&cfg.RFC2136Port)
592592
app.Flag("rfc2136-zone", "When using the RFC2136 provider, specify zone entry of the DNS server to use (can be specified multiple times)").StringsVar(&cfg.RFC2136Zone)
593593
app.Flag("rfc2136-create-ptr", "When using the RFC2136 provider, enable PTR management").Default(strconv.FormatBool(defaultConfig.RFC2136CreatePTR)).BoolVar(&cfg.RFC2136CreatePTR)

provider/ns1/ns1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444
defaultTTL = 10
4545
)
4646

47-
// NS1DomainClient is a subset of the NS1 API the the provider uses, to ease testing
47+
// NS1DomainClient is a subset of the NS1 API the provider uses, to ease testing
4848
type NS1DomainClient interface {
4949
CreateRecord(r *dns.Record) (*http.Response, error)
5050
DeleteRecord(zone string, domain string, t string) (*http.Response, error)

provider/rfc2136/rfc2136_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ func TestRfc2136ApplyChanges(t *testing.T) {
600600
}
601601

602602
// These tests all use the foo.com and foobar.com zones with no filters
603-
// createMsgs and updateMsgs need sorted when are are used
603+
// createMsgs and updateMsgs need sorted when are used
604604
func TestRfc2136ApplyChangesWithZones(t *testing.T) {
605605
stub := newStub()
606606
provider, err := createRfc2136StubProviderWithZones(stub)
@@ -664,7 +664,7 @@ func TestRfc2136ApplyChangesWithZones(t *testing.T) {
664664
}
665665

666666
// These tests use the foo.com and foobar.com zones and with filters set to both zones
667-
// createMsgs and updateMsgs need sorted when are are used
667+
// createMsgs and updateMsgs need sorted when are used
668668
func TestRfc2136ApplyChangesWithZonesFilters(t *testing.T) {
669669
stub := newStub()
670670
provider, err := createRfc2136StubProviderWithZonesFilters(stub)

provider/transip/transip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (p *TransIPProvider) ApplyChanges(ctx context.Context, changes *plan.Change
9797
// refresh zone mapping
9898
zoneMap := provider.ZoneIDName{}
9999
for _, zone := range zones {
100-
// TransIP API doesn't expose a unique identifier for zones, other than than
100+
// TransIP API doesn't expose a unique identifier for zones, other than
101101
// the domain name itself
102102
zoneMap.Add(zone.Name, zone.Name)
103103
}

provider/transip/transip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func TestProviderRecords(t *testing.T) {
238238
switch {
239239
case req.Endpoint == "/domains":
240240
// return list of some domain names
241-
// names only, other fields are not used
241+
// only, other fields are not used
242242
data = []byte(`{"domains":[{"name":"example.org"}, {"name":"example.com"}]}`)
243243
case strings.HasSuffix(req.Endpoint, "/dns"):
244244
// return list of DNS entries

0 commit comments

Comments
 (0)