Showing 4,177 of 14,709 total issues
Function onAddFile
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onAddFile = async (event, index = null, password) => {
if (event.target?.files?.length) {
const currentFile = event.target.files[0];
const allFiles = props.formData || [];
const addUiOptions = props.uiSchema['ui:options'];
Function CreateFolderModal
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CreateFolderModal = props => {
const {
isCreateNewModalVisible,
setIsCreateNewModalVisible,
onConfirm,
Function ContactInformation
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ContactInformation = () => {
const lastLocation = useLastLocation();
const hasUnsavedEdits = useSelector(
state => state.vapService.hasUnsavedEdits,
Function pdfTransform
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function pdfTransform(formData) {
const {
veteranFullName,
veteranSocialSecurityNumber: ssn,
vaFileNumber,
Function Search
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const Search = ({ onSearch }) => {
const queryParams = new URLSearchParams(window.location.search);
const defaultSelectedOption = deriveDefaultSelectedOption();
- 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 AppointmentDetails
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const AppointmentDetails = props => {
const { router } = props;
const { t } = useTranslation();
const dispatch = useDispatch();
const {
- 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 isLocationOfResidenceRequired
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const isLocationOfResidenceRequired = data => {
const {
contactPreference,
relationshipToVeteran,
selectCategory,
- 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 CustomResolutionOptionReview
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const CustomResolutionOptionReview = props => {
const formData = useSelector(state => state.form.data);
const { selectedDebtsAndCopays = [] } = formData;
const currentDebt = selectedDebtsAndCopays[props.pagePerItemIndex];
- 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 EnhancedVehicleRecord
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const EnhancedVehicleRecord = ({ data, goToPath, setFormData }) => {
const { assets } = data;
const { automobiles = [] } = assets;
const searchIndex = new URLSearchParams(window.location.search);
- 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 CautionaryInformation
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export function CautionaryInformation({ institution, showModal }) {
const {
complaints,
schoolClosing,
schoolClosingOn,
- 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 getCalculatedBenefits
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
(eligibility, institution, form, derived) => {
const calculatedBenefits = {};
if ([eligibility, institution, form, derived].some(e => !e || isEmpty(e))) {
return calculatedBenefits;
- 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 useNotificationSettingsUtils
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const useNotificationSettingsUtils = () => {
const communicationPreferences = useSelector(
state => state?.communicationPreferences,
);
- 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 render
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
onSubmit,
props: {
analyticsSectionName,
Function ConfirmationPage
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ConfirmationPage = props => {
const form = useSelector(state => state.form || {});
const { submission } = form;
const submitDate = submission?.timestamp;
const confirmationNumber = submission?.response?.confirmationNumber;
Function render
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { route } = this.props;
const { formConfig, pageList } = route;
return (
<article className="schemaform-intro">
Function Landing
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Landing = props => {
const { router } = props;
const { t } = useTranslation();
const { jumpToPage } = useFormRouting(router);
Function SubTopicSelectPage
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SubTopicSelectPage = props => {
const { onChange, loggedIn, goBack, formData, topicID, goForward } = props;
const dispatch = useDispatch();
const [apiData, setApiData] = useState([]);
Function VaMedicalCenter
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VaMedicalCenter = props => {
const { formContext, id, onChange, value, veteranFacilityState } = props;
const { reviewMode, submitted } = formContext;
const [facilities, setFacilities] = useState([]);
Function ThreadListSort
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ThreadListSort = props => {
const { sortOrder, sortCallback } = props;
const location = useLocation();
const [sortOrderValue, setSortOrderValue] = useState(sortOrder);
Function ConfirmApprovedPage
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function ConfirmApprovedPage() {
const [confirmedData, setConfirmedData] = useState(0);
// on react component mount, fetch data
useEffect(() => {