Showing 99 of 2,171 total issues
File PickMeUpCalendar.jsx
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Component } from 'react'
import * as Pickmeup from 'pickmeup/js/pickmeup.js'
import { merge } from 'merge-anything'
import {julianEaster, orthodoxEaster} from 'date-easter'
import PropTypes from 'prop-types'
File nameMeta.jsx
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { matchLanguages, matchAlphabeths, matchLetters, matchEmptyObject, matchCodes, matchEmptyCollection } from 'matchers'
import UrlRegexp from 'UrlRegexp'
export const nameMeta = {
default: "text",
File scriptumMeta.jsx
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { matchLanguages, matchAlphabeths, matchLetters, matchEmptyObject, matchCodes, matchEmptyCollection } from 'matchers'
export const scriptumMeta = {
default: "text", //TODO (value) => { return value.text || value.ref_title || value.title },
remoteNames: 'scripta',
Function rendered
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
let rendered = Object.getOwnPropertyNames(mapped).map(name => {
let visibleIf = mapped[name]['visible_if'], visible = true
switch(visibleIf && visibleIf.constructor.name) {
case 'Object':
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
console.log("[Dashboard] * state", this.state)
return (
[<header>
Function dateFor
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
static dateFor(yearDate, msDate, style) {
console.debug("[dateFor] <<<", yearDate, msDate, style)
let dateIn = new Date(msDate || Date.now()),
yearIn = dateIn.getFullYear(),
- 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 parse_instance_attrs
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def parse_instance_attrs model_name, attrs, key
model = model_name.constantize
children =
attrs.map do |x, value|
(value.is_a?(Array) || value.is_a?(Hash)) && x || nil
- 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 included
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.included base
base.class_eval do
has_many :descriptions, -> { where(type: :Description) }, as: :describable, dependent: :delete_all do
def for language_codes
where(language_code: language_codes).first
Function matchCodes
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function matchCodes(eIn, context) {
let e = eIn || {}
const language_tree = {
ру: ['РУ', 'РО'],
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
console.log("[render] *", { 'this.props': this.props, 'this.state': this.state })
return (
<div className='row'>
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
console.log("[render] *", { 'this.props': this.props, 'this.state': this.state })
return (
<div className='row'>
Consider simplifying this complex logical expression. Open
} else if (m[3]) {
year = this.fixedYearForYearDate(m[3], yearIn),
datePre = new Date(Date.parse((m[3].concat("." + year)).split('.').reverse().join('-'))),
gapIn = parseInt(m[5]) - datePre.getDay()
PickMeUpCalendar
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export default class PickMeUpCalendar extends Component {
static defaultProps = {
withDate: null,
calendarStyle: 'neojulian',
calendary: {},
Method validate_each
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def validate_each(record, attribute, value)
# if a local link just return true
return true if value =~ %r{^/}
response = Net::HTTP.get_response(URI(value && Addressable::URI.encode(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 fix_year_date
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fix_year_date
self.year_date =
case self.year_date
when /пасха/
"+0"
File subjectMeta.jsx
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { matchLanguages, matchAlphabeths, matchLetters, matchEmptyObject,
matchCodes, matchEmptyCollection, matchValidJson } from 'matchers'
import { makeName, makeDescription } from 'makers'
import UrlRegexp from 'UrlRegexp'
Method validate_each
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def validate_each(record, attribute, value)
o = plain_options
code = record.alphabeth_code.to_s.to_sym
res = Languageble::MATCH_TABLE[ code ]
if res
- 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 render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
console.log('props', this.props)
return (
[<header>
Method included
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.included base
base.class_eval do
has_many :links, as: :info, dependent: :destroy
scope :with_links, -> context do
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
console.log("[render] * this.props:", this.props, "this.state:", this.state)
return [
<div>