Showing 12 of 32 total issues
File bootstrap.js
has 1412 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* ===================================================
* bootstrap-transition.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
Function getDataRows
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Highcharts.Chart.prototype.getDataRows = function () {
var options = (this.options.exporting || {}).csv || {},
xAxis,
xAxes = this.xAxis,
rows = {},
Class Repo
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Repo
include HashInitializable
delegate :files, :files_by_extension, :files_by_extension_count, :lines_by_extension,
:files_count, :binary_files, :text_files, :lines_count, :comments_count, to: :last_commit
File export-csv.js
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* A Highcharts plugin for exporting data from a rendered chart as CSV, XLS or HTML table
*
* Author: Torstein Honsi
* Licence: MIT
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, inside
, pos
, actualWidth
Function slide
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function getContent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getContent(chart, href, extension, content, MIME) {
var a,
blobObject,
name,
options = (chart.options.exporting || {}).csv || {},
Function getTable
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Highcharts.Chart.prototype.getTable = function (useLocalDecimalPoint) {
var html = '<table><thead>',
rows = this.getDataRows();
// Transform the rows to HTML
Function getCSV
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Highcharts.Chart.prototype.getCSV = function (useLocalDecimalPoint) {
var csv = '',
rows = this.getDataRows(),
options = (this.options.exporting || {}).csv || {},
itemDelimiter = options.itemDelimiter || ',', // use ';' for direct import to Excel
Function show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)
Method fill_empty_days!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def fill_empty_days!(params = {:aggregated => true})
return self if self.empty?
self_with_date_keys = Hash[self.map { |k, v| [k.to_date, v] }]
days_with_data = self_with_date_keys.keys.sort.uniq
- 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 getContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function getContent(chart, href, extension, content, MIME) {