Showing 151 of 386 total issues
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { productName } = this.props;
return (
<Article scrollStep={true} controls={true}>
<Section full={true}
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { support, role } = this.props;
let status, message, details, control;
if (support.creating) {
Function TextTerm
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function TextTerm (text) {
this._not = false;
this._text = text;
// if the string is quoted, require matching at both ends
Function getAggregate
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAggregate (url, queryParams) {
let items = getItems(queryParams.category) || [];
items = filteredItems(items, queryParams);
let attributes;
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { virtualMachine } = this.state;
let guidance;
if ('Online' === virtualMachine.state) {
Function HypervisorSection
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const HypervisorSection = (props) => {
const { productName, role, settings, onOpen } = props;
const hypervisor = settings.hypervisor || {};
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 _renderBaseFields
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderBaseFields () {
const { directory, phase, productName, settings } = this.props;
const { errors } = this.state;
let directoryErrors;
Function sessionWatcher
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sessionWatcher () {
const {route, session, status} = store.getState();
if (route && route.location) {
if (route.masterRoute && (! route.ignoreMasterUntil ||
Function _renderFooter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderFooter () {
const series = THRESHOLDS.map(threshold => ({
label: threshold.label,
colorIndex: threshold.colorIndex
}));
Function sessionLogin
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function sessionLogin (host, userName, password) {
let token;
return function (dispatch) {
dispatch({ type: SESSION_LOGIN, host: host, userName: userName });
configure({ host: host });
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { responsive, onClose } = this.props;
let name, closeControl;
if ('single' === responsive) {
name = <Heading tag="h3">Settings</Heading>;
Function AttributeTerm
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AttributeTerm (text) {
this._not = false;
const parts = text.toLowerCase().split(':');
this._name = parts[0];
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { backup, role } = this.props;
let status, message, details, control;
if (false !== backup.valid) {
Function _renderLayer
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_renderLayer () {
const { addNetwork, editNetworkIndex, layer, template } = this.state;
let result;
if (layer) {
if ('network' === layer) {
- 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 watchNotifications
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function watchNotifications (config, preserveUris, dispatch) {
const context = config.context;
let queryText, filter;
if (context.uri || context.category || context.global) {
if (context.uri) {
- 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 _renderLayer
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_renderLayer () {
const { virtualMachine, layer, addNetwork, editNetworkIndex } = this.state;
let result;
if (layer) {
if ('network' === layer) {
- 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 constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor (props) {
super(props);
this._onSubmit = this._onSubmit.bind(this);
this._onLayerOpen = this._onLayerOpen.bind(this);
this._onLayerClose = this._onLayerClose.bind(this);
Function _renderRole
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderRole (role) {
const { directory, search, searchResponse } = this.props;
let groups = [];
directory.groups.forEach((group, index) => {
if (group.role === role) {
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const countField = this._renderCountField();
const nameFields = this._renderNameFields();
const sizeFields = this._renderSizeFields();
Function alphanum
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function alphanum (a, b) {
function chunkify(t) {
var tz = [],
x = 0,
y = -1,