Showing 4,378 of 4,378 total issues
Function renderModuleAttachment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const renderModuleAttachment = (isDesignSystemEnabled: boolean) => (
<DSComponentViewerBox name="ModuleAttachment">
<View>
{isDesignSystemEnabled ? (
<ModuleAttachment
- 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 MessageDetailsComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const MessageDetailsComponent = ({
hasPaidBadge,
message,
messageDetails,
onServiceLinkPress,
- 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 AddBPayScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AddBPayScreen = (props: Props): React.ReactElement | null => {
// next could be skip or not (a pan should be added)
const [currentAction, setNextAction] = React.useState<NextAction>({
index: 0,
skip: 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 PaymentsHomeUserMethodsList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PaymentsHomeUserMethodsList = ({ enforcedLoadingState }: Props) => {
const bannerRef = React.createRef<View>();
const navigation = useIONavigation();
const dispatch = useIODispatch();
- 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 CgnMerchantsFilters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CgnMerchantsFilters: React.FunctionComponent<Props> = (props: Props) => {
const [searchValue, setSearchValue] = useState<string>("");
const [address, setAddress] = useState<string>("");
const [checkedCategories, setCheckedCategories] = useState<
ReadonlyArray<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 WalletPaymentHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const WalletPaymentHeader = ({ currentStep }: WalletPaymentHeaderProps) => {
const navigation = useIONavigation();
const dispatch = useIODispatch();
const goBackHandler = useWalletPaymentGoBackHandler();
- 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 BaseCoBadgeCard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const BaseCoBadgeCard: React.FunctionComponent<Props> = (props: Props) => {
const imgDimensions = useImageResize(
BASE_IMG_W,
BASE_IMG_H,
props.abi?.logoUrl
- 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 CgnOTPCodeContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CgnOTPCodeContent = ({ onCodePress }: Props) => {
const [isCodeVisible, setIsCodeVisible] = React.useState(false);
const dispatch = useIODispatch();
const otp = useIOSelector(cgnOtpDataSelector);
- 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 AddCoBadgeScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AddCoBadgeScreen = (props: Props): React.ReactElement | null => {
// next could be skip or not (a pan should be added)
const [currentAction, setNextAction] = React.useState<NextAction>({
index: 0,
skip: 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 CgnMerchantsListScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CgnMerchantsListScreen: React.FunctionComponent<Props> = (
props: Props
) => {
const [searchValue, setSearchValue] = React.useState("");
const [merchantList, setMerchantsList] = React.useState<
- 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 LegacyCgnServiceCTA
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const LegacyCgnServiceCTA = (props: Props) => {
const isFirstRender = useRef<boolean>(true);
const dispatch = useIODispatch();
const servicePreference = useIOSelector(servicePreferenceSelector);
const unsubscriptionStatus = useIOSelector(cgnUnsubscribeSelector);
- 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 SearchAvailableUserBPayScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SearchAvailableUserBPayScreen = (props: Props): React.ReactElement => {
useAvoidHardwareBackButton();
const bPayAccounts = props.bPayAccounts;
const noBPayFound = isReady(bPayAccounts) && bPayAccounts.value.length === 0;
- 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 WalletPaymentOutcomeScreen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const WalletPaymentOutcomeScreen = () => {
useAvoidHardwareBackButton();
const { params } = useRoute<WalletPaymentOutcomeRouteProps>();
const { outcome } = 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 CdcRequestPartiallySuccess
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const CdcRequestPartiallySuccess = () => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const cdcEnrollUserToBonus = useIOSelector(cdcEnrollUserToBonusSelector);
const onExitPress = () => {
- 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 SearchStartComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const SearchStartComponent: React.FunctionComponent<Props> = (
props: Props
) => {
const locales = loadLocales(props.methodType);
- 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 getContextualHelpDataFromRouteSelector
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getContextualHelpDataFromRouteSelector = (route: string) =>
createSelector<
GlobalState,
pot.Pot<ContextualHelp, Error>,
pot.Pot<O.Option<ScreenCHData>, Error>
- 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 FeaturedCardCarousel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const FeaturedCardCarousel: React.FunctionComponent<Props> = (props: Props) => {
const dispatch = useIODispatch();
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const isCgnEnabled = useIOSelector(isCGNEnabledSelector);
const isCdcEnabled = useIOSelector(isCdcEnabledSelector);
- 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 updatePrTitleForChangelog
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const updatePrTitleForChangelog = async (
tickets: JiraTicketRetrievalResults
) => {
if (tickets.some(E.isLeft)) {
warn(atLeastOneLeftTicket);
- 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"