Showing 4,231 of 14,884 total issues
Function buildListItems
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function buildListItems({
fileNameMap,
file,
subset,
disableLinks,
- 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 submitRepresentativeReport
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const submitRepresentativeReport = newReport => {
return async dispatch => {
dispatch({
type: REPORT_SUBMITTED,
payload: {
- 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 handleEditPageDisplayTweaks
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const handleEditPageDisplayTweaks = location => {
const navHeader = document.querySelector('#nav-form-header');
const chapterProgress = document.querySelector(
'.schemaform-chapter-progress',
);
- 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 checkExtraConditions
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const checkExtraConditions = (benefit, formData) => {
let result = true;
if (benefit.extraConditions) {
if (benefit.extraConditions.oneIsNotBlank) {
- 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 DependencyVerificationModal
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const DependencyVerificationModal = props => {
const nodeToWatch = document.getElementsByTagName('body')[0];
const [otherModal, setOtherModal] = useState(null);
const openModal = () => {
- 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 HomeAcreageValueInput
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const HomeAcreageValueInput = props => {
const {
goBack,
goForward,
onReviewPage = false,
- 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 ResponseInboxPage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const ResponseInboxPage = ({ router }) => {
const [error, setError] = useState(false);
const [replyTextError, setReplyTextError] = useState('');
const [sendReply, setSendReply] = useState({ reply: '', files: [] });
const [loading, setLoading] = useState(true);
- 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 ResolutionAmount
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const ResolutionAmount = ({ formContext }) => {
const dispatch = useDispatch();
const formData = useSelector(state => state.form.data);
const { selectedDebtsAndCopays = [] } = formData;
- 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 BankruptcyQuestion
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const BankruptcyQuestion = ({
data,
goBack,
goForward,
goToPath,
- 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 EmploymentHistorySummaryCard
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const EmploymentHistorySummaryCard = ({
job,
index,
isSpouse,
formData,
- 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 getEmploymentHistory
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const getEmploymentHistory = ({ questions, personalData }) => {
const { employmentHistory } = personalData;
let history = [];
const defaultObj = {
- 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 NewBookingSection
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function NewBookingSection() {
const match = useRouteMatch();
const location = useLocation();
const dispatch = useDispatch();
const canUseVaccineFlow = useSelector(selectCanUseVaccineFlow);
- 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 useFormState
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function useFormState({
initialSchema,
uiSchema = null,
initialData = {},
dependencies = [],
- 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 ManageFolderButtons
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const ManageFolderButtons = props => {
const { ErrorMessages, Alerts } = Constants;
const dispatch = useDispatch();
const history = useHistory();
const { folder } = props;
- 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 WaitTimeAlert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const WaitTimeAlert = ({
eligibleForRequests,
facilityId,
nextAvailableApptDate,
preferredDate,
- 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 Decision
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const Decision = ({ issues, aoj, ama = true, boardDecision = false }) => {
const allowedIssues = issues
.filter(issue => issue.disposition === 'allowed')
.map((issue, i) => <li key={`allowed-${i}`}>{issue.description}</li>);
const deniedIssues = issues
- 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 Docket
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function Docket({
ahead,
total,
totalAllDockets,
month,
- 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 LocationSearchForm
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function LocationSearchForm({
autocomplete,
dispatchFetchLocationAutocompleteSuggestions,
dispatchFetchSearchByLocationCoords,
dispatchFetchSearchByLocationResults,
- 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 NotificationItem
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const NotificationItem = ({ channelIds, itemName, description, itemId }) => {
const {
profileShowMhvNotificationSettingsEmailAppointmentReminders: aptReminderToggle,
profileShowMhvNotificationSettingsEmailRxShipment: shipmentToggle,
} = useNotificationSettingsUtils().toggles;
- 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 getRecordType
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const getRecordType = record => {
if (record.resourceType === fhirResourceTypes.DIAGNOSTIC_REPORT) {
if (record.code?.text === 'CH') return labTypes.CHEM_HEM;
if (
record.code?.coding?.some(
- 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"