Showing 570 of 1,380 total issues
Function oninit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const vm = projectGoalVM,
mapErrors = [
['mode', ['mode']],
['goal', ['goal']],
Function view
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({state} : m.Vnode<HeaderMenuSearchAttrs, HeaderMenuSearchState>) {
const searchParam = state.searchParam
return m('span#menu-search', [
Function AjaxEventBus
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxEventBus = function(eventFactory) {
function EventBus(source) {
this.eventList = {};
this.source = source;
}
Function ParamParser
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ParamParser() {
var defaults = [
{
test: function(xhr) {
return (/^application\/json/).test(xhr.contentType());
Function createBasicPaginationVMWithAutoRedraw
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
createBasicPaginationVMWithAutoRedraw = vmInstance => {
const error = prop(false);
const errorMessage = prop('');
return {
Function oninit
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
PurchaseEvent
} = projectVM;
Function oninit
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = vnode.attrs.project,
animateProgress = localVnode => {
let animation,
progress = 0,
Function oninit
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
oninit: function (vnode) {
const explitInArraysOf3 = (collection) => {
const array = [];
let partArray = [];
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
const project = _.first(state.projectDetails());
const canBeCreated = reward => !reward.survey_sent_at && ((reward.maximum_contributions && (reward.paid_count >= reward.maximum_contributions)) || project.state !== 'online');
const cannotBeCreated = reward => !reward.survey_sent_at && project.state === 'online' && (!reward.maximum_contributions || (reward.paid_count < reward.maximum_contributions));
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const user = state.user();
if (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 14 (exceeds 5 allowed). Consider refactoring. Open
view: function ({ state, attrs }) {
const fields = attrs.fields;
const userBankAccount = state.userBankAccount();
return m('div', [
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const project = attrs.project() || {},
onlineDays = () => {
const diff = moment(project.zone_online_date).diff(moment(project.zone_expires_at)),
duration = moment.duration(diff);
- 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 selectReward
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const selectReward = reward => () => {
if (selectedReward() !== reward) {
error('');
selectedReward(reward);
if (reward.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 runFunctionsWithinRange
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
var scheduledFunc;
var funcsToRun = [];
for (var timeoutKey in this.scheduledFunctions) {
scheduledFunc = this.scheduledFunctions[timeoutKey];
- 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 equals_
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
mismatchKeys = mismatchKeys || [];
mismatchValues = mismatchValues || [];
for (var i = 0; i < this.equalityTesters_.length; i++) {
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const project = attrs.project(),
mode = project.mode,
modeImgSrc = (mode === 'aon')
? '/assets/aon-badge.png'
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
oninit({ state, attrs} : m.Vnode<InputPermalinkAttrs, InputPermalinkState>) {
state.class = attrs.class
state.currentPermalink = attrs.currentPermalink
state.checkPermalinkAvailable = async (inputText) => {
let lastValidValue = state.currentPermalink
- 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 updateUserData
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateUserData = () => {
const userData = {
cpf: fields().owner_document(),
name: fields().name(),
address_attributes: addVM().getFields(),
Function next_
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
jasmine.Queue.prototype.next_ = function() {
var self = this;
var goAgain = true;
while (goAgain) {
Function oninit
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let interval;
const selectedSlideIdx = prop(0),
translationSize = prop(1600),
sliderTime = vnode.attrs.sliderTime || 6500,