Showing 1,380 of 1,380 total issues
Function updateUserData
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const updateUserData = (user_id) => {
const userData = {};
userData.bank_account_attributes = {
bank_id: bankCode(),
input_bank_number: bankInput(),
Function oninit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const contributedProjects = prop(),
user_id = vnode.attrs.userId,
pages = contributionVM.getUserContributedProjectsWithFilter(),
error = prop(false),
Function matcherFn_
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
return function() {
var matcherArgs = jasmine.util.argsToArray(arguments);
var result = matcherFunction.apply(this, arguments);
Function context
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const context = () => {
const vm = catarse.filtersVM({
full_text_index: 'plfts(portuguese)',
state: 'eq',
transfer_id: 'eq',
Function matches
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function matches(node) {
if (!node) {
return []
}
if (isArray(node)) {
Function oninit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const following = prop(vnode.attrs.following || false),
followVM = catarse.filtersVM({ follow_id: 'eq' }),
loading = prop(false),
hover = prop(false),
Function oninit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const formName = 'report-infringes-intellectual-property',
relationWithViolatedPropertyError = prop(false),
fullNameError = prop(false),
fullAddressError = prop(false),
Function css
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const css = () => {
const cssClasses = {
small: {
wrapper: '.w-col.w-col-4',
innerWrapper: '.card-project.card.u-radius',
Function RequestTracker
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RequestTracker() {
var requests = [];
this.track = function(request) {
requests.push(request);
Function view
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({attrs}) {
const isSelected = attrs.isSelected;
const onSelect = attrs.onSelect;
const itemToString = attrs.itemToString;
const values = attrs.values;
Function view
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
view({ state, attrs }) {
const onSearch = attrs.onSearch;
const onSelect = attrs.onSelect;
const isLoading = attrs.isLoading;
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project;
const isSub = projectVM.isSubscription(project);
return m('#project-highlight', [
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const hash = prop(window.location.hash),
displayTabContent = (project) => {
const c_opts = {
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 toThrow
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
jasmine.Matchers.prototype.toThrow = function(expected) {
var result = false;
var exception;
if (typeof this.actual != 'function') {
throw new Error('Actual is not a function');
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = vnode.attrs.project,
progress = project.progress.toFixed(2),
remainingTextObj = h.translatedTime(project.remaining_time),
elapsedTextObj = h.translatedTime(project.elapsed_time),
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const emailText = prop(''),
loading = prop(false),
project = vnode.attrs.project,
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 12 (exceeds 5 allowed). Consider refactoring. Open
view({ attrs: { goalDetails: goalsDetails, subscriptionData, style }, state } : m.Vnode<ProjectGoalsBoxAttrs, ProjectGoalsBoxState>) {
const goalsDetailsOrEmpty = () : GoalDetails[] => {
const hasGoalsDetails = goalsDetails() && goalsDetails().length > 0
if (hasGoalsDetails) {
- 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 reportSpecResults
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
jasmine.reporting.StyledHtmlReporter.prototype.reportSpecResults = function(spec) {
var results = spec.results();
var status = results.passed() ? 'passed' : 'failed';
if (results.skipped) {
status = 'skipped';
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
view({state, attrs}) {
const projectsExploreVM : ProjectsExploreViewModel = state.projectsExploreVM;
const projectsCollection = projectsExploreVM.projectsView.collection();
const isContributedByFriendsFilter = projectsExploreVM.filter === 'contributed_by_friends';
- 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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const mode = vnode.attrs.mode === 'sub' && vnode.attrs.isEdit ? vnode.attrs.isReactivate ? 'sub_reactivate' : 'sub_edit' : vnode.attrs.mode,
questions = vnode.attrs.faq.questions,
selectedQuestion = prop(-1),
user = prop({ name: '...' }),