Showing 113 of 372 total issues
Function Schedule
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Schedule() {
const [events, setEvents] = useState([{'eventName': '', 'link': '', 'startTime': '', 'description': '', 'day': 0, 'linkText': '', 'endTime':''}]);
const [dates, setDates] = useState([{'dayOfWeek': '', 'month': '', 'date': 0}]);
const [open1, setOpen1] = useState(false);
Function Schedule
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Schedule() {
const [events, setEvents] = useState([{'eventName': '', 'link': '', 'startTime': '', 'description': '', 'day': 0, 'linkText': '', 'endTime':''}]);
const [dates, setDates] = useState([{'dayOfWeek': '', 'month': '', 'date': 0}]);
const [open1, setOpen1] = useState(false);
Function Sponsors
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
useEffect(() => {
Function JumpStart
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function JumpStart() {
const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': '', 'link': '', 'linkName': ''}]);
const [description, setDescription] = useState({'titleQuestion': '', 'description': ''});
const [dropdownOpen, setDropdownOpen] = useState(false);
Function JumpStart
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function JumpStart() {
const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': '', 'link': '', 'linkName': ''}]);
const [description, setDescription] = useState({'titleQuestion': '', 'description': ''});
const [dropdownOpen, setDropdownOpen] = useState(false);
Function Sponsors
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
/*return (
<Row className={`bg-hack-grey justify-content-center py-5`}>
<Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
<h2 className="text-orange hack">Companies Attending</h2>
Function Sponsors
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
useEffect(() => {
Function MobileNavbarGHHs
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MobileNavbarGHHs() {
const [menuOpen, setMenuOpen] = useState(false);
const menuClosedHandler = () => {
Function Sponsors
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
/*return (
<Row className={`bg-hack-grey justify-content-center py-5`}>
<Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
<h2 className="text-orange hack">Companies Attending</h2>
Function MobileNavbarGHHs
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MobileNavbarGHHs() {
const [menuOpen, setMenuOpen] = useState(false);
const menuClosedHandler = () => {
Function Sponsors
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
/*return (
<Row className={`bg-hack-grey justify-content-center py-5`}>
<Col sm={10} xs={11} className={isMobile ? "my-3" : "my-5 py-5"}>
<h2 className="text-orange hack">Companies Attending</h2>
Function Schedule
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Schedule() {
// const [events, setEvents] = useState([{'id': '', 'eventName': '', 'link': '', 'time': '', 'description': ''}]);
// const [dates, setDates] = useState(['']);
const [open1, setOpen1] = useState(false);
Function JumpStart
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function JumpStart() {
const [workshops, setWorkshops] = useState([{'id': '', 'workshopName': '', 'workshopDate': '', 'description': ''}]);
const [dropdownOpen, setDropdownOpen] = useState(false);
useEffect(() => {
Function Sponsors
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sponsors() {
const [sponsors, setSponsors] = useState([{'level': '', 'sponsorImage': {'url': ''}, 'sponsorName': '', 'sponsorUrl': '', 'size': ''}]);
useEffect(() => {
Function Footer
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}
Function Footer
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}
Function Footer
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}
Function Team
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Team(props: Props) {
const [team, setTeam] = useState([{'id': '', 'name': '', 'position': '', 'academicYear': '', 'headshot': {'url': ''}, 'linkedin': ''}]);
const [academicYear, setAcademicYear] = useState('');
const [boardYears, setBoardYears] = useState(['']);
Function Footer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}
- Read upRead up
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 Footer
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Footer() {
return (
<div className="bg-peacock">
<Row className={`${isMobile ? "footerLogoMobile" : "footerLogoDesktop"} position-absolute`}>
<img src={whiteLogo}