Showing 173 of 964 total issues
Function BiMonthlyPeriodType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function BiMonthlyPeriodType(formatYyyyMmDd, monthNames, fnFilter) {
this.generatePeriods = config => {
let periods = [];
const offset = parseInt(config.offset, 10);
const isFilter = config.filterFuturePeriods;
- 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 QuarterlyPeriodType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function QuarterlyPeriodType(formatYyyyMmDd, monthNames, fnFilter) {
this.generatePeriods = config => {
let periods = [];
const offset = parseInt(config.offset, 10);
const isFilter = config.filterFuturePeriods;
- 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 YearlyPeriodType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function YearlyPeriodType(formatYyyyMmDd, fnFilter) {
this.generatePeriods = config => {
let periods = [];
const offset = parseInt(config.offset, 10);
const isFilter = config.filterFuturePeriods;
- 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 isCloseDisabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isCloseDisabled(isValid) {
const model = legendItemStore.getState() && legendItemStore.getState().model;
if (model && (model.startValue === undefined || model.endValue === undefined || model.name === undefined)) {
return true;
- 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 ActionButtonContainer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ActionButtonContainer = ({
classes,
isFocused,
interpretationId,
currentUserLikesInterpretation,
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render() {
const itemsPerRow = this.props.rowItemCount;
const menuWidth = itemsPerRow * MENU_ITEM_WIDTH;
const { name, children } = this.props;
const menuStyle = Object.assign({}, styles.dropDownWrap, {
- 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 updateFieldState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
updateFieldState(state, fieldName, fieldState) {
const fieldProp = this.getFieldProp(fieldName);
state.fields[fieldName] = {
pristine: fieldState.pristine !== undefined
? !!fieldState.pristine
- 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 FinancialAprilPeriodType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function FinancialAprilPeriodType(formatYyyyMmDd, monthNames, fnFilter) {
this.generatePeriods = config => {
let periods = [];
const offset = parseInt(config.offset, 10);
const isFilter = config.filterFuturePeriods;
- 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 save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async save(d2) {
const modelId = this._parent.id;
const modelName = this._parent.modelDefinition.name;
const isNewInterpretation = !this.id;
- 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 userCanManage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const userCanManage = (d2, object) => {
const { currentUser } = d2 || {};
if (!object || !object.user || !currentUser) {
return false;
- 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 SvgIcon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SvgIcon = ({ icon, children, className, disabled, style }) => {
let Icon = null;
if (children && !icons[icon]) {
Icon = MUISvgIcon;
} else {
- 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 TwoPanelSelector
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function TwoPanelSelector(props) {
const { children, childWrapStyle, mainStyle, sizeRatio, ...otherProps } = props;
const mergedMainStyle = {
flex: 1,
display: 'flex',
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render() {
const styles = {
tree: {
marginLeft: 16,
whiteSpace: 'nowrap',
- 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"