Showing 1,395 of 1,395 total issues
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
store: Store<CFAppState>,
datePipe: DatePipe,
scmService: GitSCMService
) {
Function setupList
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private setupList(store: Store<CFAppState>, appService: ApplicationService) {
const listActionAddRoute: IGlobalListAction<APIResource> = {
action: () => {
appService.application$.pipe(
take(1),
Function waitForRow
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function waitForRow() {
// Timeout after 32 attempts (each 5 seconds, which is just under 3 minutes)
let retries = 32;
const sub = timer(5000, 5000).pipe(
switchMap(() => promise.all<boolean | number | TableData[]>([
Function generateCfOrgEntity
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateCfOrgEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
const orgDefinition: IStratosEntityDefinition = {
type: organizationEntityType,
schema: cfEntityFactory(organizationEntityType),
label: 'Organization',
Function constructAmalgamatedObservables
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private constructAmalgamatedObservables() {
// Assign/Amalgamate them to public properties (with mangling if required)
const appStats = cfEntityCatalog.appStats.store.getPaginationService(this.appGuid, this.cfGuid);
// This will fail to fetch the app stats if the current app is not running but we're
// willing to do this to speed up the initial fetch for a running application.
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
store: Store<CFAppState>,
appService: ApplicationService,
datePipe: DatePipe,
currentUserPermissionService: CurrentUserPermissionsService,
Function getPaginationUpdater
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getPaginationUpdater = (types: [string, string, string]) => {
const [requestType, successType, failureType] = types;
return (state: PaginationEntityState = getDefaultPaginationEntityState(), action): PaginationEntityState => {
switch (action.type) {
case requestType:
Function ngOnInit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngOnInit() {
if (!this.connectionStatus) {
return;
}
Function createEndpointTypeFilter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private createEndpointTypeFilter(): IListMultiFilterConfig {
return {
key: BaseEndpointsDataSource.typeFilterKey,
label: 'Endpoint Type',
list$: combineLatest([
Function setActive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
setActive(index: number) {
if (this.basePreviousRedirect && index < 0) {
this.dispatchRedirect(this.basePreviousRedirect);
}
if (!this.canGoto(index)) {
Similar blocks of code found in 3 locations. Consider refactoring. Open
describe('EditQuotaStepComponent', () => {
let component: EditQuotaStepComponent;
let fixture: ComponentFixture<EditQuotaStepComponent>;
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 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 3 locations. Consider refactoring. Open
describe('EditQuotaComponent', () => {
let component: EditQuotaComponent;
let fixture: ComponentFixture<EditQuotaComponent>;
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 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
describe('TableCellAppStatusComponent', () => {
let component: TableCellAppStatusComponent;
let fixture: ComponentFixture<TableCellAppStatusComponent>;
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 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
describe('TableCellAppCfOrgSpaceHeaderComponent', () => {
let component: TableCellAppCfOrgSpaceHeaderComponent;
let fixture: ComponentFixture<TableCellAppCfOrgSpaceHeaderComponent>;
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 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 3 locations. Consider refactoring. Open
describe('EditSpaceQuotaComponent', () => {
let component: EditSpaceQuotaComponent;
let fixture: ComponentFixture<EditSpaceQuotaComponent>;
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 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
Function findFreePort
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findFreePort(beg, ...rest){
const p = rest.slice(0, rest.length - 1), cb = rest[rest.length - 1];
let [end, ip, cnt] = Array.from(p);
if (!ip && end && !/^\d+$/.test(end)) { // deal with method 3
ip = end;
Function ngAfterContentInit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngAfterContentInit(): void {
// Check if wizard has been initiated from the Services Marketplace
if (this.inMarketplaceMode) {
this.initialisedService$ = this.initialiseForMarketplaceMode();
}
Function update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.yAxis) {
this.legendSpacing = 0;
} else {
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(store: Store<CFAppState>, cfGuid: string, listConfig?: IListConfig<IFeatureFlag>) {
const action = cfEntityCatalog.featureFlag.actions.getMultiple(cfGuid);
super({
store,
action,
Function createProvider
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private createProvider(cfGuid: string): ActionListConfigProvider<APIResource<IOrganization>> {
const action = CloudFoundryEndpointService.createGetAllOrganizations(cfGuid);
const provider = new ActionListConfigProvider<APIResource<IOrganization>>(this.store, action);
provider.updateListConfig({