Showing 570 of 1,380 total issues
Function kondutoExecute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const kondutoExecute = function () {
const customerID = h.getUserCommonID();
if (customerID) {
var period = 300;
- 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 requestInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const requestInfo = (promise, paymentId, defaultPaymentMethod, isEdit) => {
if (retries <= 0) {
return promise.resolve(resolvePayment(defaultPaymentMethod, false, paymentId, isEdit));
}
- 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 formatCardInputNumber
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const formatCardInputNumber = (e, cardNumberProp) => {
let $target,
card,
digit,
length,
- 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 addResult
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
jasmine.NestedResults.prototype.addResult = function(result) {
if (result.type != 'log') {
if (result.items_) {
this.rollupCounts(result);
} 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
Avoid deeply nested control flow statements. Open
if (i > 0) message += ",";
Function columnSplit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function columnSplit(itemToString : (item : any) => string, values : any[], start : number, finish : number, onSelect : (item : any) => void, isSelected : (item : any) => boolean) {
Function view
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
view({ attrs, state } : m.Vnode<UserInfoEditPublicProfileAttrs, UserInfoEditPublicProfileState>) {
const user = attrs.user
const hasErrorOn = attrs.hasErrorOn
const getErrorsOn = attrs.getErrorsOn
const onSelectProfileImage = attrs.onSelectProfileImage
- 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 isCharAllowed
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
isCharAllowed = maskCharDefinitions => maskDefinition => (position, newChar) => {
if (position >= maskDefinition.length) {
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
Consider simplifying this complex logical expression. Open
if (!relationWithViolatedPropertyError() &&
!fullNameError() &&
!fullAddressError() &&
!projectInfringesError() &&
!detailsError() &&
Consider simplifying this complex logical expression. Open
} else if(/*!fromCatarse && */ request.referrer || (!o._time || new Date().getTime()-o._time>10*60*1000/*10min*/)) {
var m=request.referrer && request.referrer.match(/https?:\/\/([^\/\?#]+)/);
var refDomain=(m && m[1]) || undefined;
var query=request.query;
//se, e somente se, tem algum utm na query...
Function WaitsForBlock
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
Function view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const user = attrs.user();
const fields = state.fields;
const addVM = state.addVM;
- 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 oninit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const
showError = prop(false),
loader = catarse.loaderWithToken,
showPreview = h.toggleProp(false, 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const error = state.error,
project = attrs.project;
return m("[id='dashboard-welcome-tab']",
(project() ? [
- 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 oninit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const exploreButtonBehavoir = h.RedrawStream((/** @type {Event} */ event) => {
event.preventDefault();
m.route.set('/explore?ref=ctrse_header&filter=all');
});
- 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
return m('#catarse_pagarme_form', [
m('.u-text-center-small-only.u-marginbottom-30', [
m('.fontsize-large.fontweight-semibold',
window.I18n.t('payment_info', state.scope())
- 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const data = attrs.data,
btnValue = (state.l()) ? 'por favor, aguarde...' : data.callToAction;
return m('.w-col.w-col-2', [
- 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 oninit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const body = document.getElementsByTagName('body')[0],
editLinksToggle = h.toggleProp(true, false),
validating = prop(false),
showPublish = h.toggleProp(true, 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const user = state.userDetails();
return m('div', [
m(userHeader, { user }),
- 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
let project = state.project,
progress = project.progress.toFixed(2),
statusTextObj = h.projectStateTextClass(project.state, project.has_cancelation_request),
remainingTextObj = state.remainingTextObj,
- 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"