Showing 1,287 of 4,903 total issues
Method parallelize_with_progress
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def parallelize_with_progress(scope)
fail_with_message 'Cannot run with this concurrency setting, must be at least 1' if options[:concurrency] < 1
reset_connection_pools!
- 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 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { media, statusId, lang, intl, onClose } = this.props;
const { navigationHidden, zoomedIn, viewportWidth, viewportHeight } = this.state;
const index = this.getIndex();
Function render
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
let ancestors, descendants, remoteHint;
const { isLoading, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, pictureInPicture } = this.props;
const { fullscreen } = this.state;
File public.tsx
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { createRoot } from 'react-dom/client';
import '@/entrypoints/public-path';
import { IntlMessageFormat } from 'intl-messageformat';
File public.tsx
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { createRoot } from 'react-dom/client';
import './public-path';
import { IntlMessageFormat } from 'intl-messageformat';
Function render
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { attachment, lang, index, size, standalone, letterbox, displayWidth, visible } = this.props;
let badges = [], thumbnail;
Status
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class Status extends ImmutablePureComponent {
static contextType = SensitiveMediaContext;
static propTypes = {
Class NoteSerializer
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class ActivityPub::NoteSerializer < ActivityPub::Serializer
include FormattingHelper
context_extensions :atom_uri, :conversation, :sensitive, :voters_count, :direct_message
Class FeedManager
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class FeedManager
include Singleton
include Redisable
# Maximum number of items stored in a single feed
Function render
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { src, intl, alt, lang, editable, autoPlay, sensitive, blurhash } = this.props;
const { paused, volume, currentTime, duration, buffer, dragging, revealed } = this.state;
const progress = Math.min((currentTime / duration) * 100, 100);
const muted = this.state.muted || volume === 0;
Function render
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { attachment, lang, index, size, standalone, displayWidth, visible } = this.props;
let badges = [], thumbnail;
Function render
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { src, intl, alt, lang, editable, autoPlay, sensitive, blurhash } = this.props;
const { paused, volume, currentTime, duration, buffer, dragging, revealed } = this.state;
const progress = Math.min((currentTime / duration) * 100, 100);
const muted = this.state.muted || volume === 0;
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { card } = this.props;
const { embedded, revealed } = this.state;
if (card === null) {
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { card } = this.props;
const { embedded, revealed } = this.state;
if (card === null) {
Function getData
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function getData(emoji, skin, set) {
let emojiData = {};
if (typeof emoji === 'string') {
let matches = emoji.match(COLONS_REGEX);
- 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 getData
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function getData(emoji, skin, set) {
let emojiData = {};
if (typeof emoji === 'string') {
let matches = emoji.match(COLONS_REGEX);
- 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 AccountCard
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const AccountCard: React.FC<{ accountId: string }> = ({ accountId }) => {
const intl = useIntl();
const account = useAppSelector((s) => getAccount(s, accountId));
const dispatch = useAppDispatch();
- 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 FollowButton
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
}> = ({ accountId }) => {
const intl = useIntl();
const dispatch = useAppDispatch();
const { signedIn } = useIdentity();
const account = useAppSelector((state) =>
- 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 AccountCard
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const AccountCard: React.FC<{ accountId: string }> = ({ accountId }) => {
const intl = useIntl();
const account = useAppSelector((s) => getAccount(s, accountId));
const dispatch = useAppDispatch();
- 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 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
render () {
const { status, relationship, intl } = this.props;
const { signedIn, permissions } = this.props.identity;
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));