Showing 1,395 of 1,395 total issues
Function buildMetricData
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
metricName: string,
data: PaginationResponse<AppAutoscalerMetricData>,
startTime: number,
endTime: number,
skipFormat: boolean,
Function _normalize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var _normalize = function normalize(schema, input, parent, key, visit, addEntity, visitedEntities) {
Function handleOrgRoleChange
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
state: IAllCfRolesState,
endpointGuid: string,
cf: ICfRolesState,
orgGuid: string,
orgState: IOrgRoleState,
Function buildMetricsChartConfig
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
metricsAction: MetricsAction,
yAxisLabel: string,
getSeriesName: (result) => string,
dataType: ChartDataTypes = null,
filterSeries?: MetricsFilterSeries,
Method Monocular.artifactHubGetIcon
has 8 return statements (exceeds 4 allowed). Open
func (m *Monocular) artifactHubGetIcon(c echo.Context) error {
endpoint := c.Param("guid")
repo := c.Param("repo")
chartName := c.Param("name")
version := c.Param("version")
Function KubeDashboardProxy
has 8 return statements (exceeds 4 allowed). Open
func KubeDashboardProxy(c echo.Context, p interfaces.PortalProxy, config *rest.Config) error {
log.Debugf("KubeDashboardProxy request for: %s", c.Request().RequestURI)
cnsiGUID := c.Param("guid")
prefix := "/pp/v1/apps/kubedash/ui/" + cnsiGUID + "/"
Method KubernetesSpecification.Info
has 8 return statements (exceeds 4 allowed). Open
func (c *KubernetesSpecification) Info(apiEndpoint string, skipSSLValidation bool) (interfaces.CNSIRecord, interface{}, error) {
log.Debug("Kubernetes Info")
var v2InfoResponse interfaces.V2Info
var newCNSI interfaces.CNSIRecord
Method MetricsSpecification.createMetadata
has 8 return statements (exceeds 4 allowed). Open
func (m *MetricsSpecification) createMetadata(metricEndpoint *url.URL, httpClient http.Client, auth *MetricsAuth) (string, error) {
basicMetricRequest := fmt.Sprintf("%s/api/v1/query?query=firehose_total_metrics_received", metricEndpoint)
req, err := http.NewRequest("GET", basicMetricRequest, nil)
if err != nil {
msg := "Failed to create request for the Metrics Endpoint: %v"
Function getSSHCode
has 8 return statements (exceeds 4 allowed). Open
func getSSHCode(authorizeEndpoint, clientID, token string, skipSSLValidation bool) (string, error) {
authorizeURL, err := url.Parse(authorizeEndpoint)
if err != nil {
return "", err
}
Function InstallDashboard
has 8 return statements (exceeds 4 allowed). Open
func InstallDashboard(p interfaces.PortalProxy, endpointGUID, userGUID string) error {
// Download the Yaml for the dashboard
kubeDashboardImage := p.Env().String("STRATOS_KUBERNETES_DASHBOARD_IMAGE", "")
if len(kubeDashboardImage) == 0 {
kubeDashboardImage = dashboardInstallYAMLDownloadURL
Function init
has 8 return statements (exceeds 4 allowed). Open
func init() {
RegisterMigration(20170818120003, "InitialSchema", func(txn *sql.Tx, conf *goose.DBConf) error {
binaryDataType := "BYTEA"
if strings.Contains(conf.Driver.Name, "mysql") {
binaryDataType = "BLOB"
Function saveUAAConsoleConfig
has 8 return statements (exceeds 4 allowed). Open
func saveUAAConsoleConfig(consoleRepo console_config.Repository, consoleConfig *interfaces.ConsoleConfig) error {
log.Debugf("Saving ConsoleConfig: %+v", consoleConfig)
if err := consoleRepo.SetValue(systemGroupName, "UAA_ENDPOINT", consoleConfig.UAAEndpoint.String()); err != nil {
return err
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe('PodMetricsComponent', () => {
let component: PodMetricsComponent;
let fixture: ComponentFixture<PodMetricsComponent>;
beforeEach(async(() => {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 206.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe('KubernetesTabBaseComponent', () => {
let component: KubernetesTabBaseComponent;
let fixture: ComponentFixture<KubernetesTabBaseComponent>;
beforeEach(async(() => {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 206.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe('AutoscalerMetricPageComponent', () => {
let component: AutoscalerMetricPageComponent;
let fixture: ComponentFixture<AutoscalerMetricPageComponent>;
beforeEach(async(() => {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 206.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe('EditAutoscalerPolicyStep1Component', () => {
let component: EditAutoscalerPolicyStep1Component;
let fixture: ComponentFixture<EditAutoscalerPolicyStep1Component>;
beforeEach(async(() => {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 206.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func mergeEndpoints(first, second []*interfaces.CNSIRecord) []*interfaces.CNSIRecord {
if first == nil {
return second
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 217.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func mergeConnectedEndpoints(first, second []*interfaces.ConnectedEndpoint) []*interfaces.ConnectedEndpoint {
if first == nil {
return second
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 217.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method UserInvite.checkPermissions
has 7 return statements (exceeds 4 allowed). Open
func (invite *UserInvite) checkPermissions(c echo.Context, endpoint interfaces.CNSIRecord, userInviteRequest *UserInviteReq) error {
cfGUID := c.Param("id")
userGUID := c.Get("user_id").(string)
// Get the User information for the endpoint connection
Method CFAppPush.getGitSCMSource
has 7 return statements (exceeds 4 allowed). Open
func (cfAppPush *CFAppPush) getGitSCMSource(clientWebSocket *websocket.Conn, tempDir string, msg SocketMessage, userGUID string) (StratosProject, string, error) {
var (
err error
)