kiwitcms/Kiwi

View on GitHub
tcms/static/js/properties.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function displayProperties has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function displayProperties (objectId, objectAttrName, viewMethod, removeMethod) {
    const container = $('#properties-accordion')
    const propertyTemplate = $('#property-fragment')[0].content
    const valueTemplate = $(propertyTemplate).find('template')[0].content
    const shownProperties = []
Severity: Minor
Found in tcms/static/js/properties.js - About 1 hr to fix

    Function propertiesCard has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function propertiesCard (objectId, objectAttrName, viewMethod, addMethod, removeMethod) {
    Severity: Minor
    Found in tcms/static/js/properties.js - About 35 mins to fix

      Function addPropertyValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      export function addPropertyValue (objectId, objectAttrName, viewMethod, addMethod, removeMethod) {
      Severity: Minor
      Found in tcms/static/js/properties.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status