Skip to content
Merged
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
2 changes: 1 addition & 1 deletion internal/local/command_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"zookeeper",
"kraft-controller",
"kafka",
"schema-registry",

Check failure on line 41 in internal/local/command_services.go

View check run for this annotation

SonarQube-Confluent / cli Sonarqube Results

internal/local/command_services.go#L41

Define a constant instead of duplicating this literal "schema-registry" 13 times.
},
stopDependencies: []string{},
port: 8083,
Expand All @@ -51,7 +51,7 @@
"kafka",
"schema-registry",
"connect",
"ksql-server",

Check failure on line 54 in internal/local/command_services.go

View check run for this annotation

SonarQube-Confluent / cli Sonarqube Results

internal/local/command_services.go#L54

Define a constant instead of duplicating this literal "ksql-server" 8 times.
},
stopDependencies: []string{},
port: 9021,
Expand All @@ -68,7 +68,7 @@
"control-center",
"ksql-server",
"connect",
"kafka-rest",

Check failure on line 71 in internal/local/command_services.go

View check run for this annotation

SonarQube-Confluent / cli Sonarqube Results

internal/local/command_services.go#L71

Define a constant instead of duplicating this literal "kafka-rest" 7 times.
"schema-registry",
},
port: 9092,
Expand Down Expand Up @@ -371,7 +371,7 @@
return top(pids)
}

func (c *command) getConfig(service string) (map[string]string, error) {

Check failure on line 374 in internal/local/command_services.go

View check run for this annotation

SonarQube-Confluent / cli Sonarqube Results

internal/local/command_services.go#L374

Refactor this method to reduce its Cognitive Complexity from 39 to the 15 allowed.
data, err := c.cc.GetDataDir(service)
if err != nil {
return map[string]string{}, err
Expand Down Expand Up @@ -467,7 +467,7 @@
config["dataDir"] = data
}

if isCP && slices.Contains([]string{"connect", "kafka-rest", "ksql-server", "schema-registry"}, service) {
if isCP && slices.Contains([]string{"connect", "kafka-rest", "ksql-server", "schema-registry"}, service) && zookeeperMode {
config["consumer.interceptor.classes"] = "io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor"
config["producer.interceptor.classes"] = "io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor"
}
Expand Down