hybridgroup/cylon-joystick

View on GitHub

Showing 2 of 4 total issues

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

  work: function(my) {
    ["up", "down", "left", "right", "start", "select", "home",
    "ls", "rs", "lb", "rb", "a", "b", "y", "x"].forEach(function(button) {
      my.controller.on(button + ":press", function() {
        console.log("Button " + button + " pressed.");
Severity: Minor
Found in examples/logitech-f310/logitech-f310.js - About 1 hr to fix

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

      work: function(my) {
        ["a", "b", "x", "y"].forEach(function(button) {
          console.log("Registered listener:", button);
    
          my.controller.on(button + ":press", function() {
    Severity: Minor
    Found in examples/xbox360/xbox360.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language