dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

export const getOneRoom = async (address) => {
    return await Room.findOne({address: address, bot_name: botOptions.botData.firstName}).exec();
}
Severity: Major
Found in bots/botTemplate/database/controllers/rooms.js and 5 other locations - About 1 hr to fix
bots/autoResponder/database/controllers/rooms.js on lines 15..17
bots/gptBot/database/controllers/rooms.js on lines 15..17
bots/merchantBot/controllers/rooms.js on lines 16..18
bots/raffle/database/controllers/rooms.js on lines 15..17
bots/translateBot/database/controllers/rooms.js on lines 15..17

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 55.

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 6 locations. Consider refactoring.
Open

export const getOneRoom = async (address) => {
    return await Room.findOne({address: address, bot_name: botOptions.botData.firstName}).exec();
}
Severity: Major
Found in bots/raffle/database/controllers/rooms.js and 5 other locations - About 1 hr to fix
bots/autoResponder/database/controllers/rooms.js on lines 15..17
bots/botTemplate/database/controllers/rooms.js on lines 15..17
bots/gptBot/database/controllers/rooms.js on lines 15..17
bots/merchantBot/controllers/rooms.js on lines 16..18
bots/translateBot/database/controllers/rooms.js on lines 15..17

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<HeaderAppTitle/>).toJSON();
   expect(tree).toMatchSnapshot();
 
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<HeaderBalanceButton/>).toJSON();
   expect(tree).toMatchSnapshot();
 
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<MessageText/>).toJSON();
   expect(tree).toMatchSnapshot();
 
Severity: Major
Found in client-reactnative/__tests__/Chat/MessageText-test.tsx and 6 other locations - About 1 hr to fix
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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

      <Modal
        animationIn={'slideInUp'}
        animationOut={'slideOutDown'}
        isVisible={modalData.visible}
        onBackdropPress={() => setModalData({visible: false, link: ''})}>
client-reactnative/src/Screens/Privacy/ProfileShareManage.tsx on lines 169..175

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<HeaderAppLogo/>).toJSON();
   expect(tree).toMatchSnapshot();
 
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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

      <Modal
        animationIn={'slideInUp'}
        animationOut={'slideOutDown'}
        isVisible={modalData.visible}
        onBackdropPress={() => setModalData({visible: false, link: ''})}>
client-reactnative/src/Screens/Privacy/DocumentShareManage.tsx on lines 165..175

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 55.

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 4 locations. Consider refactoring.
Open

  if (!values.password) {
    errors.password = "Required";
  } else if (values.password.length <= 3) {
    errors.password = "Must be 3 characters or more";
  }
Severity: Major
Found in client-web/src/pages/Signon/EmailSignInForm.tsx and 3 other locations - About 1 hr to fix
client-web/src/pages/Signon/EmailSignUpForm.tsx on lines 35..39
client-web/src/pages/Signon/UsernameSignInForm.tsx on lines 26..30
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 25..29

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<MessageBody/>).toJSON();
   expect(tree).toMatchSnapshot();
 
Severity: Major
Found in client-reactnative/__tests__/Chat/MessageBody-test.tsx and 6 other locations - About 1 hr to fix
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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 4 locations. Consider refactoring.
Open

  if (!values.password) {
    errors.password = "Required";
  } else if (values.password.length <= 3) {
    errors.password = "Must be 3 characters or more";
  }
Severity: Major
Found in client-web/src/pages/Signon/UsernameSignUpForm.tsx and 3 other locations - About 1 hr to fix
client-web/src/pages/Signon/EmailSignInForm.tsx on lines 27..31
client-web/src/pages/Signon/EmailSignUpForm.tsx on lines 35..39
client-web/src/pages/Signon/UsernameSignInForm.tsx on lines 26..30

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<HeaderMenu/>).toJSON();
   expect(tree).toMatchSnapshot();
 
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/Login/LoginScreen-test.tsx on lines 6..11
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10

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 55.

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 4 locations. Consider refactoring.
Open

  if (!values.password) {
    errors.password = "Required";
  } else if (values.password.length <= 2) {
    errors.password = "Must be 2 characters or more";
  }
Severity: Major
Found in client-web/src/pages/Signon/UsernameSignInForm.tsx and 3 other locations - About 1 hr to fix
client-web/src/pages/Signon/EmailSignInForm.tsx on lines 27..31
client-web/src/pages/Signon/EmailSignUpForm.tsx on lines 35..39
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 25..29

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 55.

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 7 locations. Consider refactoring.
Open

test("renders correctly", ()=>{
 
   const tree = renderer.create(<LoginScreen/>).toJSON();
   expect(tree).toMatchSnapshot();
 
Severity: Major
Found in client-reactnative/__tests__/Login/LoginScreen-test.tsx and 6 other locations - About 1 hr to fix
client-reactnative/__tests__/Chat/MessageBody-test.tsx on lines 6..11
client-reactnative/__tests__/Chat/MessageText-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppLogo-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderAppTitle-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderBalanceButton-test.tsx on lines 5..10
client-reactnative/__tests__/MainHeader/HeaderMenu-test.tsx on lines 5..10

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 55.

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 4 locations. Consider refactoring.
Open

  if (!values.password) {
    errors.password = "Required";
  } else if (values.password.length <= 3) {
    errors.password = "Must be 3 characters or more";
  }
Severity: Major
Found in client-web/src/pages/Signon/EmailSignUpForm.tsx and 3 other locations - About 1 hr to fix
client-web/src/pages/Signon/EmailSignInForm.tsx on lines 27..31
client-web/src/pages/Signon/UsernameSignInForm.tsx on lines 26..30
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 25..29

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 55.

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

          message.data.isSystemMessage === "false" ? (
            <Message
              onMediaMessageClick={toggleMediaModal}
              toggleTransferDialog={toggleTransferDialog}
              isThread={true}
Severity: Major
Found in client-web/src/components/Chat/Threads/ThreadContainer.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/ChatInRoom/Chat.tsx on lines 673..691

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 55.

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

      {
        from: this.client.jid?.toString(),
        to: room + "/" + this.client.jid?.getLocal(),
        id: "presenceInRoom",
      },
Severity: Major
Found in client-web/src/xmpp.ts and 1 other location - About 1 hr to fix
client-web/src/xmpp.ts on lines 247..251

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 55.

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

        <ChangeRoomNameModal
          changeRoomName={() => console.log('change room name')}
          currentRoomName="Current room name"
          modalVisible={true}
          setModalVisible={() => console.log('set modal visible')}
client-reactnative/__tests__/Modals/Chat/ChangeRoomDescriptionModal-test.tsx on lines 9..14

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 55.

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

   <ChangeRoomDescriptionModal
   changeDescription={() => console.log("change description")}
   currentDescription='desc'
   modalVisible={true}
   setModalVisible={()=>console.log("set modal visible")}
client-reactnative/__tests__/Modals/Chat/ChangeRoomNameModal-test.tsx on lines 10..15

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 55.

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

                return message.data.isSystemMessage === "false" ? (
                  <Message
                    onThreadClick={() => onMessageThreadClick(message)}
                    key={message.id}
                    is={"Message"}
Severity: Major
Found in client-web/src/pages/ChatInRoom/Chat.tsx and 1 other location - About 1 hr to fix
client-web/src/components/Chat/Threads/ThreadContainer.tsx on lines 209..227

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 55.

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