Showing 3,654 of 3,654 total issues
Function WebSocketProxy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function WebSocketProxy($rootScope, $interval, session, SESSION_EVENTS) {
var ws = null;
var connectTimer = -1;
var TIMEOUT = 5000;
- 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 PopupService
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function PopupService($document) {
var service: any = {};
service.position = function(width, height, target) {
// taking care of screen size and responsiveness
- 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 DeployConfigFactory
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function DeployConfigFactory(api, $q) {
/**
* Deploy config service
*
* provides deployment related config from server
- 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 openNewItemForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
openNewItemForm(initialValues?: {[key: string]: any}) {
if (this.state.editItem != null || this.state.newItem != null) {
this.modal.alert({
headerText: gettext('Warning'),
bodyText: gettext(
- 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 WeekdayPickerDirective
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function WeekdayPickerDirective(weekdays) {
return {
templateUrl: 'scripts/core/ui/views/weekday-picker.html',
scope: {
model: '=',
- 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 multiSelectDirective
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function multiSelectDirective() {
return {
scope: {
item: '=',
list: '=',
- 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 TimepickerPopupDirective
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function TimepickerPopupDirective($timeout) {
return {
templateUrl: 'scripts/core/ui/views/sd-timepicker-popup.html',
scope: {
open: '=',
- 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 onToggle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
onToggle(type, active) {
const author = getCurrentAuthor();
const {editorState, suggestingMode, toggleInlineStyle, createChangeStyleSuggestion} = this.props;
const selection = editorState.getSelection();
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor(props) {
super(props);
// when non-null, holds the entity whos URL is being edited
this.entity = null;
- 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 createSplitParagraphSuggestion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const createSplitParagraphSuggestion = (state, {data}) => {
const type = 'SPLIT_PARAGRAPH_SUGGESTION';
let {editorState} = state;
const isMergeParagraphAfter = isMergeParagraph(editorState, data);
const checkState = Highlights.changeEditorSelection(editorState, -1, -1, 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 computeState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
computeState(): IState {
const defaultState = {
floating: false,
width: 'auto',
};
- 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 SpellcheckMenuController
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function SpellcheckMenuController($rootScope, editorResolver, spellcheck, notify, $scope) {
this.isAuto = false;
this.runSpellchecker = runSpellchecker;
this.pushSettings = pushSettings;
var self = this;
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
var self = this;
this.checkbox = element(by.model('provider.is_default'));
this.addSourceButton = element(by.css('[ng-click="edit()"]'));
- 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 flipVertically
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function flipVertically(placement: PopperInstance['state']['placement']): PopperInstance['state']['placement'] {
if (placement === 'top') {
return 'bottom';
} else if (placement === 'bottom') {
return 'top';
- 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"