dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            <Box sx={{ margin: 2, display: "flex", justifyContent: "center" }}>
              <LoadingButton
                loading={loading}
                variant="contained"
                type="submit"
Severity: Major
Found in client-web/src/pages/Signon/OwnerRegistrationModal.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Signon/OwnerLogin.tsx on lines 143..152

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            <Box sx={{ margin: 2, display: "flex", justifyContent: "center" }}>
              <LoadingButton
                loading={loading}
                variant="contained"
                type="submit"
Severity: Major
Found in client-web/src/pages/Signon/OwnerLogin.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 758..767

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function getConnectData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Minor
Found in bots/translateBot/config/connect.js - About 1 hr to fix

Function getConnectData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Minor
Found in bots/raffle/config/connect.js - About 1 hr to fix

Function getConnectData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Minor
Found in bots/botTemplate/config/connect.js - About 1 hr to fix

Function sendMediaMessageStanza has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const sendMediaMessageStanza = async (
  from: string,
  to: string,
  data: any,
  xmpp: any,
Severity: Minor
Found in client-reactnative/src/xmpp/stanzas.ts - About 1 hr to fix

Function getMentionPartSuggestionKeywords has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getMentionPartSuggestionKeywords = (
  parts: Part[],
  plainText: string,
  selection: Position,
  partTypes: PartType[],
Severity: Minor
Found in client-reactnative/src/helpers/chat/inputUtils.ts - About 1 hr to fix

Function HeaderBalanceButton has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const HeaderBalanceButton = observer(() => {
  const {walletStore} = useStores();
  const navigation = useNavigation<HomeStackNavigationProp>();
  const onButtonPress = () => {
    navigation.navigate('ProfileScreen');

Function onDirectMessagePress has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const onDirectMessagePress = async () => {
    const otherUserWalletAddress = dataForTransfer?.walletFromJid;
    const myWalletAddress = loginStore.initialData.walletAddress;
    const combinedWalletAddress = [myWalletAddress, otherUserWalletAddress]
      .sort()

Function sendMediaMessageStanza has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  sendMediaMessageStanza(roomJID: string, data: any) {
    const message = xml(
      "message",
      {
        id: "sendMessage",
Severity: Minor
Found in client-web/src/xmpp.ts - About 1 hr to fix

Function onDirectChatPress has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const onDirectChatPress = () => {
    const otherUserWalletAddress = loginStore.anotherUserWalletAddress;
    const myWalletAddress = loginStore.initialData.walletAddress;
    const combinedWalletAddress = [myWalletAddress, otherUserWalletAddress]
      .sort()
Severity: Minor
Found in client-reactnative/src/Screens/Profile/OtherUserProfileScreen.tsx - About 1 hr to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

interface ISharedLink {
  _id: string;
  createdAt?: Date;
  expiration: string;
  memo: string;
Severity: Major
Found in client-reactnative/src/Screens/Privacy/ProfileShareAdd.tsx and 1 other location - About 1 hr to fix
client-reactnative/src/Screens/Privacy/DocumentShareAdd.tsx on lines 26..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        try {
          const {data} = await createSharedLink(body)
          console.log(data);
          setCreatedLink(data.sharelinkData);
          getSharedLinks()
Severity: Major
Found in client-web/src/pages/Privacy/AddProfileTabPanel.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/AddDocumentTabPanel.tsx on lines 63..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        try {
          const {data} = await createSharedLink(body)
          console.log(data);
          setCreatedLink(data.sharelinkData);
          getSharedLinks()
Severity: Major
Found in client-web/src/pages/Privacy/AddDocumentTabPanel.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/AddProfileTabPanel.tsx on lines 132..139

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

interface ISharedLink {
  _id: string;
  createdAt?: Date;
  expiration: string;
  memo: string;
Severity: Major
Found in client-reactnative/src/Screens/Privacy/DocumentShareAdd.tsx and 1 other location - About 1 hr to fix
client-reactnative/src/Screens/Privacy/ProfileShareAdd.tsx on lines 22..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                <Box style={{marginTop:'20px'}}>
                <TextField
                onChange={(e)=>handleChange(e.target.value)}
                id="outlined-basic" 
                label="shared with Alice"
Severity: Major
Found in client-web/src/pages/Privacy/AddDocumentTabPanel.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/AddProfileTabPanel.tsx on lines 85..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const OPOSITE_DIRECTIONS: Record<string, string> = {
  [DIRECTIONS.WEST]: DIRECTIONS.EAST,
  [DIRECTIONS.EAST]: DIRECTIONS.WEST,
  [DIRECTIONS.SOUTH]: DIRECTIONS.NORTH,
  [DIRECTIONS.NORTH]: DIRECTIONS.SOUTH,
Severity: Major
Found in client-web/src/components/MetaNavigation/MetaNavigation.tsx and 1 other location - About 1 hr to fix
client-reactnative/src/components/Chat/MetaNavigation.tsx on lines 78..83

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            <Box style={{marginTop:'20px'}}>
            <TextField
            onChange={(e)=>handleChange(e.target.value)}
            id="outlined-basic" 
            label="shared with Alice"
Severity: Major
Found in client-web/src/pages/Privacy/AddProfileTabPanel.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/AddDocumentTabPanel.tsx on lines 246..252

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const OPOSITE_DIRECTIONS: Record<string, string> = {
  [DIRECTIONS.WEST]: DIRECTIONS.EAST,
  [DIRECTIONS.EAST]: DIRECTIONS.WEST,
  [DIRECTIONS.SOUTH]: DIRECTIONS.NORTH,
  [DIRECTIONS.NORTH]: DIRECTIONS.SOUTH,
Severity: Major
Found in client-reactnative/src/components/Chat/MetaNavigation.tsx and 1 other location - About 1 hr to fix
client-web/src/components/MetaNavigation/MetaNavigation.tsx on lines 67..72

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    let user = {
      loginType: 'apple',
      authToken: identityToken,
      displayName: '',
      uid: hashUID,
Severity: Major
Found in client-reactnative/src/helpers/login/socialLoginHandle.ts and 1 other location - About 1 hr to fix
client-reactnative/src/helpers/login/socialLoginHandle.ts on lines 248..256

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language