Showing 570 of 1,380 total issues
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 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 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 matches
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function matches(node) {
if (!node) {
return []
}
if (isArray(node)) {
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 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 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 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 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 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: '...' }),
Function oninit
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let player;
const showLightbox = h.toggleProp(false, true),
setYoutube = () => {
const tag = document.createElement('script'),
Function validateCardExpiry
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const validateCardExpiry = function (month, year) {
let currentTime,
expiry,
ref;
if (typeof month === 'object' && 'month' in month) {
Function MockAjax
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MockAjax(global) {
var requestTracker = new $ajax.RequestTracker(),
stubTracker = new $ajax.StubTracker(),
paramParser = new $ajax.ParamParser(),
realAjaxFunction = global.XMLHttpRequest,