Showing 183 of 2,044 total issues
Method topics
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def topics
term = params[:term]
user = params[:user] ? params[:user] : false
if term.present? && term.downcase[0..3] != '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
Function render
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { unreadNotificationsCount, currentUser, mobileTitle,
mobileTitleWidth, onTitleClick, serverData } = this.props
const { open } = this.state
return <div>
- Create a ticketCreate a ticket
Function passFilters
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
passFilters: function() {
var self = Filter
var visible = self.visible
var passesMetacode, passesMapper, passesSynapse
- Create a ticketCreate a ticket
Method autocomplete_array_json
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def autocomplete_array_json(topics)
topics.map do |t|
is_map = t.is_a?(Map)
metamap_metacode = Metacode.find_by(name: 'Metamap')
{
- 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 summarize_data
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.summarize_data(map, user, until_moment = DateTime.current)
results = {
stats: {}
}
- Create a ticketCreate a ticket
Function renderTopic
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
renderTopic: function(mapping, topic, createNewInDB, permitCreateSynapseAfter, opts = {}) {
var nodeOnViz, tempPos
var newnode = topic.createNode()
- 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
File cloudcarousel-secret.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
//////////////////////////////////////////////////////////////////////////////////
// CloudCarousel V1.0.5
// (c) 2011 by R Cecco. <http://www.professorcloud.com>
// MIT License
//
- Create a ticketCreate a ticket
Function edgeRender
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
edgeRender: function(adj, canvas) {
// get nodes cartesian coordinates
const pos = adj.nodeFrom.pos.getc(true)
const posChild = adj.nodeTo.pos.getc(true)
- Create a ticketCreate a ticket
Function init
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function() {
var synapseBloodhound = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
- Create a ticketCreate a ticket
Function exports
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(io, stunservers, state) {
io.on('connection', function(socket) {
socket.resources = {
screen: false,
video: true,
- Create a ticketCreate a ticket
Class RestfulController
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class RestfulController < ActionController::Base
include Pundit
include PunditExtra
snorlax_used_rest!
- Create a ticketCreate a ticket
Function init
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
init: function(serverData) {
var self = DataModel
// workaround circular import problem
if (!self.MapCollection.model) self.MapCollection.model = 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 summarize_data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def self.summarize_data(map, user, until_moment = DateTime.current)
results = {
stats: {}
}
- 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 update
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def update
@user = User.find(current_user.id)
if user_params[:password] == '' && user_params[:password_confirmation] == ''
# not trying to change the password
- 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 getMapCanvasForScreenshots
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
getMapCanvasForScreenshots: () => {
var canvas = {}
canvas.canvas = document.createElement('canvas')
canvas.canvas.width = 1880 // 960
- Create a ticketCreate a ticket
Function zoomExtents
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
zoomExtents: function(event, canvas, denySelected) {
JIT.centerMap(canvas)
let height = canvas.getSize().height
let width = canvas.getSize().width
let maxX
- Create a ticketCreate a ticket
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
const self = Visualize
if (self.type === 'RGraph') {
// clear the previous canvas from #infovis
- Create a ticketCreate a ticket
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { topic, map, filterData, allForFiltering, visibleForFiltering, toggleMetacode,
toggleMapper, toggleSynapse, filterAllMetacodes,
filterAllMappers, filterAllSynapses } = this.props
const style = {
- Create a ticketCreate a ticket
Function init
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(serverData) {
var self = Realtime
self.addJuntoListeners()
- Create a ticketCreate a ticket
Function render
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
const self = Visualize
if (self.type === 'RGraph') {
// clear the previous canvas from #infovis
- 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"