Showing 65 of 103 total issues
Function Gmaps4Rails
has 400 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.Gmaps4Rails = (function() {
function Gmaps4Rails() {
this.map = null;
this.serviceObject = null;
- Create a ticketCreate a ticket
Function Gmaps4RailsGoogle
has 387 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.Gmaps4RailsGoogle = (function(_super) {
__extends(Gmaps4RailsGoogle, _super);
function Gmaps4RailsGoogle() {
- Create a ticketCreate a ticket
Function Gmaps4RailsOpenlayers
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.Gmaps4RailsOpenlayers = (function(_super) {
__extends(Gmaps4RailsOpenlayers, _super);
function Gmaps4RailsOpenlayers() {
- Create a ticketCreate a ticket
Class Note
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
class Note < ActiveRecord::Base
include NoteCustom, Syncable
attr_writer :tag_list, :instruction_list, :keyword_list
attr_accessor :external_created_at
- Create a ticketCreate a ticket
Function Gmaps4RailsBing
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.Gmaps4RailsBing = (function(_super) {
__extends(Gmaps4RailsBing, _super);
function Gmaps4RailsBing() {
- Create a ticketCreate a ticket
File gmaps4rails.base.js
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
var Gmaps;
Gmaps = {};
- Create a ticketCreate a ticket
Function Gmaps4RailsMapquest
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.Gmaps4RailsMapquest = (function(_super) {
__extends(Gmaps4RailsMapquest, _super);
function Gmaps4RailsMapquest() {
- Create a ticketCreate a ticket
File gmaps4rails.googlemaps.js
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
var __hasProp = Object.prototype.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
this.Gmaps4RailsGoogle = (function(_super) {
- Create a ticketCreate a ticket
Class Pantograph
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class Pantograph < ActiveRecord::Base
include Pantographable
belongs_to :pantographer
- Create a ticketCreate a ticket
File formatting_helper.rb
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
module FormattingHelper
def bodify(text, books = [], books_citation_style = 'citation.book.inline_annotated_html', links_citation_style = 'citation.link.inline_annotated_html', annotated = true)
return '' if text.blank?
# REVIEW: Add settings condition
text = related_notify(text)
- Create a ticketCreate a ticket
File note.rb
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Note < ActiveRecord::Base
include NoteCustom, Syncable
attr_writer :tag_list, :instruction_list, :keyword_list
attr_accessor :external_created_at
- Create a ticketCreate a ticket
Method update_resources_with_evernote_data
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def update_resources_with_evernote_data(cloud_note_data)
# First we remove all resources (to make sure deleted resources disappear -
# but we don't want to delete binaries so we use #delete rather than #destroy)
evernote_note.note.resources.delete_all
- 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 Gmaps4Rails
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Gmaps4Rails() {
this.map = null;
this.serviceObject = null;
this.visibleInfoWindow = null;
this.userLocation = null;
- Create a ticketCreate a ticket
Method sync_down
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def sync_down(evernote_note)
evernote_note.build_note if evernote_note.note.nil?
self.evernote_note = evernote_note
self.guid = evernote_note.cloud_note_identifier
- 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 Gmaps4RailsGoogle
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Gmaps4RailsGoogle() {
Gmaps4RailsGoogle.__super__.constructor.apply(this, arguments);
this.map_options = {
disableDefaultUI: false,
disableDoubleClickZoom: false,
- Create a ticketCreate a ticket
Method calculate_after
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def self.calculate_after(current)
return last_text if current == last_text
alphabet = self.alphabet.split('')
alphabet_without_space = alphabet - [' ']
- 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
Consider simplifying this complex logical expression. Open
if ((circle.lat != null) && (circle.lng != null)) {
newCircle = new google.maps.Circle({
center: this.createLatLng(circle.lat, circle.lng),
strokeColor: circle.strokeColor || this.circles_conf.strokeColor,
strokeOpacity: circle.strokeOpacity || this.circles_conf.strokeOpacity,
- Create a ticketCreate a ticket
Function createClusterer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Gmaps4RailsOpenlayers.prototype.createClusterer = function(markers_array) {
var clusters, funcs, options, strategy, style;
options = {
pointRadius: "${radius}",
fillColor: "#ffcc66",
- Create a ticketCreate a ticket
Method from_omniauth
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def self.from_omniauth(auth, current_user)
authorization = Authorization.where(provider: auth.provider, uid: auth.uid.to_s).first_or_initialize
authorization.token = auth.credentials.token
authorization.secret = auth.credentials.secret
- 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 cut_image_binary
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def cut_image_binary(id, _format, aspect_x, aspect_y, width, snap, gravity, effects)
image_record = Resource.find(id)
file_name_template = image_record.template_location(aspect_x, aspect_y)
file_name_out = image_record.cut_location(aspect_x, aspect_y, width, snap, gravity, effects)
- 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"