Showing 570 of 1,380 total issues
Function view
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const project = attrs.project,
isSub = projectVM.isSubscription(project);
return !_.isUndefined(project()) ? m(`.w-section.page-header${isSub ? '.transparent-background' : ''}`, [
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let listVM = subscriptionListVM,
filterVM = subscriptionFilterVM,
error = prop(''),
filterBuilder = [{ // name
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function (vnode) {
const vm = projectBasicsVM,
mapErrors = [
['name', ['name']],
['public_tags', ['public_tags']],
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
const deleted = state.deleted,
othersCount = _.filter(state.fees(), fee => fee.destination !== 'others' && fee.destination !== 'international').length,
states = state.states;
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({attrs}) {
const user = attrs.user,
hideDetails = attrs.hideDetails,
profileImage = userVM.displayImage(user),
coverImage = userVM.displayCover(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 oninit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const checkedList = prop([]),
loading = prop(false),
filterTerm = prop(''),
filteredData = prop(vnode.attrs.dataEmails()),
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const balance = _.first(state.userBalances()) || { user_id: attrs.user_id, amount: 0 },
positiveValue = balance.amount >= 0,
balanceRequestModalC = [
userBalanceRequestModalContent,
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const EXPERIMENT_CASE_CURRENT = 'EXPERIMENT_CASE_CURRENT',
EXPERIMENT_CASE_6SUBHOM = 'EXPERIMENT_CASE_6SUBHOM',
EXPERIMENT_CASE_3SUBHOM = 'EXPERIMENT_CASE_3SUBHOM';
- 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 renderBody
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private renderBody({ projectPublishByStepsVM, userInfoEditVM, showPopError } : ProjectsPublishByStepsState) {
if (projectPublishByStepsVM.isLoadingProject || userInfoEditVM.isLoading) {
return h.loader()
} 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 validateCnpj
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
validateCnpj = cnpjStr => {
let tamanho, numeros, digitos, soma, pos, resultado;
const cnpj = cnpjStr.replace(/[^\d]+/g, '');
if (cnpj == '') {
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
oninit({attrs, state} : m.Vnode<UserInfoEditSettingsAttrs, UserInfoEditSettingsState>) {
const hasErrorOn = attrs.hasErrorOn
const getErrorsOn = attrs.getErrorsOn
const user = attrs.user
user.address = user.address || {
- 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 AjaxParamParser
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxParamParser = function() {
function ParamParser() {
var defaults = [
{
test: function(xhr) {
- 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 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const vm = rewardVM,
selectedReward = vm.selectedReward,
selectReward = vm.selectReward,
rewards = vm.rewards(),
Function oninit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let l = prop(false);
const project = vnode.attrs.project,
filterVM = catarse.filtersVM({
project_id: 'eq'
Function oninit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const translate = path => window.I18n.t(path, I18nScope());
vnode.state = {
stages: {
Function homeVM
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
const homeVM = () => {
const _isUpdating = h.RedrawStream(false);
const _banners = h.RedrawStream([]);
async function getBanners() {
Function toNumber
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
I18n.toNumber = function(number, options) {
options = this.prepareOptions(
options
, this.lookup("number.format")
, NUMBER_FORMAT
Function view
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs } : m.Vnode<ShareReminderAttrs> ) {
const project = attrs.project
const projectUrl = `/projects/${project.id}/insights`
return (
Function AjaxRequestTracker
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxRequestTracker = function() {
function RequestTracker() {
var requests = [];
this.track = function(request) {
Function view
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs } : m.Vnode<DescriptionEditTipsAttrs>) {
const show = attrs.show
return (