rajington/serverless-alexa-plugin

View on GitHub

Showing 3 of 3 total issues

Function compileAlexaEvents has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  compileAlexaEvents() {
    if (!this.serverless.service.resources.Resources) {
      throw new this.serverless.classes
        .Error('This plugin needs access to Resources section of the AWS CloudFormation template');
    }
Severity: Minor
Found in src/serverless-alexa-plugin.js - About 1 hr to fix

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

    function testBrowser() {
      // Our testing bundle is made up of our unit tests, which
      // should individually load up pieces of our application.
      // We also include the browser setup file.
      const testFiles = glob.sync('./test/unit/**/*.js');
    Severity: Minor
    Found in gulpfile.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                    if (typeof event.alexaSmartHome !== 'string') {
                      const errorMessage = [
                        `Alexa Smart Home event of function ${functionName} is not a string`,
                        ' The correct syntax requires your skill\'s application ID from the',
                        ' Alexa Developer Console, example:',
      Severity: Major
      Found in src/serverless-alexa-plugin.js - About 45 mins to fix
        Severity
        Category
        Status
        Source
        Language