Geovation/photos

View on GitHub
scripts/populateDemoData.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function run has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function run(num, storage, location) {
  console.log(`Will upload ${num} photos to ${storage} in ${location}`);

  admin.initializeApp({
    credential: admin.credential.cert(serviceAccount),
Severity: Minor
Found in scripts/populateDemoData.js - About 1 hr to fix

    Function uploadPhoto has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    async function uploadPhoto(image, tmpFilePath, id, location, i, num, fontWhite, fontBlack, maxWidth, maxHeight) {
    Severity: Major
    Found in scripts/populateDemoData.js - About 1 hr to fix

      Function addMetaDataSync has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      async function addMetaDataSync(id, locationName) {
        const published = Math.random() <= publishedProbability ? true : null;
      
        let location;
        if (LOCATIONS[locationName].center) {
      Severity: Minor
      Found in scripts/populateDemoData.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status