Showing 12,848 of 12,848 total issues
Function IntroductionPage
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const IntroductionPage = props => {
const { route, router } = props;
const startForm = useCallback(
() => {
Function formatAddress
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function formatAddress(address) {
/* eslint-disable prefer-template */
const {
country,
postalCode,
Function confirmationPageNextStepsParagraph
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const confirmationPageNextStepsParagraph = formData => {
if (
hasActiveCompensationITF({ formData }) &&
hasActivePensionITF({ formData })
) {
Function VetTec
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VetTec = () => {
useEffect(() => {
recordEvent({
event: 'howToWizard-alert-displayed',
'reason-for-alert': 'help with VET TEC program debt',
Function LandingPageAuth
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const LandingPageAuth = () => {
const dispatch = useDispatch();
const fullState = useSelector(state => state);
const inbox = useSelector(state => state.sm.folders?.folder);
const [prefLink, setPrefLink] = useState('');
Function sendMessage
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const sendMessage = (message, attachments) => async dispatch => {
try {
await createMessage(message, attachments);
dispatch(
addAlert(
Function sortMessages
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
data => {
return data.sort((a, b) => {
if (
[SENT_DATE_DESCENDING.value, DRAFT_DATE_DESCENDING.value].includes(
sortOrder,
Function fetchRequestDetails
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function fetchRequestDetails(id) {
return async (dispatch, getState) => {
try {
const state = getState();
let request = selectAppointmentById(state, id, [
Function updateFacilitySortMethod
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function updateFacilitySortMethod(sortMethod, uiSchema) {
return async (dispatch, getState) => {
let location = null;
const { facilities } = selectCovid19VaccineNewBooking(getState());
const calculatedDistanceFromCurrentLocation = facilities.some(
Function mapStateToProps
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapStateToProps(state) {
const claimsState = state.disability.status;
const claimsV2Root = claimsState.claimsV2; // this is where all the meat is for v2
const services = getBackendServices(state);
Function getPageContent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPageContent() {
const { claim } = this.props;
// Return null if the claim/ claim.attributes dont exist
if (!claimAvailable(claim)) {
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { events, missingEvents } = this.props;
const { expanded } = this.state;
let pastEventsList = [];
if (events.length) {
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (isEmpty(this.props.calculated)) {
return (
<VaLoadingIndicator
data-testid="loading-indicator"
Function RatingsAbout
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RatingsAbout = () => {
return (
<div className="vads-u-padding-top--4 about-ratings">
<div className="mobile-lg:vads-u-font-size--h3 vads-u-padding-bottom--1p5 vads-u-font-weight--bold vads-u-font-family--serif small-screen-font">
About ratings
Function CollapsibleList
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CollapsibleList = () => {
return (
<div id="SupportingFiles-collapsiblePanel">
<div className="input-section">
<div
Function ViewDependentsList
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ViewDependentsList(props) {
let mainContent;
const manageDependentsToggle = props?.manageDependentsToggle ?? null;
if (props.loading) {
mainContent = (
Function generateRows
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const generateRows = signInServiceName => {
const { link, label: buttonText } =
SERVICE_PROVIDERS[signInServiceName] || {};
return [
{
Similar blocks of code found in 10 locations. Consider refactoring. Open
<va-accordion-item header="Auto allowance">
<ul>
<li>
Application for Automobile or Other Conveyance and Adaptive
Equipment (VA Form 21-4502)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 69.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 10 locations. Consider refactoring. Open
<va-accordion-item header="School-age children (ages 18 to 23 and in school)">
<ul>
<li>
Request for Approval of School Attendance (VA Form 21-674)
<br />
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 69.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 10 locations. Consider refactoring. Open
<va-accordion-item header="Accrued benefits">
<ul>
<li>
Application for Accrued Amounts Due a Deceased Beneficiary (VA Form
21P-601)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 69.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76