Showing 137 of 237 total issues
Method crawl
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def crawl(feed)
response = nil
result = {
message: '',
error: false,
Method crawl
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def crawl(feed)
response = nil
result = {
message: '',
error: false,
Function load
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
fn.load = function(options, done){
var that = this;
var flow;
var with_pass = function(f){
return function(){flow.pass();};
Function feed_page
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
feed_page: function(num){
// 過去記事取得
var sid = app.state.now_reading;
if(!sid) return;
var limit;
Function show_folder
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
show_folder: function(){
Event.cancelNext("click");
var menu = FlatMenu.create_on(this, "right_container");
menu.show();
var write_menu = function(){
Method subs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def subs
limit = (params[:limit] || 0).to_i
from_id = (params[:from_id] || 0).to_i
items = []
subscriptions = @member.subscriptions
Method export
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def export(format)
case format
when 'opml'
folders = {}
subs = subscriptions.includes(:folder).order("subscriptions.id")
Function round_corner
has 34 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" : "5px"});
Consider simplifying this complex logical expression. Open
if(feedlink.length && feedlink_checkbox.length){
Array.forEach(feedlink, function(el){
Array.some(feedlink_checkbox, function(checkbox) {
if (el.value === checkbox.value) {
return false;
Function set_public
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function set_public(flag){
if(progress) return;
var api = new LDR.API("/api/feed/set_public");
var selected = Subs.filter(function(sub){
return (sub.selected && sub["public"] != flag);
Function post
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
post: function(param,onload){
this.req = new _XMLHttpRequest;
var onload = onload || this.onload;
var oncomplete = this.onComplete;
if(typeof onload != "function"){
Method confirm
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def confirm
feeds = []
# params[:url] is http:/example.com because of squeeze("/")
@url = url_from_path(:url)
FeedSearcher.search(@url).each do |feedlink|
- 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 subscribe_submit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function subscribe_submit(e){
if(!this.history_back.checked) return;
var form = this;
var folder_id = this.folder_id.value;
- 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 subscribed
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def subscribed
feedlink = params[:feedlink]
sub_id = (params[:subscribe_id] || 0).to_i
sub = nil
if sub_id > 0
- 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 30 lines of code (exceeds 25 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]
Function open_group
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
open_group: function(){
if(!this.pins.length) return;
var queue = new LDR.Queue();
var can_popup = false;
var self = this;
Method discover
has 30 lines of code (exceeds 25 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
Function MakeUpdater
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MakeUpdater(label){
var hash = {};
var updater = (label?label+"_":"") + "updater";
var update = (label?label+"_":"") + "update";
function get_func(label){
Function setup_hotkey
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
LDR.setup_hotkey = function(){
Keybind = new HotKey(null, "reader");
Keybind.globalCallback = function(){
app.state.LastUserAction = new Date;
if(app.state.show_error) hide_error();
Function print_discover
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print_discover(list){
var output = _$("discover_items");
var sub = Template.get("discover_select_sub").compile()
var unsub = Template.get("discover_select_unsub").compile()
if(list.length == 0){