File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ For example if there is an image subfolder under your extension project workspac
1212
1313## Requirements
1414
15- Requires cfn-lint to be installed. ` pip install cfn-lint `
15+ Requires cfn-lint to be installed: ` pip install cfn-lint `
16+
17+ More information about cfn-lint can be found [ here] ( https://github.com/awslabs/cfn-python-lint )
1618
1719## Extension Settings
1820
1921* ` cfnLint.path ` : path to the cfn-lint command
2022* ` cfnLint.appendRules ` : Array of paths containing additional Rules
2123* ` cfnLint.ignoreRules ` : Array of Rule Ids to be ignored
22- * ` cfnLint.overrideSpecPath ` : Path to an Specification overrule file
24+ * ` cfnLint.overrideSpecPath ` : Path to an Specification overrule file
Original file line number Diff line number Diff line change @@ -165,6 +165,21 @@ function validateCloudFormationFile(document: TextDocument): void {
165165 let start = 0 ;
166166 let end = Number . MAX_VALUE ;
167167
168+ child . on ( 'error' , function ( err ) {
169+ let errorMessage = `Unable to start cfn-lint (${ err } ). Is cfn-lint installed correctly?` ;
170+ connection . console . log ( errorMessage ) ;
171+ let lineNumber = 0 ;
172+ let diagnostic : Diagnostic = {
173+ range : {
174+ start : { line : lineNumber , character : start } ,
175+ end : { line : lineNumber , character : end }
176+ } ,
177+ severity : DiagnosticSeverity . Error ,
178+ message : errorMessage
179+ } ;
180+ diagnostics . push ( diagnostic ) ;
181+ } ) ;
182+
168183 child . stderr . on ( "data" , ( data : Buffer ) => {
169184 let err = data . toString ( ) ;
170185 connection . console . log ( err ) ;
You can’t perform that action at this time.
0 commit comments