Showing 570 of 1,380 total issues
Function oninit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const filtersVM = catarse.filtersVM({
project_id: 'eq'
}),
projectDetails = prop([]),
Function oninit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let l = prop(false);
const sendSuccess = prop(false),
userDetails = vnode.attrs,
submitDisabled = prop(false),
Function oninit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let builder = vnode.attrs.data,
complete = prop(false),
error = prop(false),
fail = prop(false),
Function view
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({attrs} : m.Vnode<RewardsEditListCardAttrs>) {
const reward = attrs.reward
const index = attrs.index
const error = attrs.error
const errors = attrs.errors
Function AjaxParamParser
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxParamParser = function() {
function ParamParser() {
var defaults = [
{
test: function(xhr) {
Function oninit
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const rewards = prop([]),
currentRewardId = prop(),
currentReward = prop(),
showSuccess = prop(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 15 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const goal = attrs.goal(),
inlineError = message => m('.fontsize-smaller.text-error.u-marginbottom-20.fa.fa-exclamation-triangle',
m('span',
message
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const fixedNavClass = 'project-nav-fixed',
isFixed = prop(false),
originalPosition = prop(-1),
project = vnode.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 oninit
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const table = prop(vnode.attrs.table),
sortIndex = prop(-1);
const comparator = (a, b) => {
- 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 AjaxRequestTracker
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxRequestTracker = function() {
function RequestTracker() {
var requests = [];
this.track = function(request) {
- 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 reportRunnerStarting
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
jasmine.reporting.StyledHtmlReporter.prototype.reportRunnerStarting = function(runner) {
var showPassed, showSkipped;
this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
this.createDom('div', { className: 'banner' },
- 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 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({state, attrs}) {
return m('', [
m('.modal-dialog-header', [
m('.fontsize-large.u-text-center', attrs.modalTitle)
]),
Function oninit
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const vm = vnode.attrs.vm,
isSubscriptionEdit = vnode.attrs.isSubscriptionEdit || prop(false),
slipPaymentDate = projectVM.isSubscription() ? null : vm.getSlipPaymentDate(vnode.attrs.contribution_id),
loading = prop(false),
Function view
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({state, attrs}) {
const isSelected = attrs.isSelected;
const itemToString = attrs.itemToString;
const onSelect = attrs.onSelect;
Function oninit
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const userDetails = prop({}),
userId = vnode.attrs.user_id.split('-')[0],
hash = prop(window.location.hash),
displayTabContent = (user) => {
Function oninit
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const
wishedState = 'transferred',
userIdVM = catarse.filtersVM({user_id: 'eq', state: 'eq'}),
lastBalanceTransfer = catarse.paginationVM(models.balanceTransfer, 'created_at.desc', { Prefer: 'count=exact' }),
Function oninit
has 46 lines of code (exceeds 25 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),
Function view
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs }) {
/** @type {AdultPopupModalAttrs} */
const {
userPublicName,
Function view
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs, state }: m.Vnode<RewardsEditListAttrs, RewardsEditListState>) {
const loading = attrs.loading
const error = attrs.error
const errors = attrs.errors
Function save
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
async save(profileImage? : File) : Promise<boolean> {
try {
this.clearErrors()
this._isSaving = true