Showing 1,287 of 4,903 total issues
Function timeRemainingString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const timeRemainingString = (
intl: IntlShape,
date: Date,
now: number,
timeGiven = true,
- 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 Hashtag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const Hashtag: React.FC<HashtagProps> = ({
name,
to,
people,
uses,
- 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 loaded
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function loaded() {
const { messages: localeData } = getLocale();
const locale = document.documentElement.lang;
- 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
Avoid too many return
statements within this function. Open
return showAlert({
title: messages.unexpectedTitle,
message: messages.unexpectedMessage,
});
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return '';
Avoid too many return
statements within this function. Open
return showAlert({
title: messages.unexpectedTitle,
message: messages.unexpectedMessage,
});
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return messages.follow;
Avoid too many return
statements within this function. Open
return state.withMutations(map => {
map.set('text', text);
map.set('content_type', action.content_type || 'text/plain');
map.set('in_reply_to', action.status.get('in_reply_to_id'));
map.set('privacy', action.status.get('visibility'));
Avoid too many return
statements within this method. Open
return actor unless verify_signature(actor, signature, compare_signed_string).nil?
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return state.set('id', null);
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return '';
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this method. Open
return ActivityPub::TagManager.instance.uri_to_resource(object_uri, Status) if ActivityPub::TagManager.instance.local_uri?(object_uri)
Avoid too many return
statements within this method. Open
return