MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

Function AgendaLegFormEdit has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
Open

const AgendaLegFormEdit = props => {
  const {
    AIvalidation,
    isEf, // check if leg is first leg (effective leg)
    leg,
Severity: Minor
Found in src/Components/Agenda/AgendaLegFormEdit/AgendaLegFormEdit.jsx - About 1 day 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 AssignmentCycleEdit has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
Open

const AssignmentCycleEdit = ({ isAO, match }) => {
  const dispatch = useDispatch();

  const userProfile = useSelector(state => state.userProfile);
  const isSuperUser = userHasPermissions(['superuser'], userProfile?.permission_groups);
Severity: Minor
Found in src/Components/CycleManagement/AssignmentCycleEdit.jsx - About 1 day 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 AvailableBidderRow has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
Open

const AvailableBidderRow = (props) => {
  const { bidder, internalViewToggle, isLoading, isAO, isPost,
    isInternalCDA, bureaus, sort } = props;

  useCloseSwalOnUnmount();

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 AgendaItemMaintenancePane has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
Open

const AgendaItemMaintenancePane = (props) => {
  const useAgendaItemMaintenanceCreate = () => checkFlag('flags.agenda_item_maintenance_create');

  const dispatch = useDispatch();

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 PanelMeetingAdmin has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
Open

const PanelMeetingAdmin = (props) => {
  const { history, panelMeetingsResults, panelMeetingsIsLoading, pmSeqNum } = props;
  const isCreate = !pmSeqNum;

  const dispatch = useDispatch();
Severity: Minor
Found in src/Components/AdministratorPage/PanelAdmin/PanelMeetingAdmin.jsx - About 7 hrs 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 NotificationCard has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

const NotificationCard = (props) => {
  const { note, onCancel, memo } = props;

  const dispatch = useDispatch();

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 PanelMeetingAgendas has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

const PanelMeetingAgendas = (props) => {
  const { isCDO, location } = props;

  const panelMeetings = location.state?.panelMeetings || [];
  const pmSeqNums = panelMeetings.map(pm => pm.pmi_pm_seq_num);
Severity: Minor
Found in src/Components/Panel/PanelMeetingAgendas/PanelMeetingAgendas.jsx - About 6 hrs 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 AvailableBidderTable has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

const AvailableBidderTable = props => {
  const { isInternalCDA, isAO, isPost } = props;

  // Local state
  // Toggle view state within Internal CDA version

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

Consider simplifying this complex logical expression.
Open

    if (editMode) {
      setValues({
        location: result?.location,
        status: result?.status,
        tod: result?.tod,

    Function BidAuditGrade has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    const BidAuditGrade = (props) => {
      const dispatch = useDispatch();
    
      const routeCycleID = props?.match.params.cycleId;
      const routeAuditID = props?.match.params.auditId;
    Severity: Minor
    Found in src/Components/AdministratorPage/bidAudit/BidAuditGrade.jsx - About 5 hrs 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 AgendaItemResearchPane has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    const AgendaItemResearchPane = forwardRef((props = { perdet: '', clientData: {}, updateSelection: '', userSelection: [], legCount: 0, readMode: true }, ref) => {
      const navTabRef = useRef();
      const dispatch = useDispatch();
    
      const { perdet, clientData, userSelections, updateSelection, legCount,

    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 PanelMeetingSearch has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

    const PanelMeetingSearch = ({ isCDO }) => {
      const dispatch = useDispatch();
    
      const showAddPanelMeeting = usePanelAdmin() && usePanelAdminPanelMeeting();
    
    
    Severity: Minor
    Found in src/Components/Panel/PanelMeetingSearch/PanelMeetingSearch.jsx - About 5 hrs 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 EmployeeAgendaSearch has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    const EmployeeAgendaSearch = ({ isCDO, viewType }) => {
      const searchLastNameRef = useRef();
      const searchFirstNameRef = useRef();
      const searchEmpIDRef = useRef();
    
    
    Severity: Minor
    Found in src/Components/Agenda/EmployeeAgendaSearch/EmployeeAgendaSearch.jsx - About 4 hrs 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 Separation has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    const Separation = (props) => {
      const {
        perdet,
        data,
        isNew,
    Severity: Minor
    Found in src/Components/AssignmentsSeparations/Separation/Separation.jsx - About 4 hrs 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 Assignment has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    const Assignment = (props) => {
      const {
        perdet,
        data,
        isNew,
    Severity: Minor
    Found in src/Components/AssignmentsSeparations/Assignment/Assignment.jsx - About 4 hrs 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 PositionExpandableContent has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    const PositionExpandableContent = ({
      sections, form, appendAdditionalFieldsToBodyPrimary, tempHideEdit,
      showLoadingAnimation, onShowMore, isCondensed, saveText, useCancelModal }) => {
      const handleEdit = form?.handleEdit ?? {};
      const { editMode, setEditMode, disableEdit } = handleEdit;

    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 EditHandshake has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    const EditHandshake = props => {
      const { submitAction, handshake, infoOnly, submitText, bidCycle } = props;
      const { hs_date_expiration, hs_date_offered, hs_status_code } = handshake;
      const currentlyOffered = hs_status_code === 'handshake_offered';
    
    
    Severity: Minor
    Found in src/Components/Handshake/EditHandshake/EditHandshake.jsx - About 4 hrs 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 BiddingToolCard has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    const BiddingToolCard = (props) => {
      const { id, location: routeLocation } = props;
      const isCreate = id === 'new';
    
      const rootLocation = () => {

    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 EditBidder has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    const EditBidder = (props) => {
      const { name, sections, submitAction, bureaus, details } = props;
      const [status, setStatus] = useState(details.status);
      const [note, setNote] = useState(sections.notes);
      const [ocReason, setOCReason] = useState(details.ocReason);
    Severity: Minor
    Found in src/Components/AvailableBidder/EditBidder/EditBidder.jsx - About 4 hrs 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 BureauExceptionsCard has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

    const BureauExceptionsCard = ({ userData, onEditModeSearch, disableEdit,
      refBureaus, refBureausHasErrored, refBureausIsLoading }) => {
      const {
        userBureauCodes,
        pvId,

    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

    Severity
    Category
    Status
    Source
    Language