MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

Function GET_PROFILE_MENU has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

export const GET_PROFILE_MENU = () => MenuConfig([
  {
    text: 'Profile',
    icon: 'user',
    toggleMenuSection: true,
Severity: Minor
Found in src/Constants/Menu.js - 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 ProjectedVacancy has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

const ProjectedVacancy = ({ viewType }) => {
  const dispatch = useDispatch();

  const userProfile = useSelector(state => state.userProfile);
  const isAo = userHasPermissions(['ao_user'], userProfile?.permission_groups);
Severity: Minor
Found in src/Components/BureauPage/ProjectedVacancy/ProjectedVacancy.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 PublishablePositions has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

const PublishablePositions = ({ viewType }) => {
  const dispatch = useDispatch();
  const searchPosNumRef = useRef();

  const dataHasErrored = useSelector(state => state.publishablePositionsHasErrored);
Severity: Minor
Found in src/Components/PublishablePositions/PublishablePositions.jsx - About 3 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 PositionManager has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

const PositionManager = props => {
  // Props
  const {
    bureauPermissions,
    bureauFilters,
Severity: Minor
Found in src/Components/BureauPage/PositionManager/PositionManager.jsx - About 3 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 BidAuditCategory has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

const BidAuditCategory = (props) => {
  const dispatch = useDispatch();

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

const HandshakeAnimation = ({ isBidTracker, isRibbon, isBidder, shortName }) => {
  const [animate, setAnimate] = useState(false);
  const [allowAnimate, setAllowAnimate] = useState(true);

  const animateHands = () => {
Severity: Minor
Found in src/Components/BidTracker/BidStep/HandshakeAnimation.jsx - About 3 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 BidAuditData has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

const BidAuditData = (props) => {
  const dispatch = useDispatch();

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

const AgendaItemMaintenanceContainer = (props) => {
  const dispatch = useDispatch();
  const researchPaneRef = useRef();

  // Route parameters

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

  render() {
    const options = {};
    const {
      id,
      result,
Severity: Minor
Found in src/Components/ResultsCard/ResultsCard.jsx - About 3 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 EmployeeAgendaSearchRow has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

const EmployeeAgendaSearchRow = ({ isCDO, result, viewType }) => {
  const showAgendaItemHistory = useAgendaItemHistory();
  const showAgendaItemMaintenance = useAgendaItemMaintenance();
  const showAgendaItemMaintenanceCreate = useAgendaItemMaintenanceCreate();
  const showPanelMeetingsAgendas = usePanelMeetingsAgendas();

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

const OverlayAlert = ({ bid, submitBid, userId, registerHandshake,
  unregisterHandshake, useCDOView, isCollapsible, userName, togglePanelAlert },
{ condensedView, readOnly }) => {
  const CLASS_PENDING = 'bid-tracker-overlay-alert--pending';
  const CLASS_CLOSED = 'bid-tracker-overlay-alert--closed';
Severity: Minor
Found in src/Components/BidTracker/OverlayAlert/OverlayAlert.jsx - About 3 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 AssignmentsSeparations has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

const AssignmentsSeparations = (props) => {
  const location = props.location?.pathname;
  const params = location.split('/');
  const viewType = params[2];

Severity: Minor
Found in src/Components/AssignmentsSeparations/AssignmentsSeparations.jsx - About 3 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 JobCategories has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

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

  const jobCategories = useSelector(state => state.jobCategoriesAdminFetchData);
  const jobCategoriesAdminFetchDataIsLoading = useSelector(
Severity: Minor
Found in src/Components/AdministratorPage/JobCategories/JobCategories.jsx - About 3 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 PostPanelProcessing has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

const PostPanelProcessing = (props) => {
  const { pmSeqNum } = props;

  const dispatch = useDispatch();

Severity: Minor
Found in src/Components/AdministratorPage/PanelAdmin/PostPanelProcessing.jsx - About 3 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 EditRemark has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

const EditRemark = (props) => {
  const {
    rmrkCategories,
    dispatch,
    category,
Severity: Minor
Found in src/Components/AdministratorPage/EditRemark/EditRemark.jsx - About 3 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

Consider simplifying this complex logical expression.
Open

    if (editMode) {
      setDisableOtherEdits(editMode);
      setStatus(details?.ASGS_CODE || 'EF'); // Default to "Effective"
      setAction(details?.LAT_CODE || '');
      setTED(details?.ASGD_ETD_TED_DATE || '');
Severity: Critical
Found in src/Components/AssignmentsSeparations/Assignment/Assignment.jsx - About 3 hrs to fix

    Function CycleJobCategories has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    const CycleJobCategories = () => {
      const dispatch = useDispatch();
    
      // ========== Data Retrieval ==========
    
    

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

      render() {
        const { bids, bidsIsLoading, filtersSelected, filters, id, isLocked,
          hasBureauPermission, bidCycle } = this.props;
        const { hasLoaded, shortListVisible, unrankedVisible } = this.state;
    
    

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

    const SearchPostAccess = () => {
      const dispatch = useDispatch();
    
      // State
      const userSelections = useSelector(state => state.searchPostAccessSelections);
    Severity: Minor
    Found in src/Components/BureauPage/SearchPostAccess/SearchPostAccess.jsx - About 2 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 EmployeeAgendaSearchCard has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    const EmployeeAgendaSearchCard = ({ isCDO, result, viewType }) => {
      const showAgendaItemHistory = useAgendaItemHistory();
      const showAgendaItemMaintenance = useAgendaItemMaintenance();
      const showAgendaItemMaintenanceCreate = useAgendaItemMaintenanceCreate();
      const showPanelMeetingsAgendas = usePanelMeetingsAgendas();

    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