oddbit/sonosjs

View on GitHub

Showing 23 of 46 total issues

Function fromXml has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        lastChange.fromXml = function (xmlString, callback) {
            // Everything below the LastChange tag is URL encoded and the meta data is encoded twice
            xmlString = xml.decode(xmlString);
            var xmlParser = xml.parser();

Severity: Minor
Found in src/models/state.js - About 1 hr to fix

Function fromData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        httpHeader.fromData = function (data) {
            var dataParts = (data || "")
                .trim()
                .replace(/\r\n/g, "\n") // Normalize line endings
                .split("\n\n"); // Separate header from body
Severity: Minor
Found in src/net/http/header.js - About 1 hr to fix

Function start has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            that.start = function (devices) {
                devices = devices || [];
                if (!net.socket.isSupported()) {
                    console.error("No socket support. Can not run Sonos controller.");
                    return;
Severity: Minor
Found in src/sonosController.js - About 1 hr to fix
Severity
Category
Status
Source
Language