Showing 137 of 237 total issues
Function StateClass
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
LDR.StateClass = (function(){
function StateClass(){
this.requested = false;
this.last_scroll = 0;
this.LastUserAction = new Date;
Function format_keybind
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function format_keybind(){
var help = [];
var kbd = function(str){
var list = str.split("|");
if(!app.state.keyhelp_more){list = [list[0]]};
Function make_filter
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function make_filter(){
var filters = [];
function add_filter(f){
filters.push(f);
}
- 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 lite_subs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def lite_subs
items = []
@member.subscriptions.includes(:folder, :feed).each do |sub|
feed = sub.feed
modified_on = feed.modified_on
- 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_item
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def create_item(options, member)
if options[:feedtitle]
feed = Feed.where(feedlink: options[:feedlink]).first
unless feed
description = options[:feeddescription] ? options[:feeddescription] : options[:feedtitle]
- 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 instant_clip
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Control.instant_clip = function(){
var item = get_active_item(true);
if(!item) return;
// copy rate
var rate = subs_item(get_active_feed().subscribe_id).rate;
Function round_corner
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function round_corner(el){
el = _$(el);
var browser = new BrowserDetect;
if(browser.isFirefox){
setStyle(el, {"-moz-border-radius" : "20px"});
Function init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
HotKey.prototype.init = function(){
var self = this;
var target = this._target;
var cancelNext;
var state = "";
Function getStyle
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function getStyle(element, style){
element = _$(element);
var value = element.style[style.camelize()];
if (!value) {
if (document.defaultView && document.defaultView.getComputedStyle) {
- 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 fetch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def fetch
@folders = Hash.new do |hash, key|
hash[key] = []
end
@opml ||= begin
- 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 discover
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def discover
feeds = []
url = Addressable::URI.parse(params[:url])
FeedSearcher.search(url.normalize.to_s).each do |feedlink|
feedlink = (url + feedlink).to_s
- 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 feed_page
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
feed_page: function(num){
// 過去記事取得
var sid = app.state.now_reading;
if(!sid) return;
var limit;
- 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 array2reg
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
array2reg: function(){
var to_esc = {"-" : "\\-" , "." : "\\."};
var reg_esc = "\\[](){}+*?^$|";
var buf = [];
var len = this.length;
- 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 make_domain_names
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
make_domain_names: function(){
function get_domain(url){
var start = url.indexOf('//') + 2;
var end = url.indexOf('/', start);
if(end == -1) end = url.length;
Function init
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init(){
updater("filtered_subs_count", function(){
this.innerHTML = FilteredSubs.length +" "+'items';
});
updater("filtered_subs", function(){
Function mark_all_read
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
mark_all_read: function(){
var list = Ordered.list;
if(!list) return;
var no_feeds = 'There is no item to mark as read';
if(list.length == 0){
Function domain
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
domain: function(model){
var folder_names = model.get_domain_names();
var root_items = {list:[]};
var folders = [];
folder_names.forEach(function(v){
Function compile
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(pre_vars){
var self = this;
var buf = [];
var builder = this.make_builder(buf);
var sep = /\[\[(.*?)\]\]/g;
Function setup_mspace
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setup_mspace(){
var rate_cell = _$("mspace_rate");
var folder_cell = _$("mspace_folders");
var rate_count = Subs.count_by_key("rate");
var folder_count = Subs.count_by_key("folder");
Function toRegExp
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
toRegExp: function(text){
text = text || this.source;
var nstr = [];
var temp,kana,hira,kata;
var skip = 0;