diff --git a/README.md b/README.md index 2871892..546d476 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ ## AWS Cfn Lint Atom +Provides IDE specific integration to [cfn-lint](https://github.com/awslabs/cfn-python-lint) ![Preview](cfn-linter.png) -Provides IDE specific integration to cfn-lint. https://github.com/awslabs/cfn-python-lint - ## Requires #### cfn-lint For atom-cfn-lint to work you need to have cfn-lint installed. @@ -11,7 +10,7 @@ For atom-cfn-lint to work you need to have cfn-lint installed. ## Verify Installation #### JSON/YAML Templates -Atom-cfn-lint is coded to work with JSON and YAML files but the goal is to only scan CloudFormation templates. As a result we look for `AWSTemplateFormatVersion` being defined in the file. CloudFormation only requires `Resources` to be defined but this is too generic for assuming that the file is a CloudFormation template. +Atom-cfn-lint will work with JSON and YAML files but the goal is to only scan CloudFormation templates. As a result we look for `AWSTemplateFormatVersion` being defined in the file. CloudFormation only requires `Resources` to be defined but this is too generic for assuming that the file is a CloudFormation template. ##### Example You can use the following example to verify that the installation was successful: @@ -29,6 +28,10 @@ Result (`Type` is marked as an error): See [Templates](spec/fixtures/templates/) for more examples. +## Contribute + +The code for this plugin can be found on GitHub at [awslabs/aws-cfn-lint-atom](https://github.com/awslabs/aws-cfn-lint-atom) + ## License This library is licensed under the Apache 2.0 License. diff --git a/lib/atom-cfn-lint.js b/lib/atom-cfn-lint.js index 4e5223a..74c9850 100644 --- a/lib/atom-cfn-lint.js +++ b/lib/atom-cfn-lint.js @@ -169,15 +169,15 @@ module.exports = { let i if (Array.isArray(this.ignoreRules) && this.ignoreRules.length) { - args = args.concat(['--ignore-checks']) for (i = 0; i < this.ignoreRules.length; i += 1) { + args = args.concat(['--ignore-checks']) args = args.concat([this.ignoreRules[i]]) } } if (Array.isArray(this.appendRules) && this.appendRules.length) { - args = args.concat(['--append-rules']) for (i = 0; i < this.appendRules.length; i += 1) { + args = args.concat(['--append-rules']) args = args.concat([this.appendRules[i]]) } } diff --git a/spec/fixtures/templates/append.yaml b/spec/fixtures/templates/append.yaml index b1c1498..abaa9c1 100644 --- a/spec/fixtures/templates/append.yaml +++ b/spec/fixtures/templates/append.yaml @@ -15,7 +15,7 @@ Parameters: - Test TestEnvironment: Type: String - Default: String + Default: Test Description: Another Environment AllowedValues: - Dev