MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

Function MonthYearInput has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

const MonthYearInput = ({ value, onChange }) => {
  const [inputValue, setInputValue] = useState('');
  const [isError, setIsError] = useState(false);

  const formatMonthYear = (date) => {
Severity: Minor
Found in src/Components/MonthYearInput/MonthYearInput.jsx - 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 AgendaItemHistory has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

const AgendaItemHistory = (props) => {
  const sorts = AGENDA_ITEM_HISTORY_FILTERS;
  const perdet = get(props, 'match.params.id');
  const isCDO = get(props, 'isCDO');
  const viewType = get(props, 'viewType');
Severity: Minor
Found in src/Components/Agenda/AgendaItemHistory/AgendaItemHistory.jsx - 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 render has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const { cycle } = this.props;
    const { data, date, date$, editActive, isLoading, hasErrored, hasUpdated } = this.state;

    const cycle$$ = {
Severity: Minor
Found in src/Components/BidCycleList/BidCycleCard/BidCycleCard.jsx - 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 NewAssignmentCycle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

const NewAssignmentCycle = (props) => {
  const { onSave } = props;

  const [assignmentCycle, setAssignmentCycle] = useState('');
  const [cycleCategory, setCycleCategory] = useState('');
Severity: Minor
Found in src/Components/CycleManagement/NewAssignmentCycle.jsx - 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 ManageBidSeasons has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

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

  const ManageBidSeasonsDataLoading = useSelector(state => state.bidSeasonsFetchDataLoading);
  const ManageBidSeasonsData = useSelector(state => state.bidSeasons);

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

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

  // ================= DATA RETRIEVAL =================
  const userSelections = useSelector(state => state.orgStatsSelections);
Severity: Minor
Found in src/Components/AdministratorPage/OrgStats/OrgStats.jsx - 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 BidStepIcon has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

const BidStepIcon = ({ isComplete, needsAction, isCurrent, number,
  hasRescheduledTooltip, tooltipTitle, tooltipText,
  handshakeRegisterWithAnotherBidder}, { condensedView }) => (
    <span className={isComplete ? 'icon-complete' : 'icon-incomplete'}>
    { !isComplete
Severity: Minor
Found in src/Components/BidTracker/BidStep/BidStepIcon/BidStepIcon.jsx - 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 HandshakeStatus has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

const HandshakeStatus = props => {
  const [handshake, setHandshake] = useState(props.handshake);

  useEffect(() => {
    setHandshake(props.handshake);
Severity: Minor
Found in src/Components/Handshake/HandshakeStatus/HandshakeStatus.jsx - 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 HandshakeBureauButton has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

const HandshakeBureauButton = props => {
  const { positionID, personID, bidCycle, positionHasHsReg } = props;
  const [handshake, setHandshake] = useState(props.handshake);
  const [activePerdet, setActivePerdet] = useState(props.activePerdet);

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 13 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const { isProjectedVacancy, isTandemSearch } = this.context;
    const { fetchPostAutocomplete, postSearchResults, filters } = this.props;
    const { showTandem2 } = 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 ChecklistModal has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

const ChecklistModal = props => {
  const {
    checkList, submitBtnText, cancelBtnText,
    onSubmit, rowDivider, titleDivider, onCheck,
  } = props;
Severity: Minor
Found in src/Components/Handshake/ChecklistModal/ChecklistModal.jsx - 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 CycleClassifications has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

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

  useEffect(() => {
    dispatch(cycleClassificationsFetchData());
Severity: Minor
Found in src/Components/CycleManagement/CycleClassifications.jsx - 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 formatVice has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

export const formatVice = (viceObj) => {
  const first = viceObj?.emp_first_name;
  const last = viceObj?.emp_last_name;
  const vice = (first || last)
    ? `${first ? `${first} ` : ''}${last || ''}`
Severity: Minor
Found in src/Components/Agenda/Constants.js - 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 renderSelectionList has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

export const renderSelectionList = ({ items, selected, ...rest }) => {
  let codeOrText = 'code';
  if (items?.[0]?.text) codeOrText = 'text';
  // only Item Actions/Statuses need to use 'desc_text'
  if (items?.[0]?.desc_text) codeOrText = 'desc_text';
Severity: Minor
Found in src/utilities.js - 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 render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const { bid, isUnregister, userName } = this.props;
    const { readOnly } = this.context;
    const position = get(bid, 'position_info.position');
    const positionTitle = get(position, 'title') || NO_POSITION_TITLE;

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 (isNew) {
    /* eslint-disable quote-props */
    sections.subheading = [
      { 'Position Number': pos_results?.pos_num_text || NO_POSITION_NUMBER },
      { 'Position Title': pos_results?.pos_title_desc || NO_POSITION_TITLE },
Severity: Critical
Found in src/Components/AssignmentsSeparations/Assignment/Assignment.jsx - About 1 hr to fix

    Function BiddingTool has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const BiddingTool = (props) => {
      const id = props.match?.params?.id ?? false;
      const location = props.location?.pathname;
    
      const appendedLocation = () => {
    Severity: Minor
    Found in src/Components/BiddingFunctionsPage/BiddingTool/BiddingTool.jsx - 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 Languages has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const Languages = props => {
      const { languagesArray, useWrapper, showHeader } = props;
      const languagesArray$ = languagesArray || [];
    
      const getTestDate = (langObj) => {
    Severity: Minor
    Found in src/Components/ProfileDashboard/Languages/Languages.jsx - 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 render has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

      render() {
        const { bid, acceptBid, condensedView, declineBid, priorityExists, submitBid, deleteBid,
          registerHandshake, showBidCount, userProfile, useCDOView, userId,
          unregisterHandshake, showRibbons, isCollapsible } = this.props;
        // determine whether we render an alert on top of the card
    Severity: Minor
    Found in src/Components/BidTracker/BidTrackerCard/BidTrackerCard.jsx - 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 Classifications has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const Classifications = props => {
      const {
        classifications,
        clientClassifications,
        updateUserClassifications,
    Severity: Minor
    Found in src/Components/ProfileDashboard/Classifications/Classifications.jsx - 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

    Severity
    Category
    Status
    Source
    Language