Showing 107 of 108 total issues
Function render
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let content = <div />;
let controls;
controls = (
File usage_and_limits.jsx
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from "prop-types";
import React from "react";
import Action from "./action.jsx";
import { Form, FormNumber } from "./form";
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let content = <div />;
if (this.state.empty && this.state.hasErrors) {
content = (
Function spaceDeveloper
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
get spaceDeveloper() {
const org = this.props.org || {};
const space = this.props.space || {};
let content;
`` has 21 functions (exceeds 20 allowed). Consider refactoring. Open
export default {
associateApp(routeGuid, appGuid) {
AppDispatcher.handleViewAction({
type: routeActionTypes.ROUTE_APP_ASSOCIATE,
appGuid,
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { org, spaces, loading, empty } = this.state;
let content = (
<div>
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
// TODO add back in service instance lists
if (this.state.loading) {
return <Loading />;
}
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let content = <div />;
if (this.state.route) {
const route = this.state.route;
Function stateSetter
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stateSetter() {
const currentOrgGuid = OrgStore.currentOrgGuid;
const currentSpaceGuid = SpaceStore.currentSpaceGuid;
const currentType = UserStore.currentlyViewedType;
const currentUser = UserStore.currentUser;
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { disabled, onDismiss } = this.props;
const { name, value } = this.state;
return (
Method Settings.InitSettings
has 71 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (s *Settings) InitSettings(envVars *env.VarSet) (retErr error) {
defer func() {
// While .MustString() is convenient in readability below, we'd prefer
// to convert this to an error for upstream callers.
if r := recover(); r != nil {
Function renderContents
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderContents() {
const { app, envRequest, updateError } = this.props;
const { updating } = app;
const { isFetching, error } = envRequest;
const { showUserEnv, showAddForm, showEnv } = this.state;
Function handleAction
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleAction(action) {
let activity;
switch (action.type) {
case activityActionTypes.EVENTS_FETCH:
this.isFetchingEvents = true;
Function handleAction
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleAction(action) {
switch (action.type) {
case envActionTypes.ENV_FETCH_ENV_REQUEST: {
const { appGuid } = action;
this.envRequests[appGuid] = {
Function handleAction
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleAction(action) {
switch (action.type) {
case orgActionTypes.ORG_RECEIVED: {
const spaces = action.org.spaces || [];
const spacesWithOrgGuid = spaces.map(space => {
Function render
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
render() {
let content = <div />;
if (this.state.route) {
const route = this.state.route;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createUserAndAssociate
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
createUserAndAssociate(userGuid) {
const entityType = UserStore.currentlyViewedType;
const orgGuid = OrgStore.currentOrgGuid;
let cfApiRequest;
let entityGuid;
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const app = this.props.app;
const info = [];
if (this.props.extraInfo.includes("state")) {
Function handleAction
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
handleAction(action) {
switch (action.type) {
case orgActionTypes.ORG_FETCH: {
this.isFetchingOrg = true;
this.emitChange();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function validateInteger
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function validateInteger(options) {
const { max, min } = options || {};
return function _validateInteger(text) {
let value = text || "";
if (!/^-?\d+$/.test(String(value).trim())) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"