juice-shop/juice-shop

View on GitHub

Showing 141 of 141 total issues

Function customizeApplication has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring.
Open

const customizeApplication = () => {
  if (config.get('application.name')) {
    customizeTitle()
  }
  if (config.get('application.logo')) {
Severity: Minor
Found in lib/startup/customizeApplication.ts - About 25 mins 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

FIXME found
Open

  // @ts-expect-error FIXME type mismatch
Severity: Minor
Found in models/relations.ts by fixme

FIXME found
Open

  xit('infinite loop payload does not succeed but solves "rceChallenge"', () => { // FIXME Started failing on Linux regularly
Severity: Minor
Found in test/server/b2bOrderSpec.ts by fixme

TODO found
Open

        // TODO Verify functionally that it's not the basket of the admin
Severity: Minor
Found in test/cypress/e2e/basket.spec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME some properties missing in updatedUserResponse
Severity: Minor
Found in routes/chatbot.ts by fixme

FIXME found
Open

    slideshowModule = jasmine.createSpy('SlideshowModule') // FIXME Replace with actual import if https://github.com/dockleryxk/ng-simple-slideshow/issues/70 gets fixed

FIXME found
Open

    // FIXME Only works on Chrome <80 but Protractor uses latest Chrome version. Test can probably never be turned on again.
Severity: Minor
Found in test/cypress/e2e/profile.spec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/2faSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME form.getHeaders() is not found
Severity: Minor
Found in test/api/fileUploadSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME form.getHeaders() is not found
Severity: Minor
Found in test/api/metricsApiSpec.ts by fixme

FIXME found
Open

            // @ts-expect-error FIXME form.getHeaders() is not found
Severity: Minor
Found in test/api/profileImageUploadSpec.ts by fixme

FIXME found
Open

  // @ts-expect-error FIXME promise return handling broken
Severity: Minor
Found in test/api/chatBotSpec.ts by fixme

FIXME found
Open

    // @ts-expect-error FIXME implicit any type issue
Severity: Minor
Found in lib/startup/validateConfig.ts by fixme

FIXME found
Open

        os: [ubuntu-latest, macos-latest] # FIXME: Removed "windows-latest" due to 'Error: ENOENT: no such file or directory, open' error breaking at least on Node 20.5.0 constantly
Severity: Minor
Found in .github/workflows/ci.yml by fixme

TODO found
Open

module.exports = function getLanguageList () { // TODO Refactor and extend to also load backend translations from /i18n/*json and calculate joint percentage/gauge
Severity: Minor
Found in routes/languages.ts by fixme
Severity
Category
Status
Source
Language