igara/syonet_seven

View on GitHub

Showing 138 of 138 total issues

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

      <Head>
        <title>{ogp.title}</title>
        <meta name="description" content={description}></meta>
        <meta property="og:title" content={ogp.title} />
        <meta property="og:type" content="website" />
Severity: Major
Found in nodejs/www/pages/tools/vrm/index.tsx and 1 other location - About 7 hrs to fix
nodejs/www/pages/tools/sound/index.tsx on lines 139..147

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

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

      <Head>
        <title>{ogp.title}</title>
        <meta name="description" content={description}></meta>
        <meta property="og:title" content={ogp.title} />
        <meta property="og:type" content="website" />
Severity: Major
Found in nodejs/www/pages/tools/sound/index.tsx and 1 other location - About 7 hrs to fix
nodejs/www/pages/tools/vrm/index.tsx on lines 229..237

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

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 ToolsSoundPageComponent has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ToolsSoundPageComponent = () => {
  const dispatch = useDispatch();

  const [name, setName] = useState("");
  const changeName = (event: ChangeEvent<HTMLInputElement>) => setName(event.target.value);
Severity: Major
Found in nodejs/www/pages/tools/sound/index.tsx - About 7 hrs to fix

    Function ToolsScrapingPageComponent has 172 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const ToolsScrapingPageComponent = () => {
      const state = useSelector((state: AppState) => state);
      const dispatch = useDispatch();
    
      const [url, setURL] = useState("");
    Severity: Major
    Found in nodejs/www/pages/tools/scraping.tsx - About 6 hrs to fix

      Function connectHandler has 156 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const connectHandler = async (event: APIGatewayEvent) => {
        const connectionId = event.requestContext.connectionId;
        if (!connectionId) return;
      
        const body = event.body as any;
      Severity: Major
      Found in nodejs/websocket/ssb/src/lambda.ts - About 6 hrs to fix

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

            if (userData.webSocketStatus === WebSocketStatus.BATTLE) {
              const userDataJsonString = JSON.stringify(userData);
              const result = await dynamodb
                .scan({
                  TableName: "ssbs",
        Severity: Major
        Found in nodejs/websocket/ssb/src/lambda.ts and 1 other location - About 5 hrs to fix
        nodejs/websocket/ssb/src/lambda.ts on lines 199..219

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

        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

            if (userData.webSocketStatus === WebSocketStatus.DEAD) {
              const userDataJsonString = JSON.stringify(userData);
        
              const result = await dynamodb
                .scan({
        Severity: Major
        Found in nodejs/websocket/ssb/src/lambda.ts and 1 other location - About 5 hrs to fix
        nodejs/websocket/ssb/src/lambda.ts on lines 140..159

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

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

          test("Date 2018-11-11 11:11:11 minutes", async () => {
            let option = {
              minutes: -1,
            };
            expect(getMultiFormatDateTime(option)).toBe("2018-11-11 11:10:11");
        Severity: Major
        Found in nodejs/www/specs/libs/datetime.spec.ts and 4 other locations - About 5 hrs to fix
        nodejs/www/specs/libs/datetime.spec.ts on lines 32..49
        nodejs/www/specs/libs/datetime.spec.ts on lines 70..87
        nodejs/www/specs/libs/datetime.spec.ts on lines 89..106
        nodejs/www/specs/libs/datetime.spec.ts on lines 108..125

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

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

          test("Date 2018-11-11 11:11:11 hours", async () => {
            let option = {
              hours: -1,
            };
            expect(getMultiFormatDateTime(option)).toBe("2018-11-11 10:11:11");
        Severity: Major
        Found in nodejs/www/specs/libs/datetime.spec.ts and 4 other locations - About 5 hrs to fix
        nodejs/www/specs/libs/datetime.spec.ts on lines 32..49
        nodejs/www/specs/libs/datetime.spec.ts on lines 51..68
        nodejs/www/specs/libs/datetime.spec.ts on lines 89..106
        nodejs/www/specs/libs/datetime.spec.ts on lines 108..125

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

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

          test("Date 2018-11-11 11:11:11 date", async () => {
            let option = {
              day: -1,
            };
            expect(getMultiFormatDateTime(option)).toBe("2018-11-10 11:11:11");
        Severity: Major
        Found in nodejs/www/specs/libs/datetime.spec.ts and 4 other locations - About 5 hrs to fix
        nodejs/www/specs/libs/datetime.spec.ts on lines 32..49
        nodejs/www/specs/libs/datetime.spec.ts on lines 51..68
        nodejs/www/specs/libs/datetime.spec.ts on lines 70..87
        nodejs/www/specs/libs/datetime.spec.ts on lines 108..125

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

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

          test("Date 2018-11-11 11:11:11 month", async () => {
            let option = {
              month: -1,
            };
            expect(getMultiFormatDateTime(option)).toBe("2018-10-11 11:11:11");
        Severity: Major
        Found in nodejs/www/specs/libs/datetime.spec.ts and 4 other locations - About 5 hrs to fix
        nodejs/www/specs/libs/datetime.spec.ts on lines 32..49
        nodejs/www/specs/libs/datetime.spec.ts on lines 51..68
        nodejs/www/specs/libs/datetime.spec.ts on lines 70..87
        nodejs/www/specs/libs/datetime.spec.ts on lines 89..106

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

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

          test("Date 2018-11-11 11:11:11 seconds", async () => {
            let option = {
              seconds: -1,
            };
            expect(getMultiFormatDateTime(option)).toBe("2018-11-11 11:11:10");
        Severity: Major
        Found in nodejs/www/specs/libs/datetime.spec.ts and 4 other locations - About 5 hrs to fix
        nodejs/www/specs/libs/datetime.spec.ts on lines 51..68
        nodejs/www/specs/libs/datetime.spec.ts on lines 70..87
        nodejs/www/specs/libs/datetime.spec.ts on lines 89..106
        nodejs/www/specs/libs/datetime.spec.ts on lines 108..125

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

        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

              <Head>
                <title>{ogp.title}</title>
                <meta content="五十嵐翔の個人サイト" name="description"></meta>
                <meta property="og:title" content={ogp.title} />
                <meta property="og:type" content="website" />
        Severity: Major
        Found in nodejs/www/pages/index.tsx and 1 other location - About 5 hrs to fix
        nodejs/www/pages/tools/ssb.tsx on lines 42..50

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

        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

              <Head>
                <title>{ogp.title}</title>
                <meta content="パクリゲー" name="description"></meta>
                <meta property="og:title" content={ogp.title} />
                <meta property="og:type" content="website" />
        Severity: Major
        Found in nodejs/www/pages/tools/ssb.tsx and 1 other location - About 5 hrs to fix
        nodejs/www/pages/index.tsx on lines 53..61

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

        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 ToolsSpeechPageComponent has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const ToolsSpeechPageComponent = () => {
          const dispatch = useDispatch();
          const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
            onCompleted: async checkAuth => {
              if (!checkAuth.checkAuth) {
        Severity: Major
        Found in nodejs/www/pages/tools/speech.tsx - About 4 hrs to fix

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

                  <div>
                    背景色変更
                    <SelectComponent
                      OnChangeHandler={(e: ChangeEvent<HTMLSelectElement>) => {
                        setVRMBackgroundColor(e.target.value);
          Severity: Major
          Found in nodejs/www/pages/tools/vrm/index.tsx and 1 other location - About 4 hrs to fix
          nodejs/www/pages/tools/speech.tsx on lines 106..119

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

          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

                    <div>
                      背景色変更
                      <SelectComponent
                        OnChangeHandler={(e: ChangeEvent<HTMLSelectElement>) => {
                          setBackgroundColor(e.target.value);
          Severity: Major
          Found in nodejs/www/pages/tools/speech.tsx and 1 other location - About 4 hrs to fix
          nodejs/www/pages/tools/vrm/index.tsx on lines 257..270

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

          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

            server.use((req, res, next) => {
              res.set("Access-Control-Allow-Origin", "*");
              res.set("Access-Control-Allow-Headers", "Content-Type");
              res.set("Cache-Control", "public, no-cache");
          
          
          Severity: Major
          Found in nodejs/www/server.ts and 1 other location - About 4 hrs to fix
          nodejs/api/src/express.ts on lines 21..35

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

          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

            app.use((req, res, next) => {
              res.set("Access-Control-Allow-Origin", "*");
              res.set("Access-Control-Allow-Headers", "Content-Type");
              res.set("Cache-Control", "public, no-cache");
          
          
          Severity: Major
          Found in nodejs/api/src/express.ts and 1 other location - About 4 hrs to fix
          nodejs/www/server.ts on lines 33..44

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

          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 ToolsVRMPageComponent has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const ToolsVRMPageComponent = () => {
            const dispatch = useDispatch();
            const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
              onCompleted: async checkAuth => {
                if (!checkAuth.checkAuth) {
          Severity: Major
          Found in nodejs/www/pages/tools/vrm/index.tsx - About 3 hrs to fix
            Severity
            Category
            Status
            Source
            Language