teamdigitale/italia-app

View on GitHub

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,
Severity: Minor
Found in ts/components/LabelledItem/index.tsx - About 25 mins to fix

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) {
Severity: Minor
Found in ts/screens/profile/analytics/index.ts - About 25 mins to fix

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,
Severity: Minor
Found in ts/components/screens/ScreenContentHeader.tsx - About 25 mins to fix

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;
Severity: Minor
Found in ts/components/wallet/OutcomeCodeMessageComponent.tsx - About 25 mins to fix

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;
Severity: Minor
Found in ts/screens/wallet/ConfirmCardDetailsScreen.tsx - About 25 mins to fix

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
Severity: Minor
Found in ts/screens/authentication/OptInScreen.tsx - About 25 mins to fix

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 {
Severity: Minor
Found in ts/features/fci/saga/networking/handleCreateFilledDocument.ts - About 25 mins to fix

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);
Severity: Minor
Found in ts/screens/profile/FiscalCodeScreen.tsx - About 25 mins to fix

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
) => {
Severity: Minor
Found in ts/features/messages/saga/handleThirdPartyMessage.ts - About 25 mins to fix

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
Severity: Minor
Found in ts/features/messages/utils/convertDateToWordDistance.ts - About 25 mins to fix

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] =
Severity: Minor
Found in ts/features/messages/hooks/useMessageReminder.ts - About 25 mins to fix

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
  >
Severity: Minor
Found in ts/features/messages/saga/handlePaymentStatusForAnalyticsTracking.ts - About 25 mins to fix

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
) => ({
  /**
Severity: Minor
Found in ts/features/itwallet/machine/eid/guards.ts - About 25 mins to fix

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) {
Severity: Minor
Found in ts/features/lollipop/saga/index.ts - About 25 mins to fix

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) {
Severity: Minor
Found in ts/features/payments/checkout/store/reducers/index.ts - About 25 mins to fix

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 {
Severity: Minor
Found in ts/features/services/institution/saga/handleFindInstitutionServices.ts - About 25 mins to fix

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<
Severity: Minor
Found in ts/features/zendesk/saga/networking/handleGetZendeskConfig.ts - About 25 mins to fix

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);
Severity: Minor
Found in ts/features/services/search/saga/handleFindInstitutions.ts - About 25 mins to fix

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'
Severity: Minor
Found in ts/features/zendesk/saga/index.ts - About 25 mins to fix

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);
Severity: Minor
Found in ts/features/pushNotifications/sagas/common.ts - About 25 mins to fix

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

Severity
Category
Status
Source
Language