MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

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

const PublishablePositionCard = ({
  data, onEditModeSearch, onSubmit, disableEdit, disableEditDetails,
  additionalCallsLoading, onShowMorePP, hideClassifications }) => {
  // =============== Overview: View Mode ===============

Severity: Minor
Found in src/Components/PublishablePositionCard/PublishablePositionCard.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 ProjectedVacancyCard has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

const ProjectedVacancyCard = (props) => {
  const {
    result,
    updateIncluded,
    updateImport,
Severity: Minor
Found in src/Components/ProjectedVacancyCard/ProjectedVacancyCard.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 TodModal has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

const TodModal = (props) => {
  const {
    cancel,
    submitCustomTod,
  } = props;
Severity: Minor
Found in src/Components/Agenda/AgendaLegFormEdit/TodModal.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 AgendaItemRow has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

const AgendaItemRow = props => {
  const {
    isCreate,
    agenda,
    isCDO,
Severity: Minor
Found in src/Components/Agenda/AgendaItemRow/AgendaItemRow.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 CyclePositionSearch has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

const CyclePositionSearch = ({ isAO, match }) => {
  const dispatch = useDispatch();
  const breadcrumbLinkRole = isAO ? 'ao' : 'bureau';

  const cycleId = match?.params?.id ?? false;

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

  render() {
    const skeletonColors$ = { ...skeletonColors };
    const { showReturnLink } = this.state;
    const { client, isLoading, hasErrored, bidderPortfolioSelectedCDO, style } = this.props;
    const name = client && client.name ? client.name : 'Unknown user';
Severity: Minor
Found in src/Components/ClientHeader/ClientHeader.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 CycleManagement has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

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

  // Redux State
  const userProfile = useSelector(state => state.userProfile);
Severity: Minor
Found in src/Components/CycleManagement/CycleManagement.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 CyclePositionCard has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

const CyclePositionCard = ({ data, onEditModeSearch, isOpen, editableInfo, editableInfoLoading, editableInfoError }) => {
  const dispatch = useDispatch();
  const datePickerRef = useRef(null);

  const postedDate = data?.posted_date_formatted || '--/--/----';
Severity: Minor
Found in src/Components/CyclePositionCard/CyclePositionCard.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 ManagePostAccess has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

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

  // State
  const managePostFilters = useSelector(state => state.managePostFetchFilterData);
Severity: Minor
Found in src/Components/ManagePostAccess/ManagePostAccess.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 render has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const { userName, bidIdUrl, bid, cdoView } = this.props;
    const { condensedView } = this.context;
    const { position_info } = bid;
    const position = get(bid, 'position_info.position');

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

const AgendaItemCard = props => {
  const {
    isCreate,
    agenda,
    isCDO,
Severity: Minor
Found in src/Components/Agenda/AgendaItemCard/AgendaItemCard.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 ManageEntryLevel has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

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

  const userSelections = useSelector(state => state.entryLevelSelections);

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

const BidderPortfolioStatRow = ({ userProfile, showEdit, classifications, viewType }) => {
  const dispatch = useDispatch();
  const showCDOD30 = checkFlag('flags.CDOD30');

  const currentAssignmentText = get(userProfile, 'pos_location');

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

const AgendaItemLegs = props => {
  const {
    legs,
    isCard,
    isPanelMeetingView,
Severity: Minor
Found in src/Components/Agenda/AgendaItemLegs/AgendaItemLegs.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 BidderPortfolioStatCard has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

const BidderPortfolioStatCard = ({ userProfile, showEdit, classifications, viewType }) => {
  const dispatch = useDispatch();
  const showCDOD30 = checkFlag('flags.CDOD30');
  const currentAssignmentText = get(userProfile, 'pos_location');
  const clientClassifications = get(userProfile, 'classifications');

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

const FavoritePositions = props => {
  const [selected, setSelected] = useState(props.navType || TYPE_OPEN);
  const [isLoading, setIsLoading] = useState(false);

  const { favorites, favoritesTandem, favoritesPV,
Severity: Minor
Found in src/Components/FavoritePositions/FavoritePositions.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 PanelAdmin has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

const PanelAdmin = (props) => {
  const usePanelAdminRemarks = () => checkFlag('flags.panel_admin_remarks');
  const usePanelAdminPanelMeeting = () => checkFlag('flags.panel_admin_panel_meeting');
  const usePanelAdminPostPanel = () => checkFlag('flags.panel_admin_post_panel');

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

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

  useEffect(() => {
    dispatch(bidAuditFetchData());
Severity: Minor
Found in src/Components/AdministratorPage/bidAudit/BidAudit.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 PositionClassification has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

const PositionClassification = (props) => {
  const { positionNumber, bureau, posSeqNum, editMode, setEditMode, disableEdit } = 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

Consider simplifying this complex logical expression.
Open

            if (currBureau !== nextBureau) {
              const summaryBody = {
                // the alternative zero is to prevent the value from being falsy
                'Bureau: ': bureauSummary?.bureau_short_desc,
                'Total POS': bureauSummary?.total_pos || '0',
Severity: Critical
Found in src/Components/AdministratorPage/OrgStats/OrgStats.jsx - About 2 hrs to fix
    Severity
    Category
    Status
    Source
    Language