Skip to content

Commit

Permalink
Enable Lint Rule: unexported-naming (#5511)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlamingSaint authored Jun 3, 2024
1 parent fd1b39e commit 3382a27
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ linters-settings:
# definitely a good one, needs cleanup first
- name: argument-limit
disabled: true
# another good one, needs cleanup first
- name: unexported-naming
disabled: true
# maybe enable, needs invesitgation of the impact
- name: import-alias-naming
disabled: true
Expand Down
4 changes: 2 additions & 2 deletions cmd/collector/app/flags/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestCollectorOptionsWithFlags_CheckTLSReloadInterval(t *testing.T) {
"--collector.otlp.http",
"--collector.otlp.grpc",
}
OTLPPrefixes := map[string]struct{}{
otlpPrefixes := map[string]struct{}{
"--collector.otlp.http": {},
"--collector.otlp.grpc": {},
}
Expand All @@ -101,7 +101,7 @@ func TestCollectorOptionsWithFlags_CheckTLSReloadInterval(t *testing.T) {
prefix + ".tls.enabled=true",
prefix + ".tls.reload-interval=24h",
})
if _, ok := OTLPPrefixes[prefix]; !ok {
if _, ok := otlpPrefixes[prefix]; !ok {
require.Error(t, err)
assert.Contains(t, err.Error(), "unknown flag")
} else {
Expand Down
4 changes: 2 additions & 2 deletions cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ func createStorageCleanerConfig(t *testing.T, configFile string, storage string)
}

func purge(t *testing.T) {
Addr := fmt.Sprintf("http://0.0.0.0:%s%s", storagecleaner.Port, storagecleaner.URL)
r, err := http.NewRequestWithContext(context.Background(), http.MethodPost, Addr, nil)
addr := fmt.Sprintf("http://0.0.0.0:%s%s", storagecleaner.Port, storagecleaner.URL)
r, err := http.NewRequestWithContext(context.Background(), http.MethodPost, addr, nil)
require.NoError(t, err)

client := &http.Client{}
Expand Down
12 changes: 6 additions & 6 deletions cmd/query/app/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,16 @@ func TestServerHTTPTLS(t *testing.T) {

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
TLSGRPC := disabledTLSCfg
tlsGrpc := disabledTLSCfg
if test.GRPCTLSEnabled {
TLSGRPC = enabledTLSCfg
tlsGrpc = enabledTLSCfg
}

serverOptions := &QueryOptions{
GRPCHostPort: ports.GetAddressFromCLIOptions(ports.QueryGRPC, ""),
HTTPHostPort: ports.GetAddressFromCLIOptions(ports.QueryHTTP, ""),
TLSHTTP: test.TLS,
TLSGRPC: TLSGRPC,
TLSGRPC: tlsGrpc,
QueryOptionsBase: QueryOptionsBase{
BearerTokenPropagation: true,
},
Expand Down Expand Up @@ -478,14 +478,14 @@ func TestServerGRPCTLS(t *testing.T) {

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
TLSHTTP := disabledTLSCfg
tlsHttp := disabledTLSCfg
if test.HTTPTLSEnabled {
TLSHTTP = enabledTLSCfg
tlsHttp = enabledTLSCfg
}
serverOptions := &QueryOptions{
GRPCHostPort: ports.GetAddressFromCLIOptions(ports.QueryGRPC, ""),
HTTPHostPort: ports.GetAddressFromCLIOptions(ports.QueryHTTP, ""),
TLSHTTP: TLSHTTP,
TLSHTTP: tlsHttp,
TLSGRPC: test.TLS,
QueryOptionsBase: QueryOptionsBase{
BearerTokenPropagation: true,
Expand Down

0 comments on commit 3382a27

Please sign in to comment.