Showing 197 of 206 total issues
Function css
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var css = (function() {
var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
cssProps = {};
function camelCase(string) {
- Create a ticketCreate a ticket
Function getClassNames
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
getClassNames: function(date){
var cls = [],
year = this.viewDate.getUTCFullYear(),
month = this.viewDate.getUTCMonth(),
today = UTCToday();
- Create a ticketCreate a ticket
Function DateArray
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
var DateArray = (function(){
var extras = {
get: function(i){
return this.slice(i)[0];
},
- Create a ticketCreate a ticket
Function datepickerPlugin
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
var datepickerPlugin = function(option){
var args = Array.apply(null, arguments);
args.shift();
var internal_return;
this.each(function(){
- Create a ticketCreate a ticket
Function moveMonth
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
moveMonth: function(date, dir){
if (!isValidDate(date))
return this.o.defaultViewDate;
if (!dir)
return date;
- Create a ticketCreate a ticket
Function WebsiteOne
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
(function() {
var modules = [],
newPageLoaded = false,
runOnceCallbacks = {},
moduleFactories = {};
- Read upRead up
- Create a ticketCreate a ticket
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 Typeahead
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Typeahead(o, www) {
var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged;
o = o || {};
if (!o.input) {
$.error("missing input");
- Create a ticketCreate a ticket
Function EventBus
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
var EventBus = function() {
"use strict";
var namespace, deprecationMap;
namespace = "typeahead:";
deprecationMap = {
- Create a ticketCreate a ticket
Function update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
update: function update(query) {
var that = this, canceled = false, syncCalled = false, rendered = 0;
this.cancel();
this.cancel = function cancel() {
canceled = true;
- Create a ticketCreate a ticket
Function hightlight
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function hightlight(o) {
var regex;
o = _.mixin({}, defaults, o);
if (!o.node || !o.pattern) {
return;
- Create a ticketCreate a ticket
Function updateNavArrows
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateNavArrows: function(){
if (!this._allow_update)
return;
var d = new Date(this.viewDate),
- Create a ticketCreate a ticket
Function dateUpdated
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
dateUpdated: function(e){
// `this.updating` is a workaround for preventing infinite recursion
// between `changeDate` triggering and `setUTCDate` calling. Until
// there is a better mechanism.
if (this.updating)
- Create a ticketCreate a ticket
Function set
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
NProgress.set = function(n) {
var started = NProgress.isStarted();
n = clamp(n, Settings.minimum, 1);
NProgress.status = (n === 1 ? null : n);
- Create a ticketCreate a ticket
Function Input
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Input(o, www) {
var id;
o = o || {};
if (!o.input) {
$.error("input is missing");
- Create a ticketCreate a ticket
Method update_user_commit_counts_for
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def update_user_commit_counts_for(project)
contributors = get_contributor_stats(project.github_repo)
contributors.map do |contributor|
user = User.find_by_github_username(contributor.author.login)
- Read upRead up
- Create a ticketCreate a ticket
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
Method display_countdown
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def display_countdown(event)
time_to_next_event_instance = Time.now.to_datetime.distance_to(event.next_occurrence_time_attr.to_datetime)
minutes_left = time_to_next_event_instance[:minutes]
hours_left = time_to_next_event_instance[:hours]
days_left = time_to_next_event_instance[:days]
- Read upRead up
- Create a ticketCreate a ticket
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 AffixedNavbar
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AffixedNavbar() {
var isAffixed, affixedNav, header, main, footer, thresholdTop,
isListening = false;
this.onScroll = function() {
- Create a ticketCreate a ticket
Function formatDate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatDate: function(date, format, language){
if (!date)
return '';
if (typeof format === 'string')
format = DPGlobal.parseFormat(format);
- Create a ticketCreate a ticket
Function _fill_yearsView
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
_fill_yearsView: function(selector, cssClass, factor, year, startYear, endYear, beforeFn){
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (e.keyCode === 38 || e.keyCode === 40) {
dir = dir * 4;
}
- Create a ticketCreate a ticket