File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 1
- ### (Next)
1
+ ### 1.6.3 (Next)
2
+ - Warn on automatic formatting errors returned for non-config Terraform files.
2
3
3
4
### 1.6.2
4
5
- Refactor auto formatting config options.
Original file line number Diff line number Diff line change @@ -123,14 +123,17 @@ export default {
123
123
124
124
// auto-format the target
125
125
helpers . exec ( atom . config . get ( 'linter-terraform-syntax.terraformExecutablePath' ) , fmtArgs , { cwd : dir } ) . catch ( error => {
126
- // catch format errors and display as pulsar warning
127
- atom . notifications . addWarning (
128
- 'An error occurred during automatic formatting.' ,
129
- {
130
- detail : error . message ,
131
- dismissable : true
132
- }
133
- ) ;
126
+ // verify this is not a config file since validate returns for those files
127
+ if ( ! ( / \. t f $ / . exec ( editorFile ) ) ) {
128
+ // catch format errors and display as pulsar warning
129
+ atom . notifications . addWarning (
130
+ 'An error occurred during automatic formatting.' ,
131
+ {
132
+ detail : error . message ,
133
+ dismissable : true
134
+ }
135
+ ) ;
136
+ }
134
137
} ) ;
135
138
}
136
139
You can’t perform that action at this time.
0 commit comments