Reconmap/web-client

View on GitHub

Showing 450 of 450 total issues

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconExtensions = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`puzzle `}>
    <path
        d="M10 3.5a1.5 1.5 0 013 0V4a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-.5a1.5 1.5 0 000 3h.5a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-.5a1.5 1.5 0 00-3 0v.5a1 1 0 01-1 1H6a1 1 0 01-1-1v-3a1 1 0 00-1-1h-.5a1.5 1.5 0 010-3H4a1 1 0 001-1V6a1 1 0 011-1h3a1 1 0 001-1v-.5z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const baseStyle = {
    flex: 1,
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
Severity: Major
Found in src/components/attachments/Dropzone.jsx and 1 other location - About 1 hr to fix
src/components/attachments/ImageDropzone.jsx on lines 6..20

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconChartBar = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`chart-bar `}>
    <path
        d="M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconUserGroup = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`user-group `}>
    <path
        d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconBookOpen = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`book-open `}>
    <path
        d="M9 4.804A7.968 7.968 0 005.5 4c-1.255 0-2.443.29-3.5.804v10A7.969 7.969 0 015.5 14c1.669 0 3.218.51 4.5 1.385A7.962 7.962 0 0114.5 14c1.255 0 2.443.29 3.5.804v-10A7.968 7.968 0 0014.5 4c-1.255 0-2.443.29-3.5.804V12a1 1 0 11-2 0V4.804z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconCube = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling} className={`cube `}>
    <path
        d="M11 17a1 1 0 001.447.894l4-2A1 1 0 0017 15V9.236a1 1 0 00-1.447-.894l-4 2a1 1 0 00-.553.894V17zM15.211 6.276a1 1 0 000-1.788l-4.764-2.382a1 1 0 00-.894 0L4.789 4.488a1 1 0 000 1.788l4.764 2.382a1 1 0 00.894 0l4.764-2.382zM4.447 8.342A1 1 0 003 9.236V15a1 1 0 00.553.894l4 2A1 1 0 009 17v-5.764a1 1 0 00-.553-.894l-4-2z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const baseStyle = {
    flex: 1,
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
Severity: Major
Found in src/components/attachments/ImageDropzone.jsx and 1 other location - About 1 hr to fix
src/components/attachments/Dropzone.jsx on lines 9..23

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconDashboard = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`template `}>
    <path
        d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconCollection = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`collection `}>
    <path
        d="M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 157..160
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

export const IconFolder = ({ styling }) => <svg viewBox="0 0 20 20" fill="currentColor" style={styling}
    className={`folder `}>
    <path d="M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z" />
</svg>
Severity: Major
Found in src/components/ui/Icons.jsx and 9 other locations - About 1 hr to fix
src/components/ui/Icons.jsx on lines 15..19
src/components/ui/Icons.jsx on lines 35..39
src/components/ui/Icons.jsx on lines 49..53
src/components/ui/Icons.jsx on lines 90..94
src/components/ui/Icons.jsx on lines 96..99
src/components/ui/Icons.jsx on lines 188..192
src/components/ui/Icons.jsx on lines 208..211
src/components/ui/Icons.jsx on lines 259..263
src/components/ui/Icons.jsx on lines 271..275

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 73.

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

Further Reading

Function TemplateDetails has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TemplateDetails = () => {
    const navigate = useNavigate();
    const { templateId } = useParams();
    const [template] = useFetch(`/projects/${templateId}`)

Severity: Minor
Found in src/components/projects/templates/Details.jsx - About 1 hr to fix

Function ProjectReport has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ProjectReport = () => {
    const { projectId } = useParams();
    const [project, setProject] = useState(null);

    useEffect(() => {
Severity: Minor
Found in src/components/projects/Report.jsx - About 1 hr to fix

Similar blocks of code found in 5 locations. Consider refactoring.
Open

const VulnerabilityTemplatesRoutes = [
    <Route path={`/vulnerabilities/templates`} element={<VulnerabilityTemplatesList />} />,
    <Route path={`/vulnerabilities/templates/:templateId`} element={<VulnerabilityTemplateDetails />} />
]
Severity: Major
Found in src/components/vulnerabilities/templates/Routes.jsx and 4 other locations - About 1 hr to fix
src/components/projects/templates/Routes.jsx on lines 5..8
src/components/reports/Routes.jsx on lines 5..8
src/components/reports/templates/Routes.jsx on lines 5..8
src/components/target/Routes.jsx on lines 5..8

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 72.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

const ReportsRoutes = [
    <Route path={`/reports`} element={<ReportsList />} />,
    <Route path={`/report/:reportId/send`} element={<SendReport />} />
];
Severity: Major
Found in src/components/reports/Routes.jsx and 4 other locations - About 1 hr to fix
src/components/projects/templates/Routes.jsx on lines 5..8
src/components/reports/templates/Routes.jsx on lines 5..8
src/components/target/Routes.jsx on lines 5..8
src/components/vulnerabilities/templates/Routes.jsx on lines 5..8

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 72.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

const ProjectTemplatesRoutes = [
    <Route path={`/projects/templates`} element={<TemplatesList />} />,
    <Route path={`/projects/templates/:templateId`} element={<TemplateDetails />} />
]
Severity: Major
Found in src/components/projects/templates/Routes.jsx and 4 other locations - About 1 hr to fix
src/components/reports/Routes.jsx on lines 5..8
src/components/reports/templates/Routes.jsx on lines 5..8
src/components/target/Routes.jsx on lines 5..8
src/components/vulnerabilities/templates/Routes.jsx on lines 5..8

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 72.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

const TargetsRoutes = [
    <Route path={`/projects/:projectId/targets/add`} element={<TargetForm />} />,
    <Route path={`/targets/:targetId`} element={<TargetView />} />,
]
Severity: Major
Found in src/components/target/Routes.jsx and 4 other locations - About 1 hr to fix
src/components/projects/templates/Routes.jsx on lines 5..8
src/components/reports/Routes.jsx on lines 5..8
src/components/reports/templates/Routes.jsx on lines 5..8
src/components/vulnerabilities/templates/Routes.jsx on lines 5..8

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 72.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

const ReportTemplatesRoutes = [
    <Route path={`/reports/templates`} element={<ReportTemplatesList />} />,
    <Route path={`/reports/templates/:templateId`} element={<ReportTemplateDetails />} />
]
Severity: Major
Found in src/components/reports/templates/Routes.jsx and 4 other locations - About 1 hr to fix
src/components/projects/templates/Routes.jsx on lines 5..8
src/components/reports/Routes.jsx on lines 5..8
src/components/target/Routes.jsx on lines 5..8
src/components/vulnerabilities/templates/Routes.jsx on lines 5..8

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 72.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        secureApiFetch(url, { method: "GET" })
            .then((resp) => {
                return resp.json();
            })
            .then((data) => {
Severity: Major
Found in src/components/tasks/List.jsx and 1 other location - About 1 hr to fix
src/components/projects/Tasks.jsx on lines 29..35

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 72.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    <th style={{ width: "120px" }}>
                        <DescendingSortLink
                            callback={onSortChange}
                            property="risk"
                        />{" "}
Severity: Major
Found in src/components/vulnerabilities/VulnerabilitiesTable.jsx and 1 other location - About 1 hr to fix
src/components/vulnerabilities/VulnerabilitiesTable.jsx on lines 104..114

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 72.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    <th style={{ width: "120px" }}>
                        <DescendingSortLink
                            callback={onSortChange}
                            property="status"
                        />{" "}
Severity: Major
Found in src/components/vulnerabilities/VulnerabilitiesTable.jsx and 1 other location - About 1 hr to fix
src/components/vulnerabilities/VulnerabilitiesTable.jsx on lines 115..125

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 72.

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

Further Reading

Severity
Category
Status
Source
Language