Showing 502 of 8,855 total issues
File LoginScreen.tsx
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Box,
HStack,
Icon,
Image,
- Create a ticketCreate a ticket
Function processParticipant
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function processParticipant(participant: Participant) {
const { questionIndex } = participant;
// on start
if (questionIndex == -1) {
await nextMessage(
- Create a ticketCreate a ticket
Function DocumentsCreateModal
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function DocumentsCreateModal(props: TProps) {
const [loading, setLoading] = React.useState(false);
const formik = useFormik({
initialValues: {
- Create a ticketCreate a ticket
Function sendMessage
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export async function sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
if (repeat === true) {
for (const [index, msg] of message.messages.entries()) {
await sleep(100)
if (msg.repeat === true) {
- Read upRead up
- Create a ticketCreate a ticket
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 sendMessage
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export async function sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
if (repeat === true) {
for (const [index, msg] of message.messages.entries()) {
await sleep(100)
if (msg.repeat === true) {
- Read upRead up
- Create a ticketCreate a ticket
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 ScanScreen
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const ScanScreen = () => {
//mobx stores
const {loginStore, chatStore, apiStore} = useStores();
//mobx stores
- Read upRead up
- Create a ticketCreate a ticket
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 processParticipant
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function processParticipant(participant: Participant) {
const { questionIndex } = participant
// on start
if (questionIndex == -1) {
await nextMessage(
- Create a ticketCreate a ticket
File UploadDocumentsScreen.tsx
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {useState} from 'react';
import {
Text,
View,
StyleSheet,
- Create a ticketCreate a ticket
Function RoomDetailsCard
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RoomDetailsCard = (props: RoomDetailsCardProps) => {
//component props
const {
onImagePress,
room,
- Create a ticketCreate a ticket
Function ManageData
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ManageData: React.FC<IManageData> = ({}) => {
const {loginStore} = useStores();
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [loading, setLoading] = useState(false);
- Create a ticketCreate a ticket
File EditAcl.tsx
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState } from "react";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableCell from "@mui/material/TableCell";
import TableContainer from "@mui/material/TableContainer";
- Create a ticketCreate a ticket
Function answerHandler
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const answerHandler = (data) => {
console.log('=> answerHandler | Message received from ', data.userJID, data.message);
let currentButtonType = userData('getData', data.userJID, null, 'buttonType');
const userMessage = data.message;
- Create a ticketCreate a ticket
File DocumentHistoryScreen.tsx
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {Fragment, useEffect, useState} from 'react';
import {ActivityIndicator, StyleSheet, TouchableOpacity} from 'react-native';
import {HStack, Image, Text, View, VStack} from 'native-base';
import SecondaryHeader from '../../components/SecondaryHeader/SecondaryHeader';
import AntIcon from 'react-native-vector-icons/AntDesign';
- Create a ticketCreate a ticket
Function UploadDocumentsScreen
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const UploadDocumentsScreen = (props: MintScreenProps) => {
const {loginStore, walletStore, apiStore, debugStore} = useStores();
const navigation = useNavigation();
const [itemName, setItemName] = useState<string>('');
- Read upRead up
- Create a ticketCreate a ticket
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 MintScreen
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const MintScreen = (props: MintScreenProps) => {
const {loginStore, walletStore, apiStore} = useStores();
const navigation = useNavigation();
const [itemName, setItemName] = useState<string>('');
- Read upRead up
- Create a ticketCreate a ticket
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 EmailSingInForm
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function EmailSingInForm(props: TProps) {
const history = useHistory();
const setUser = useStoreState((state) => state.setUser);
const [disable, setDisable] = useState(false);
const [showPassword, setShowPassword] = useState(false);
- Create a ticketCreate a ticket
File TokensOrItemsTransfer.tsx
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {VStack, Input, View, Text} from 'native-base';
import React, {useState} from 'react';
import {ActivityIndicator, FlatList, StyleSheet} from 'react-native';
import {
commonColors,
- Create a ticketCreate a ticket
File MessageText.tsx
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import {Button, Image, Text, View} from 'native-base';
import Ionicons from 'react-native-vector-icons/Ionicons';
import {
widthPercentageToDP as wp,
- Create a ticketCreate a ticket
Function Routes
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Routes = () => {
const userId = useStoreState((state) => state.user._id);
const user = useStoreState((state) => state.user);
const setACL = useStoreState((state) => state.setACL);
- Create a ticketCreate a ticket
Function MyProfile
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function MyProfile() {
const [loading, setLoading] = useState(false);
const [transactions, setTransactions] =
useState<ExplorerRespose<ITransaction[]>>();
const user = useStoreState((store) => store.user);
- Create a ticketCreate a ticket