JokeNetwork/faq

View on GitHub

Showing 7 of 7 total issues

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

      <div className={classes.Card}>
        <Link href="/metatags/Apple/apple-itunes-app">
          <svg width="50" version="1.1" viewBox="0 0 1200 1200">
            <g>
              <path
Severity: Major
Found in components/Cards.tsx and 1 other location - About 5 hrs to fix
components/Cards.tsx on lines 26..42

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

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 className={classes.Card}>
        <Link href="/metatags/Technical/refresh">
          <svg width="50" version="1.1" viewBox="0 0 1200 1200">
            <g>
              <path
Severity: Major
Found in components/Cards.tsx and 1 other location - About 5 hrs to fix
components/Cards.tsx on lines 54..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 142.

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

function Logo() {
  return (
    <>
      <svg height="30" viewBox="0 0 68 82">
        <g
Severity: Major
Found in components/logo.tsx - About 4 hrs to fix

    Function Cards has 107 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Cards() {
      return (
        <div className={classes.Cards}>
          <div className={classes.Card}>
            {" "}
    Severity: Major
    Found in components/Cards.tsx - About 4 hrs to fix

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

            <div className={classes.Card}>
              <Link href="/metatags/Miscellaneous/abstract">
                <svg width="50" version="1.1" viewBox="0 0 1200 1200">
                  <path
                    d="m263.04 878.88c6.1797 29.707 22.402 56.379 45.941 75.523 23.539 19.148 52.957 29.598 83.301 29.598h415.44c30.344 0 59.762-10.449 83.301-29.598 23.539-19.145 39.762-45.816 45.941-75.523l44.398-213.48c1.7734-8.2812 2.6602-16.727 2.6406-25.199-0.011719-38.301-17.73-74.449-48-97.918v-86.281c0-38.191-15.172-74.816-42.176-101.82-27.008-27.004-63.633-42.176-101.82-42.176h-100.08l-67.922-67.922c-18.02-17.996-42.453-28.098-67.922-28.078h-148.08c-38.191 0-74.816 15.172-101.82 42.176-27.004 27.008-42.176 63.633-42.176 101.82v182.28c-30.27 23.469-47.988 59.617-48 97.918-0.011719 8.5117 0.87109 16.996 2.6406 25.32zm624.96-233.04-44.398 213.48c-1.707 8.2109-6.2227 15.57-12.773 20.805-6.5508 5.2383-14.723 8.0234-23.109 7.875h-415.44c-8.2852 0.007812-16.316-2.8398-22.742-8.0664-6.4258-5.2227-10.855-12.504-12.539-20.613l-44.398-213.36c-0.37891-1.8984-0.57812-3.8281-0.60156-5.7617 0-7.4766 2.9727-14.652 8.2578-19.941 5.2891-5.2852 12.465-8.2578 19.941-8.2578h519.6c7.4766 0 14.652 2.9727 19.941 8.2578 5.2852 5.2891 8.2578 12.465 8.2578 19.941 0.18359 1.875 0.18359 3.7656 0 5.6406zm-480-333.84h148.08l67.922 67.922c18.02 17.996 42.453 28.098 67.922 28.078h100.08c12.73 0 24.938 5.0586 33.941 14.059 9 9.0039 14.059 21.211 14.059 33.941v60h-480v-156c0-12.73 5.0586-24.938 14.059-33.941 9.0039-9 21.211-14.059 33.941-14.059z"
      Severity: Major
      Found in components/Cards.tsx and 1 other location - About 3 hrs to fix
      components/Cards.tsx on lines 43..53

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

      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 className={classes.Card}>
              <a href="/metatags/OpenGraph/OG">
                <svg width="50" version="1.1" viewBox="0 0 1200 1200">
                  <path
                    d="m826.2 636-90.84-140.88c24.656-33.539 35.98-75.035 31.785-116.45-4.1953-41.41-23.617-79.793-54.496-107.7-30.883-27.906-71.023-43.359-112.65-43.359s-81.766 15.453-112.65 43.359c-30.879 27.91-50.301 66.293-54.496 107.7-4.1953 41.41 7.1289 82.906 31.785 116.45l-90.84 140.88c-40.352 2.4336-78.473 19.336-107.37 47.605-28.895 28.266-46.629 66.008-49.949 106.29-3.3203 40.289 7.9961 80.422 31.875 113.04s58.719 55.527 98.129 64.535c39.406 9.0078 80.738 3.5 116.42-15.504 35.676-19.008 63.305-50.238 77.812-87.969h118.56c14.508 37.73 42.137 68.961 77.812 87.969 35.68 19.004 77.012 24.512 116.42 15.504 39.41-9.0078 74.25-31.918 98.129-64.535s35.195-72.75 31.875-113.04c-3.3203-40.285-21.055-78.027-49.949-106.29-28.895-28.27-67.016-45.172-107.37-47.605zm-174.24 132h-103.92c-4.8711-21.992-14.117-42.781-27.188-61.129-13.07-18.348-29.699-33.879-48.891-45.672l69.48-108c37.711 14.402 79.406 14.402 117.12 0l69.48 108c-19.191 11.793-35.82 27.324-48.891 45.672-13.07 18.348-22.316 39.137-27.188 61.129zm-51.961-444c19.094 0 37.41 7.5859 50.91 21.09 13.504 13.5 21.09 31.816 21.09 50.91s-7.5859 37.41-21.09 50.91c-13.5 13.504-31.816 21.09-50.91 21.09s-37.41-7.5859-50.91-21.09c-13.504-13.5-21.09-31.816-21.09-50.91s7.5859-37.41 21.09-50.91c13.5-13.504 31.816-21.09 50.91-21.09zm-216 552c-19.094 0-37.41-7.5859-50.91-21.09-13.504-13.5-21.09-31.816-21.09-50.91s7.5859-37.41 21.09-50.91c13.5-13.504 31.816-21.09 50.91-21.09s37.41 7.5859 50.91 21.09c13.504 13.5 21.09 31.816 21.09 50.91s-7.5859 37.41-21.09 50.91c-13.5 13.504-31.816 21.09-50.91 21.09zm432 0c-19.094 0-37.41-7.5859-50.91-21.09-13.504-13.5-21.09-31.816-21.09-50.91s7.5859-37.41 21.09-50.91c13.5-13.504 31.816-21.09 50.91-21.09s37.41 7.5859 50.91 21.09c13.504 13.5 21.09 31.816 21.09 50.91s-7.5859 37.41-21.09 50.91c-13.5 13.504-31.816 21.09-50.91 21.09z"
      Severity: Major
      Found in components/Cards.tsx and 1 other location - About 3 hrs to fix
      components/Cards.tsx on lines 101..111

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

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

      const TextRotator = () => {
        const [currentWordIndex, setCurrentWordIndex] = useState(0);
        const [letters, setLetters] = useState<Letter[]>(
          words[0].split("").map((char) => ({ char, key: Math.random() }))
        );
      Severity: Minor
      Found in components/textRotator.tsx - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language