resource-watch/layer

View on GitHub
app/src/app.js

Summary

Maintainability
B
4 hrs
Test Coverage
B
87%

Function init has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function init() {
    return new Promise((resolve, reject) => {
        async function onDbReady(err) {
            if (err) {
                logger.error('MongoURI', mongoUri);
Severity: Major
Found in app/src/app.js - About 2 hrs to fix

    Function onDbReady has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            async function onDbReady(err) {
                if (err) {
                    logger.error('MongoURI', mongoUri);
                    logger.error(err);
                    reject(new Error(err));
    Severity: Major
    Found in app/src/app.js - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status