ActivityWatch/aw-webui

View on GitHub
src/visualizations/sunburst-clock.ts

Summary

Maintainability
B
5 hrs
Test Coverage

Function update has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function update(el: HTMLElement, root_event: IEvent & { children: IEvent[] }) {
  // Basic setup of page elements.
  initializeBreadcrumbTrail();

  el.querySelector('#container').innerHTML = '';
Severity: Major
Found in src/visualizations/sunburst-clock.ts - About 2 hrs to fix

    Function drawLegend has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function drawLegend() {
      // Dimensions of legend item: width, height, spacing, radius of rounded rect.
      const li = {
        w: 75,
        h: 30,
    Severity: Minor
    Found in src/visualizations/sunburst-clock.ts - About 1 hr to fix

      Function create has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function create(el: HTMLElement) {
        // Clear the svg in case we are redrawing
        rootEl = d3.select(el);
        rootEl.selectAll('svg').remove();
      
      
      Severity: Minor
      Found in src/visualizations/sunburst-clock.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status