gwcuva/gwc-website

View on GitHub

Showing 372 of 372 total issues

Function fetchTeam has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const fetchTeam = async () => {
      const { executiveMembers } = await request(
        process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "",
        `
          { 
Severity: Minor
Found in src/components/Main/Team/Team.tsx - About 1 hr to fix

    Function Newsletter has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    function Newsletter() {
        const emailInput = useRef<HTMLInputElement>(null);
        const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
        const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
        const graphQLClient = new GraphQLClient(endpoint, {
    Severity: Minor
    Found in src/components/GirlsHooHack2023/Newsletter/Newsletter.tsx - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function Newsletter has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    function Newsletter() {
        const emailInput = useRef<HTMLInputElement>(null);
        const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
        const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
        const graphQLClient = new GraphQLClient(endpoint, {
    Severity: Minor
    Found in src/components/GirlsHooHack2022/Newsletter/Newsletter.tsx - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function MobileHeader has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function MobileHeader(props: Props) {
        return(
            <div id={props.id} className="container-fluid bg-turq">
                <meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"></meta>
                <Row>
    Severity: Minor
    Found in src/components/GirlsHooHack2021/Header/MobileHeader.tsx - About 1 hr to fix

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

          <div>
            <Header />
            <BrandIdentity />
            <VerbalIdentity />
            <VisualIdentity />
      Severity: Major
      Found in src/components/Branding/Branding.tsx and 1 other location - About 1 hr to fix
      src/components/CareerFair2022/CareerFair2022.tsx on lines 26..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 66.

      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="overflow-hidden">
              <About />
              <Location />
              <Signup />
              <Schedule />
      Severity: Major
      Found in src/components/CareerFair2022/CareerFair2022.tsx and 1 other location - About 1 hr to fix
      src/components/Branding/Branding.tsx on lines 13..22

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

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

      function Links() {
        const [links, setLinks] = useState([{'title': '', 'link': '', 'id': ''}]);
        
        useEffect(() => {
          const fetchLinks = async () => {
      Severity: Minor
      Found in src/components/Links/Links.tsx - About 1 hr to fix

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

                    {dates.length>0 && <h3 className="text-peach mono font-weight-bold mt-4">{dates[0].dayOfWeek}, {dates[0].month} {dates[0].date}</h3>}
        Severity: Major
        Found in src/components/GirlsHooHack2022/Schedule/Schedule.tsx and 3 other locations - About 1 hr to fix
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 183..183
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 176..176
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 184..184

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

        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

                    {dates.length>1 && <h3 className="text-peach mono font-weight-bold mt-4">{dates[1].dayOfWeek}, {dates[1].month} {dates[1].date}</h3>}
        Severity: Major
        Found in src/components/GirlsHooHack2022/Schedule/Schedule.tsx and 3 other locations - About 1 hr to fix
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 175..175
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 176..176
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 184..184

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

        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

                  {description && <Row>
                    <Col xs={8}>
                    <p>{description.titleQuestion} {description.description}</p>
                    </Col>
                  </Row>}
        Severity: Major
        Found in src/components/GirlsHooHack2023/JumpStart/JumpStart.tsx and 1 other location - About 1 hr to fix
        src/components/GirlsHooHack2022/JumpStart/JumpStart.tsx on lines 97..101

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

        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

                    {dates.length>0 && <h3 className="text-peach mono font-weight-bold mt-4">{dates[0].dayOfWeek}, {dates[0].month} {dates[0].date}</h3>}
        Severity: Major
        Found in src/components/GirlsHooHack2023/Schedule/Schedule.tsx and 3 other locations - About 1 hr to fix
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 175..175
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 183..183
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 184..184

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

        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

                  {description && <Row>
                    <Col xs={8}>
                    <p>{description.titleQuestion} {description.description}</p>
                    </Col>
                  </Row>}
        Severity: Major
        Found in src/components/GirlsHooHack2022/JumpStart/JumpStart.tsx and 1 other location - About 1 hr to fix
        src/components/GirlsHooHack2023/JumpStart/JumpStart.tsx on lines 97..101

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

        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

                    {dates.length>1 && <h3 className="text-peach mono font-weight-bold mt-4">{dates[1].dayOfWeek}, {dates[1].month} {dates[1].date}</h3>}
        Severity: Major
        Found in src/components/GirlsHooHack2023/Schedule/Schedule.tsx and 3 other locations - About 1 hr to fix
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 175..175
        src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 183..183
        src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 176..176

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

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

        function Podcast(props: Props) {
            return (
                <div id={props.id} className="pb-5">
                    <Row className="justify-content-center">
                        <Col lg={6} md={8} sm={10} xs={11}>
        Severity: Minor
        Found in src/components/Main/Podcast/Podcast.tsx - About 1 hr to fix

          Function Header has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function Header(props: Props) {
            return (
              <div id={props.id} className="container-fluid m-0 bg-turq" >
                  
                  <Row xs={12} className="pt-5"></Row>
          Severity: Minor
          Found in src/components/GirlsHooHack2021/Header/Header.tsx - About 1 hr to fix

            Function Schedule has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Schedule() {
              const [workshops, setWorkshops] = useState([{'id': '', 'eventName': '', 'eventDetail': '', 'startTime': '', 'zoomLink': '', 'inPerson': ''}]);
              // const [dropdownOpen, setDropdownOpen] = useState(false);
            
              useEffect(() => {
            Severity: Minor
            Found in src/components/CareerFair2022/Schedule/Schedule.tsx - About 1 hr to fix

              Function SponsorshipProspectus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function SponsorshipProspectus(): JSX.Element {
                const [link, setLink] = useState({'url': ''});//..
              
                useEffect(() => {
                  const fetchLink = async () => {

                Function FAQ has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function FAQ() {
                
                  const [faq, setFaq] = useState([{'question': '', 'answer': ''}]);
                
                  useEffect(() => {
                Severity: Minor
                Found in src/components/GirlsHooHack2022/FAQ/FAQ.tsx - About 1 hr to fix

                  Function SponsorshipProspectus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function SponsorshipProspectus(): JSX.Element {
                    const [link, setLink] = useState({'url': ''});
                  
                    useEffect(() => {
                      const fetchLink = async () => {

                    Function FAQ has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function FAQ() {
                    
                      const [faq, setFaq] = useState([{'question': '', 'answer': ''}]);
                    
                      useEffect(() => {
                    Severity: Minor
                    Found in src/components/GirlsHooHack2023/FAQ/FAQ.tsx - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language