Showing 151 of 386 total issues
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { productName } = this.props;
const { settings, errors } = this.state;
let networkErrors;
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { virtualMachine, nav, notifications, role, category } = this.props;
let state;
if (! notifications.alert && ! notifications.aggregate &&
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { virtualMachine, onClose } = this.props;
let name;
let closeControl;
File Utilization.js
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
Function DirectorySection
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DirectorySection = (props) => {
const { productName, role, settings, onOpen } = props;
const directory = settings.directory || {};
let contents;
Function createActivity
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createActivity () {
// associate alerts and tasks with resources
let resources = [];
SCHEMA.filter(category => (
'alerts' !== category.name && 'tasks' !== category.name &&
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { item, index, onlyActiveStatus, includeResource } = this.props;
let separator;
if (0 === index) {
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
let { image, fileName, errors } = this.state;
const osType = image.osType || {};
let osTypeField;
Function DirectorySection
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
const DirectorySection = (props) => {
const { productName, role, settings, onOpen } = props;
const directory = settings.directory || {};
let contents;
- 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 render
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { productName } = this.props;
const software = this.props.software || {};
const hypervisorVersion =
(software.hypervisor ? software.hypervisor.version : '--');
File SettingsEdit.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { loadSettings, updateSettings, settingsResponsive,
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { index, role, uploads } = this.props;
const { searchText } = this.state;
const result = index.result || {};
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
let { size, errors } = this.state;
let removeControl;
if (this.props.removable) {
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { network, errors } = this.state;
let removeControl;
if (this.props.onRemove) {
removeControl = (
Function _onSubmit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onSubmit () {
const { directory, phase } = this.props;
const { credentials, needCredentials } = this.state;
let errors = {...this.state.errors};
let noErrors = true;
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { index, role } = this.props;
const { filterActive, searchText } = this.state;
const result = index.result || {};
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { index } = this.props;
const filter = index.filter || {};
return (
<Layer align='right' flush={true} closer={false}
Function NodesSection
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const NodesSection = (props) => {
const { productName, role, settings, onOpen } = props;
const nodes = settings.nodes || [];
let contents;
- 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 sessionWatcher
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function sessionWatcher () {
const {route, session, status} = store.getState();
if (route && route.location) {
if (route.masterRoute && (! route.ignoreMasterUntil ||
- 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 buildParams
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function buildParams (config, query, filter, sort) {
let result = {
category: config.category,
count: pageSize,
start: 0
- 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"