Showing 183 of 2,044 total issues
Function computePositions
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
computePositions: function() {
const self = Visualize
if (self.type === 'RGraph') {
let i
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
handle: function(text, coords = {}) {
var self = PasteInput
if (text.match(URL_REGEX)) {
Import.handleURL(text, coords)
- Read upRead up
- Create a ticketCreate a ticket
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 synapses_csv
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def synapses_csv(output_format = 'array')
output = []
synapses.each do |synapse|
if synapse.category == 'from-to'
if synapse.topic1_id == id
- Read upRead up
- Create a ticketCreate a ticket
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 updateFromPath
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateFromPath: function(path) {
const self = ExploreMaps
const [_unused, generalSection, specificSection, id] = path.split('/')
if (generalSection === 'explore') {
- Create a ticketCreate a ticket
Function init
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Room.prototype.init = function() {
var self = this
$(document).on(VideoView.events.audioControlClick, function(event, videoView) {
if (!videoView.audioStatus) self.webrtc.mute()
- Create a ticketCreate a ticket
Function renderEdgeArrows
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderEdgeArrows: function(edgeHelper, adj, synapse, canvas) {
const self = JIT
const directionCat = synapse.get('category')
const direction = synapse.getDirection()
- Create a ticketCreate a ticket
Function synapseAdded
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
synapseAdded: event => {
// we receive contentless models from the server
// containing only the information we need to determine whether the active mapper
// can view this synapse and the two topics it connects,
// then if we determine it can, we make a call for the full model
- Create a ticketCreate a ticket
Method maps
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def maps
term = params[:term]
user = params[:user] ? params[:user] : nil
if term.present? && term.downcase[0..5] != 'topic:' &&
- Read upRead up
- Create a ticketCreate a ticket
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 launch
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
launch: function(id) {
const self = Map
var dataIsReadySetupMap = function() {
Map.setAccessRequest()
Visualize.type = 'ForceDirected'
- Create a ticketCreate a ticket
Function renderSynapse
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderSynapse: function(mapping, synapse, node1, node2, createNewInDB) {
var edgeOnViz
var newedge = synapse.createEdge(mapping)
- Create a ticketCreate a ticket
Method decorate
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def decorate(notification, receipt)
result = {
id: notification.id,
type: notification.notification_code,
subject: notification.subject,
- Create a ticketCreate a ticket
Function convertModelsToJIT
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
convertModelsToJIT: function(topics, synapses) {
const jitReady = []
const synapsesToRemove = []
let mapping
- Create a ticketCreate a ticket
Function positionVideos
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
positionVideos: function() {
var self = Realtime
var videoIds = Object.keys(self.room.videos)
// var numOfVideos = videoIds.length
// var numOfVideosToPosition = _.filter(videoIds, function(id) {
- Create a ticketCreate a ticket
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
'render': function(node, canvas) {
const pos = node.pos.getc(true)
const dim = node.getData('dim')
const topic = node.getData('topic')
const metacode = topic ? topic.getMetacode() : false
- Create a ticketCreate a ticket
Function addTypeahead
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
addTypeahead: function() {
var self = InfoBox
if (!Active.Map) return
- Create a ticketCreate a ticket
Function topicAdded
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
topicAdded: event => {
const m = Active.Mapper
// we receive a contentless model from the server
// containing only the information we need to determine whether the active mapper
// can view this topic, then if we determine it can, we make a call for the full model
- Create a ticketCreate a ticket
Function handleUpdate
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleUpdate: function(location) {
const self = ReactApp
const pathname = this.state.location.pathname
switch (pathname.split('/')[1]) {
case '':
- Create a ticketCreate a ticket
Function onClick
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
onClick: function(node, eventInfo, e) {
// remove the rightclickmenu
ContextMenu.reset(ReactApp.render)
if (Mouse.boxStartCoordinates) {
- Read upRead up
- Create a ticketCreate a ticket
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 topicDragged
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const topicDragged = self => positions => {
var topic
var node
if (Active.Map) {
- Read upRead up
- Create a ticketCreate a ticket
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 embed_dat
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def self.embed_dat
embeddable.each_pair do |key, opts|
is_plural = key.to_s.pluralize == key.to_s
id_key = key.to_s.singularize + (is_plural ? '_ids' : '_id')
serializer = opts.delete(:serializer) || "Api::V2::#{key.to_s.singularize.camelize}Serializer".constantize
- Read upRead up
- Create a ticketCreate a ticket
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"