Showing 544 of 841 total issues
Function resolveSlots
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolveSlots (
renderChildren,
context
) {
var slots = {};
Function calculateBarY
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateBarY: function(index, datasetIndex) {
var me = this;
var meta = me.getMeta();
var yScale = me.getScaleForId(meta.yAxisID);
var value = Number(me.getDataset().data[index]);
Function calculateBarX
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateBarX: function(index, datasetIndex) {
var me = this;
var meta = me.getMeta();
var xScale = me.getScaleForId(meta.xAxisID);
var value = Number(me.getDataset().data[index]);
Function _updateFromParent
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Vue.prototype._updateFromParent = function (
propsData,
listeners,
parentVnode,
renderChildren
Function run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Watcher.prototype.run = function run () {
if (this.active) {
var value = this.get();
if (
value !== this.value ||
Function chars
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
chars: function chars (text) {
if (!currentParent) {
if ("development" !== 'production' && !warned && text === template) {
warned = true;
warn$1(
Function initAssetRegisters
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initAssetRegisters (Vue) {
/**
* Create asset registration methods.
*/
config._assetTypes.forEach(function (type) {
Function genCheckboxModel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function genCheckboxModel (el, value) {
if ("development" !== 'production' &&
el.attrsMap.checked != null) {
warn$3(
"<" + (el.tag) + " v-model=\"" + value + "\" checked>:\n" +
Function logarithmic
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
logarithmic: function(generationOptions, dataRange) {
var ticks = [];
var getValueOrDefault = helpers.getValueOrDefault;
// Figure out what the max number of ticks we can support it is based on the size of
Function handleTickRangeOptions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleTickRangeOptions: function() {
var me = this;
var opts = me.options;
var tickOpts = opts.ticks;
Function 33
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],33:[function(require,module,exports){
'use strict';
module.exports = function(Chart) {
Function linear
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
linear: function(generationOptions, dataRange) {
var ticks = [];
// To get a "nice" value for the tick spacing, we will use the appropriately named
// "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
// for details.
Function renderPieChart
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.renderPieChart = function (chart) {
var options = merge({}, baseOptions);
if (chart.options.donut) {
options.cutoutPercentage = 50;
}
Function parseISO8601
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseISO8601(input) {
var day, hour, matches, milliseconds, minutes, month, offset, result, seconds, type, year;
type = Object.prototype.toString.call(input);
if (type === "[object Date]") {
return input;
Function checkPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var height = this.$element.height()
var offset = this.options.offset
Method perform
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def perform(data_source, statement, options = {})
query = options[:query]
Blazer.transform_statement.call(data_source, statement) if Blazer.transform_statement
# audit
Method run_check
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.run_check(check)
rows = nil
error = nil
tries = 1
- 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 setup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setup: function() {
if ( rformElems.test( this.nodeName ) ) {
// IE doesn't fire change on a check/radio until blur; trigger it on click
// after a propertychange. Eat the blur-change in special.change.handle.
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function initData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initData (vm) {
var data = vm.$options.data;
data = vm._data = typeof data === 'function'
? data.call(vm)
: data || {};