vj4/ui/pages/problem_main.page.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function buildCategoryFilter has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function buildCategoryFilter() {
  const $container = $('[data-widget-cf-container]');
  if (!$container) {
    return;
  }
Severity: Major
Found in vj4/ui/pages/problem_main.page.js - About 3 hrs to fix

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

    async function updateSelection(sendRequest = true) {
      dirtyCategories.forEach(({ type, category, subcategory }) => {
        let item = categories[category];
        const isSelected = item.select || _.some(item.children, c => c.select);
        setDomSelected(item.$tag, isSelected);
    Severity: Minor
    Found in vj4/ui/pages/problem_main.page.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status