Showing 570 of 1,380 total issues
Function oninit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const contributedProjects = prop(),
latestProjects = prop([]),
userDetails = prop({}),
user_id = vnode.attrs.user.user_id,
Function oninit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const resource = _.first(vnode.attrs.collection()),
limitDataset = vnode.attrs.limitDataset,
source = !_.isUndefined(resource)
? _.isNumber(limitDataset)
Function oninit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const user_id = vnode.attrs.userId,
showDraft = vnode.attrs.showDraft || false,
error = prop(false);
Function oninit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const userFriendVM = catarse.filtersVM({ user_id: 'eq' }),
user = vnode.attrs.user,
friendListVM = getFriendsListVM(),
allLoading = prop(false),
Function renderNode
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function renderNode(parent, node, treePath) {
if (!node) {
return ''
}
if (isArray(node)) {
Function closeModal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
closeModal = () => {
// Temp for rails unstyled close links
const close = (elm, selector) => {
const all = document.getElementsByClassName(selector);
let cur = elm.parentNode;
Function submitNotes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
submitNotes = () => {
loadingNotes(true);
m.request({
method: 'PUT',
url: `/admin/balance_transfers/${vnode.attrs.item.id}`,
Function saveGoal
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
const saveGoal = () => {
validate();
if (vnode.attrs.error()) {
return false;
}
Function submitInvite
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
submitInvite = () => {
if (_.isEmpty(emailText()) || loading() === true) {
} else {
loading(true);
const emailList = _.reduce(emailText().split('\n'), (memo, text) => {
Function execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
var latchFunctionResult;
try {
latchFunctionResult = this.latchFunction.apply(this.spec);
Function oninit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit({ attrs, state } : m.Vnode<InputFindLocationAttrs, InputFindLocationState>) {
if (attrs.city_id) {
getCityById(attrs.city_id).then(city => {
state.selectedCity = city
Consider simplifying this complex logical expression. Open
if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
return ["Expected function " + not + "to throw", expected ? expected.message || expected : " an exception", ", but it threw", exception.message || exception].join(' ');
} else {
return "Expected function to throw an exception.";
}
Consider simplifying this complex logical expression. Open
if(project&&(project.id||project.project_id)) {
data.project={
id: project.id||project.project_id,
user_id: project.user_id||project.project_user_id,
category_id: project.category_id,
Function oninit
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const listVM = projectContributionsListVM(),
filterVM = projectsContributionReportVM,
project = prop([{}]),
rewards = prop([]),
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state }) {
const user = state.userDetails();
return state.error()
? m(inlineError, { message: 'Erro ao carregar dados.' })
: state.loader()
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = _.first(state.projectDetails()) || {
user: {
name: 'Realizador'
}
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const contributionsPerDay = prop([]),
listVM = projectVM.isSubscription(vnode.attrs.project()) ? getProjectSubscribersListVM() : getProjectContributorsListVM(),
filterStats = catarse.filtersVM({
project_id: 'eq'
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let parsedErrors = userSettingsVM.mapRailsErrors(railsErrorsVM.railsErrors());
let deleteFormSubmit;
const user = vnode.attrs.user();
const userAddress = 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 view
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const mainClass = (attrs.type === 'button') ? '' : '.u-text-center.u-marginbottom-30',
buttonClass = (attrs.type === 'button') ? 'w-button btn btn-terciary btn-no-border' : 'btn-link link-hidden fontsize-large',
hideTextOnMobile = attrs.hideTextOnMobile || false,
project = attrs.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 view
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
const projects_collection = state.projects.collection();
const isLoadingProjects = state.projects.isLoading();
const hasError = state.error();
- 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"