Showing 418 of 830 total issues
Function tablesorter
has 1356 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tablesorter: new function() {
var ts = this;
ts.version = "2.18.3";
File tablesorter.js
has 1550 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**!
* TableSorter (FORK) 2.18.3 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
* Copyright (c) 2007 Christian Bach
File hammer.js
has 1376 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! Hammer.JS - v2.0.4 - 2014-09-28
* http://hammerjs.github.io/
*
* Copyright (c) 2014 Jorik Tangelder;
* Licensed under the MIT license */
File jquery.jcarousel.js
has 1118 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! jCarousel - v0.3.1 - 2014-04-26
* http://sorgalla.com/jcarousel
* Copyright (c) 2014 Jan Sorgalla; Licensed MIT */
(function($) {
'use strict';
File jquery.colorbox.js
has 862 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*jslint browser: true, sloppy: true, todo: true, devel: true, white: true */
/*global $ */
/* [CC] This file has been modified substantially from its original version,
so updating to a newer version of the library would be non-trivial. */
/*!
Function CustomizeManagedInteractive
has 282 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const CustomizeManagedInteractive: React.FC<Props> = (props) => {
const { managedInteractive, libraryInteractive, defaultClickToPlayPrompt } = props;
const {
inherit_aspect_ratio_method,
custom_aspect_ratio_method,
File mock-api-provider.ts
has 605 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { findItemAddress, findItemByAddress } from "../util/finding-utils";
import { setSectionPositions, updatePositions } from "../util/move-utils";
import {
IPage, PageId,
APIPageGetF, APIPagesGetF, APIPageItemUpdateF,
File api.spec.ts
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { mockIFramePhone, MockPhone } from "../interactive-api-lara-host/mock-iframe-phone";
import * as iframePhone from "iframe-phone";
import * as api from "./api";
import { getClient } from "./client";
import {
File iframe-saver.ts
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ParentEndpoint } from "iframe-phone";
import * as DOMPurify from "dompurify";
import { IframePhoneManager } from "./iframe-phone-manager";
import { IFrameSaverPluginApi } from "./iframe-saver-plugin";
import { ModalApiPlugin } from "./modal-api-plugin";
Function ShutterbugWorker
has 218 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ShutterbugWorker = function () {
function ShutterbugWorker(options) {
_classCallCheck(this, ShutterbugWorker);
var opt = options || {};
Function usePageAPI
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const usePageAPI = () => {
const { userInterface, actions } = useContext(UserInterfaceContext);
const provider: IAuthoringAPIProvider = useContext(APIContext);
const client = useQueryClient(); // Get the context from our container.
Function CustomizeMWInteractive
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const CustomizeMWInteractive: React.FC<Props> = (props) => {
const {
checkboxHandler,
defaultClickToPlayPrompt,
enableLearnerStateRef,
Function usePageAPI
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
Open
export const usePageAPI = () => {
const { userInterface, actions } = useContext(UserInterfaceContext);
const provider: IAuthoringAPIProvider = useContext(APIContext);
const client = useQueryClient(); // Get the context from our container.
- 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 SectionItemPicker
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SectionItemPicker: React.FC<IProps> = (props) => {
const api = usePageAPI();
const allItems = useMemo(() => {
if (!api.getAllEmbeddables.data) {
return undefined;
File types.ts
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { IEventListeners } from "../plugin-api";
// Export some shared types.
export { IPortalClaims, IJwtClaims, IJwtResponse } from "../shared/types";
Method set_linked_interactives
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
Open
def set_linked_interactives(options)
source_page_item_id = id
ActiveRecord::Base.transaction do
if options.has_key?("linkedInteractives")
- 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 interactive_pages_controller.rb
has 446 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class Api::V1::InteractivePagesController < API::APIController
layout false
before_filter :set_interactive_page, except: [
:get_library_interactives_list,
:get_wrapping_plugins_list,
File eventemitter2.js
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* EventEmitter2
* https://github.com/hij1nx/EventEmitter2
*
* Copyright (c) 2013 hij1nx
Function bindMethods
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindMethods(table){
var c = table.config,
$table = c.$table;
// apply easy methods that trigger bound events
$table
Method generate
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.generate(arg_block_buckets)
bucket_columns = arg_block_buckets[:columns].map &:to_sym
bucket_rows = arg_block_buckets[:rows]
bucket_row_indices = indices_by_element(bucket_columns)