Showing 31 of 64 total issues
Function render
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
data: { people, defaultPhoto, localization, selectedPersonIndex },
actions: { nextPerson, previousPerson },
} = this.props;
Function render
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
data: { people, loading, editStudentProfileId, examinations, localization, editExaminationId },
} = this.props;
Class Person
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Person < ApplicationRecord
include Ilikable
class SymbolWrapper
def self.load(string)
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
people,
loading,
canManage,
File advanced-search.jsx
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
import qs from 'qs';
import pipe from 'pipe-functions';
import React, { PropTypes } from 'react';
import bindAll from '../../../lib/helpers/bind-all';
Function _shownFilters
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
_shownFilters() {
const searchState = this.state.search;
const configs = this.props.filters;
// Skipping gaps in the ids series
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { dispatch, groupPerformanceStore } = this.props;
const actions = bindActionCreators(groupPerformanceActionCreators, dispatch);
const {
people,
Function groupPerformanceReducer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function groupPerformanceReducer(state = initialState, action) {
switch (action.type) {
case actionTypes.SHOW_LOADER:
return {
...state,
Function _initDefaultFilters
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
_initDefaultFilters(state) {
const config = this.props.filters;
const searchQuery = state.urlQuery.search || [];
const searchState = {};
const firstValues = Object.fromEntries(
Function render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
canManage,
peopleIds,
examination,
Function groupAttendanceReducer
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function groupAttendanceReducer(state = initialState, action) {
switch (action.type) {
case actionTypes.OPEN_ATTENDANCE_SUBMITTER:
return {
...state,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
people,
loading,
canManage,
Method current_path?
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def current_path?(uri, options = {})
unless request
raise "You cannot use helpers that need to determine the current " "page unless your view context provides a Request object " "in a #request method"
end
- 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 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { people, loading, canManage, classSchedules, getAttendance, openAttendanceSubmitter } = this.props;
const peopleIds = people.map(person => person.studentProfileId);
const peopleNames = people.map(person =>
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { canManage, peopleIds, classSchedule: { date, courseTitle, attendances } } = this.props;
let presenceCount = 0;
const attendanceMarkers = [];
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { peopleIds, classSchedules } = this.props;
const statsticsCells = [];
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const onTimeSelect = direction => () => this._updateSchedules(1, direction);
const timeSelector = (
<div className="col-xs-12 vert-offset-bottom-1">
<TimesSelector
Method certificate_template_params
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def certificate_template_params
params
.require(:certificate_template)
.permit(
:title,
Method update
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update
self.resource = resource_get
prev_unconfirmed_email = resource.unconfirmed_email if resource.respond_to?(:unconfirmed_email)
resource_updated = update_resource(resource, account_update_params)
- 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 PerformanceMarker
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const PerformanceMarker = ({
score,
personId,
examinationId,
isEditExamination,
- 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"