Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Lint Rule: unexported-naming #5511

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading