Showing 4,862 of 4,862 total issues
Function deleteAllPaymentMethodsByFunctionRequestHandler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* deleteAllPaymentMethodsByFunctionRequestHandler(
pagoPaClient: PaymentManagerClient,
pmSessionManager: SessionManager<PaymentManagerToken>,
action: ActionType<typeof deleteAllPaymentMethodsByFunction>
): Generator<ReduxSagaEffect, void, any> {
- 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 paymentIdPollingRequestHandler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* paymentIdPollingRequestHandler(
getPaymentIdApi: ReturnType<ReturnType<typeof BackendClient>["getPaymentId"]>,
action: ActionType<(typeof paymentIdPolling)["request"]>
) {
// successfully request the payment activation
- 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 read_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def read_file(files, black_list_url):
"""
Reads the collection of files passed as parameter and returns the set of uris found inside all the files
:param files: an iterable of file paths
:param black_list_url: a set of urls to exclude from scanning
- 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 scan_directory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def scan_directory(path, file_black_list, black_list_url, ext_set={'*.ts*'}):
"""
Scan the chosen directory, and the sub-directories and returns the execution of read_file from the found collection of files
:param path: directory to scan
:param file_black_list: a set of files to exclude from scanning
- 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 useCreatePin
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const useCreatePin = (props = { isOnboarding: false }) => {
const { isOnboarding } = props;
const navigation = useIONavigation();
const { success: toastSuccess } = useIOToast();
const assistanceToolConfig = useIOSelector(assistanceToolConfigSelector);
- 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 useNavigateToLoginMethod
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const useNavigateToLoginMethod = () => {
const dispatch = useIODispatch();
const isFastLoginOptInFFEnabled = useIOSelector(fastLoginOptInFFEnabled);
const store = useIOStore();
const { navigate } = useIONavigation();
- 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 checkConfiguredPinSaga
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* checkConfiguredPinSaga(): Generator<
ReduxSagaEffect,
PinString,
any
> {
- 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 extractPathFromURL
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function extractPathFromURL(
prefixes: ReadonlyArray<string>,
url: string
): string | undefined {
for (const prefix of prefixes) {
- 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 GenericErrorComponent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const GenericErrorComponent = (props: Props) => {
const ref = useMemo(() => props.ref ?? React.createRef<View>(), [props.ref]);
const renderFooterButtons = () =>
props.onCancel ? (
- 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 IdentificationNumberPad
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const IdentificationNumberPad = (
props: IdentificationNumberPadProps
) => {
const [value, setValue] = 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 calculateH4WeightColor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const calculateH4WeightColor = (
weight?: AllowedWeight,
color?: AllowedColors
): RequiredTypographyProps<AllowedWeight, AllowedColors> => {
const newWeight = weight ?? "Bold";
- 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 getAccessibilityLabels
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getAccessibilityLabels = (creditCard: CreditCardState) => ({
cardHolder:
O.isNone(creditCard.holder) || isValidCardHolder(creditCard.holder)
? I18n.t("wallet.dummyCard.accessibility.holder.base")
: I18n.t("wallet.dummyCard.accessibility.holder.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 versionInfoWatcher
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function* versionInfoWatcher(): Generator<ReduxSagaEffect, void, any> {
const contentClient = ContentClient();
function getVersionInfo(): Promise<
t.Validation<BasicResponseType<VersionInfo>>
- 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 getCustomSignature
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const getCustomSignature = (
documentsToSign: Array<QtspDocumentToSign>
) =>
pipe(
documentsToSign,
- 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 reduceLoadNextPage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const reduceLoadNextPage = (
state: AllPaginated = INITIAL_STATE,
action: Action
): AllPaginated => {
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 reduceReloadAll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const reduceReloadAll = (
state: AllPaginated = INITIAL_STATE,
action: Action
): AllPaginated => {
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 handleGetEuCovidCertificate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetEuCovidCertificate(
getCertificate: ReturnType<typeof BackendEuCovidCertClient>["getCertificate"],
action: ActionType<typeof euCovidCertificateGet.request>
) {
const authCode = action.payload;
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
const reducer = (
state: IdPayWalletState = INITIAL_STATE,
action: Action
): IdPayWalletState => {
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 cgnGetInformationSaga
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* cgnGetInformationSaga(
getCgnStatus: ReturnType<typeof BackendCGN>["getCgnStatus"],
action: ActionType<(typeof cgnDetails)["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 handleEycaActivationSaga
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handleEycaActivationSaga(
getEycaActivation: ReturnType<typeof BackendCGN>["getEycaActivation"]
) {
const startPollingTime = new Date().getTime();
while (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"