Showing 1,287 of 4,903 total issues
Function notificationGroupsReducer
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
(builder) => {
builder
.addCase(fetchNotifications.fulfilled, (state, action) => {
state.groups = action.payload.map((json) =>
json.type === 'gap' ? json : createNotificationGroupFromJSON(json),
Method call
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def call(username, domain, json, options = {})
return if json['inbox'].blank? || unsupported_uri_scheme?(json['id']) || domain_not_allowed?(domain)
@options = options
@json = json
- 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 emojifyTextNode
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
const emojifyTextNode = (node, customEmojis) => {
const VS15 = 0xFE0E;
const VS16 = 0xFE0F;
let str = node.textContent;
- 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
Status
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
class Status extends ImmutablePureComponent {
static propTypes = {
identity: identityContextPropShape,
params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
Class Account
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
class Account < ApplicationRecord
self.ignored_columns += %w(
devices_url
hub_url
remote_url
Method remotable_attachment
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def remotable_attachment(attachment_name, limit, suppress_errors: true, download_on_assign: true, attribute_name: nil)
attribute_name ||= :"#{attachment_name}_remote_url"
define_method(:"download_#{attachment_name}!") do |url = nil|
url ||= self[attribute_name]
- 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
Status
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
class Status extends ImmutablePureComponent {
static propTypes = {
identity: identityContextPropShape,
params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
Function loaded
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loaded() {
const { messages: localeData } = getLocale();
const locale = document.documentElement.lang;
Function loaded
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loaded() {
const { messages: localeData } = getLocale();
const locale = document.documentElement.lang;
Audio
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class Audio extends PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
Audio
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class Audio extends PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
Class Maintenance
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
class Maintenance < Base
MIN_SUPPORTED_VERSION = 2019_10_01_213028
MAX_SUPPORTED_VERSION = 2023_10_23_105620
# Stubs to enjoy ActiveRecord queries while not depending on a particular
File header.jsx
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
Function PolicyControls
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const PolicyControls: React.FC = () => {
const intl = useIntl();
const dispatch = useAppDispatch();
const notificationPolicy = useAppSelector(
Function PolicyControls
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const PolicyControls: React.FC = () => {
const intl = useIntl();
const dispatch = useAppDispatch();
const notificationPolicy = useAppSelector(
File doodle_modal.jsx
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from 'prop-types';
import classNames from 'classnames';
import ImmutablePropTypes from 'react-immutable-proptypes';
Method remove
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def remove
fail_with_message '--prune-profiles and --remove-headers should not be specified simultaneously' if options[:prune_profiles] && options[:remove_headers]
fail_with_message '--include-follows can only be used with --prune-profiles or --remove-headers' if options[:include_follows] && !(options[:prune_profiles] || options[:remove_headers])
time_ago = options[:days].days.ago
- 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 DetailedStatus
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
}> = ({
status,
onOpenMedia,
onOpenVideo,
onTranslate,
- 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
File notification.jsx
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
import classNames from 'classnames';
Function render
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { intl, multiColumn } = this.props;
return (
<Column>