Showing 4,862 of 4,862 total issues
Function getColorsByProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getColorsByProps({
isDisabledTextInput,
hasFocus,
isEmpty,
isValid,
- 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 getNotificationPreferenceConfiguration
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function getNotificationPreferenceConfiguration(
isReminderEnabled: boolean | undefined,
isPreviewEnabled: boolean | undefined
): NotificationPreferenceConfiguration {
if (isReminderEnabled === undefined || isPreviewEnabled === undefined) {
- 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 ScreenContentHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ScreenContentHeader = ({
title,
subtitle,
subtitleLink,
dynamicHeight,
- 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 OutcomeCodeMessageComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const OutcomeCodeMessageComponent: React.FC<Props> = (props: Props) => {
const locale = getFullLocale();
const title = props.outcomeCode.title
? props.outcomeCode.title[locale]
: undefined;
- 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 mapDispatchToProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const mapDispatchToProps = (dispatch: Dispatch, props: OwnProps) => {
const navigateToNextScreen = (maybeWallet: O.Option<Wallet>) => {
const inPayment = props.route.params.inPayment;
if (O.isSome(inPayment)) {
const { rptId, initialAmount, verifica, idPayment } = inPayment.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
Function OptInScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const OptInScreen = () => {
useHeaderSecondLevel({
title: "",
supportRequest: true,
contextualHelpMarkdown
- 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 handleCreateFilledDocument
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleCreateFilledDocument(
postQtspFilledBody: FciClient["createFilledDocument"],
bearerToken: SessionToken,
action: ActionType<(typeof fciLoadQtspFilledDocument)["request"]>
): SagaIterator {
- 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 FiscalCodeScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const FiscalCodeScreen = () => {
useMaxBrightness();
const titleRef = useRef<View>(null);
const [isCFCopied, setIsCFCopied] = useState(false);
- 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 trackSuccess
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const trackSuccess = (
messageFromApi: ThirdPartyMessageWithContent,
serviceDetails: ServicePublic | undefined,
tag: string
) => {
- 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 convertDateToWordDistance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function convertDateToWordDistance(
date: Date,
lastDayLabel: string,
invalidDateLabel?: string,
todayAtLabel?: string
- 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 useMessageReminder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const useMessageReminder = (
messageId: UIMessageId,
selectCalendar: () => void
) => {
const [isEventInDeviceCalendar, setIsEventInDeviceCalendar] =
- 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 paymentStatusFromPaymentUpdateResult
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const paymentStatusFromPaymentUpdateResult = (
action: ActionType<
| typeof updatePaymentForMessage.success
| typeof updatePaymentForMessage.failure
>
- 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 createEidIssuanceGuardsImplementation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const createEidIssuanceGuardsImplementation = (
store: ReturnType<typeof useIOStore>,
options?: GuardsImplementationOptions
) => ({
/**
- 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 deleteCryptoKeyPair
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function* deleteCryptoKeyPair(keyTag: string) {
// Key is persisted even after uninstalling the application on iOS.
const keyAlreadyExistsOnKeystore = yield* call(checkPublicKeyExists, keyTag);
if (keyAlreadyExistsOnKeystore) {
- 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 reducer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const reducer = (
state: PaymentsCheckoutState = INITIAL_STATE,
action: Action
): PaymentsCheckoutState => {
switch (action.type) {
- 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 handleFindInstitutionServices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleFindInstitutionServices(
findInstutionServices: ServicesClient["findInstutionServices"],
action: ActionType<typeof paginatedServicesGet.request>
) {
try {
- 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 handleGetZendeskConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetZendeskConfig(
getZendeskConfigClient: ReturnType<typeof ContentClient>["getZendeskConfig"]
) {
try {
const getZendeskConfigResult: SagaCallReturnType<
- 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 handleFindInstitutions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handleFindInstitutions(
findInstitutions: ServicesClient["findInstitutions"],
action: ActionType<typeof searchPaginatedInstitutionsGet.request>
) {
yield* delay(DEBOUNCE_SEARCH);
- 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 getZendeskTokenSaga
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function* getZendeskTokenSaga(
getSession: ReturnType<typeof BackendClient>["getSession"]
) {
try {
// Define the fields needed for the token request, in this case, the needed field is only 'zendeskToken'
- 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 handlePendingMessageStateIfAllowed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* handlePendingMessageStateIfAllowed(
shouldResetToMainNavigator: boolean = false
) {
// Check if we have a pending notification message
const pendingMessageState = yield* select(pendingMessageStateSelector);
- 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"