Showing 93 of 184 total issues
Function VirtualBirdTourCtrl
has 531 lines of code (exceeds 25 allowed). Consider refactoring. Open
function VirtualBirdTourCtrl($scope, $resource, $routeParams, $route, $http, Media, AudioEvent, Tag) {
/*
* TO DO:
* - choose more species
File experiments.js
has 968 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
;
(function (undefined) {
var app = angular.module('bawApp.controllers');
Function RapidScanCtrl
has 274 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RapidScanCtrl($scope, $resource, $routeParams, $route, $http, $timeout, Media, AudioEvent, Tag) {
function ts() {
return (new Date()).toISOString();
}
File directives.js
has 578 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function (undefined) {
var bawds = angular.module('bawApp.directives', []);
bawds.directive('bawRecordInformation', function () {
Function ListenCtrl
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ListenCtrl($scope, $resource, $routeParams, $route, Media, AudioEvent, Tag) {
var CHUNK_DURATION_SECONDS = 30.0;
function getMediaParameters() {
return {
Function ExperimentsCtrl
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ExperimentsCtrl($scope, $resource, $routeParams, $route, $http, Media, AudioEvent, Tag) {
$scope.PREFACE_STAGE = "Welcome";
$scope.EXPERIMENT_STAGE = "Activity";
$scope.FINAL_STAGE = "Conclusion";
Function bawApp
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
var bawApp = (function (undefined) {
var exports = {
};
Method create_raw_query
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def create_raw_query
recordings_search = AudioRecording.scoped
if self.invalid?
- 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 create
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def create
success = nil
post_data = request.raw_post
- 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 ProjectCtrl
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ProjectCtrl($scope, $location, $resource, $routeParams, Project, Site, Photo, AudioEvent) {
var self = this;
var projectResource = Project; //$resource('/projects/:projectId', {projectId: $routeParams.projectId});
File jquery.drawabox.js
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function ($) {
var SELECTED_ATTRIBUTE = "data-selected";
File callbacks_controller.rb
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Api::CallbacksController < Devise::OmniauthCallbacksController
# this may be needed, but haven't needed it yet.
#skip_before_filter :verify_authenticity_token, :only => [:open_id]
# NOTES
Method create_or_update_user
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def create_or_update_user(canonical_data, user=nil)
authorization = nil
#uid = canonical_data[:canonical][:uid] # very likely to be present
#name = canonical_data[:canonical][:name] # might be present
- 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 item
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def item
# controller action for an individual media file
# construct a hash of information to be returned and used for modify_parameters
@file_info = params
- 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
File audio_harvester.rb
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'yaml'
require 'net/http'
require 'json'
require 'digest'
require 'logger'
Function link
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, elements, attributes, controller) {
var element = elements[0];
if (element.nodeName !== "AUDIO") {
throw 'Cannot put ngAudio element on an element that is not a <audio />';
}
Function ProjectCtrl
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function ProjectCtrl($scope, $location, $resource, $routeParams, Project, Site, Photo, AudioEvent) {
var self = this;
var projectResource = Project; //$resource('/projects/:projectId', {projectId: $routeParams.projectId});
- 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 modify_ffmpeg
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.modify_ffmpeg(source, target, modify_parameters = {})
# ffmpeg is the catch-all, so it will do anything specified in modify_parameters.
raise ArgumentError, "Source is a wavpack file, use wavpack to convert to .wav first instead: #{File.basename(source)}" if source.match(/\.wv$/)
Method item
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
def item
# controller action for an individual media file
# construct a hash of information to be returned and used for modify_parameters
@file_info = params
File services.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function () {
/**
* Helper method for adding a put request onto the standard angular resource service
* @param $resource - the stub resource
* @param {string} path - the web server path