theforeman/foreman

View on GitHub
webpack/assets/javascripts/exportAll.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function generateExports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function generateExports(directoryPath, exportFileContent = '') {
  fs.readdirSync(directoryPath, { withFileTypes: true }).forEach(dirent => {
    if (
      dirent.isDirectory() &&
      dirent.name !== '__mocks__' &&
Severity: Minor
Found in webpack/assets/javascripts/exportAll.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

          if (
            fileExtension === '.js' &&
            !dirent.name.endsWith('.test.js') &&
            !dirent.name.endsWith('.fixtures.js') &&
            !dirent.name.endsWith('mockRequests.js') &&
    Severity: Major
    Found in webpack/assets/javascripts/exportAll.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status