Showing 10 of 30 total issues
Function exports
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// To support Coffeescript, SASS, LESS and others, just install
// the appropriate grunt package and it will be automatically included
// in the build process:
//
Function exports
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
var express = require('express'),
lockFile = require('lockfile'),
Helpers = require('./helpers'),
fs = require('fs'),
Function findFolder
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
findFolder: function(toolId, folder, parentFolderChain) {
var browsable, folderChain, url;
url = Ember.ENV.CONFIG.host + '/api/browse';
browsable = Browsable.create({});
folderChain = parentFolderChain + '.' + folder;
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
// list of files / patterns to load in the browser
files: [
Function addReturnTypes
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addReturnTypes: function(rts) {
var _this = this,
ret = null,
acceptLtiLaunchUrl = Em.ENV.RETURN_TYPES.contains('lti_launch_url');
Function exports
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
var express = require('express'),
lockFile = require('lockfile'),
Helpers = require('./helpers'),
fs = require('fs'),
- 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
Method apps
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.apps
{
youtube: {
name: "YouTube",
description: "Search publicly available YouTube videos. A new icon will show up in your course rich editor letting you search YouTube and click to embed videos in your course material.",
Method xml_config
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def xml_config
script_name = request.env['SCRIPT_NAME']
host = request.scheme + "://" + request.host_with_port
tool_id = 'public_resources'
Function parseResults
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseResults: function(results) {
var _this = this;
this.set('nextCriteria', results.get('next_criteria'));
this.set('performedSearch', true);
Function getJson
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
getJson: function() {
var v, key, ret;
ret = [];
for (key in this) {
if (this.hasOwnProperty(key)) {
- 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"