EmmaRamirez/Clickopolis

View on GitHub
src/utils/faith.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function faithBonusClick has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function faithBonusClick(playerCiv:Civilization) {
  //playerCiv.faithPM += 30;
  //updateFaithElts();
  let fbs = document.querySelectorAll('.faith-bonus');
  [].forEach.call(fbs, function (item:any) {
Severity: Minor
Found in src/utils/faith.ts - About 1 hr to fix

    Avoid deeply nested control flow statements.
    Open

                  if (playerCiv.faithBonusPantheonTotal >= playerCiv.faithBonusPantheonLimit) {
                    console.log('disability/ability check for religion');
                    disableBonuses(FaithTier.Pantheon);
                    enableBonuses(FaithTier.Organized);
                  }
    Severity: Major
    Found in src/utils/faith.ts - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status