@@ -13,7 +13,13 @@ describe('ConfigSchema', () => {
1313 "logLevel": "info",
1414 "shellcheckArguments": [],
1515 "shellcheckPath": "shellcheck",
16- "shfmtPath": "shfmt",
16+ "shfmt": {
17+ "binaryNextLine": false,
18+ "caseIndent": false,
19+ "funcNextLine": false,
20+ "path": "shfmt",
21+ "spaceRedirects": false,
22+ },
1723 }
1824 ` )
1925 } )
@@ -26,7 +32,13 @@ describe('ConfigSchema', () => {
2632 includeAllWorkspaceSymbols : true ,
2733 shellcheckArguments : ' -e SC2001 -e SC2002 ' ,
2834 shellcheckPath : '' ,
29- shfmtPath : 'myshfmt' ,
35+ shfmt : {
36+ binaryNextLine : true ,
37+ caseIndent : true ,
38+ funcNextLine : true ,
39+ path : 'myshfmt' ,
40+ spaceRedirects : true ,
41+ } ,
3042 } ) ,
3143 ) . toMatchInlineSnapshot ( `
3244 {
@@ -43,7 +55,13 @@ describe('ConfigSchema', () => {
4355 "SC2002",
4456 ],
4557 "shellcheckPath": "",
46- "shfmtPath": "myshfmt",
58+ "shfmt": {
59+ "binaryNextLine": true,
60+ "caseIndent": true,
61+ "funcNextLine": true,
62+ "path": "myshfmt",
63+ "spaceRedirects": true,
64+ },
4765 }
4866 ` )
4967 } )
@@ -70,7 +88,13 @@ describe('getConfigFromEnvironmentVariables', () => {
7088 "logLevel": "info",
7189 "shellcheckArguments": [],
7290 "shellcheckPath": "shellcheck",
73- "shfmtPath": "shfmt",
91+ "shfmt": {
92+ "binaryNextLine": false,
93+ "caseIndent": false,
94+ "funcNextLine": false,
95+ "path": "shfmt",
96+ "spaceRedirects": false,
97+ },
7498 }
7599 ` )
76100 } )
@@ -91,7 +115,13 @@ describe('getConfigFromEnvironmentVariables', () => {
91115 "logLevel": "info",
92116 "shellcheckArguments": [],
93117 "shellcheckPath": "",
94- "shfmtPath": "",
118+ "shfmt": {
119+ "binaryNextLine": false,
120+ "caseIndent": false,
121+ "funcNextLine": false,
122+ "path": "",
123+ "spaceRedirects": false,
124+ },
95125 }
96126 ` )
97127 } )
@@ -101,6 +131,7 @@ describe('getConfigFromEnvironmentVariables', () => {
101131 SHELLCHECK_PATH : '/path/to/shellcheck' ,
102132 SHELLCHECK_ARGUMENTS : '-e SC2001' ,
103133 SHFMT_PATH : '/path/to/shfmt' ,
134+ SHFMT_CASE_INDENT : 'true' ,
104135 EXPLAINSHELL_ENDPOINT : 'localhost:8080' ,
105136 GLOB_PATTERN : '*.*' ,
106137 BACKGROUND_ANALYSIS_MAX_FILES : '1' ,
@@ -120,7 +151,13 @@ describe('getConfigFromEnvironmentVariables', () => {
120151 "SC2001",
121152 ],
122153 "shellcheckPath": "/path/to/shellcheck",
123- "shfmtPath": "/path/to/shfmt",
154+ "shfmt": {
155+ "binaryNextLine": false,
156+ "caseIndent": true,
157+ "funcNextLine": false,
158+ "path": "/path/to/shfmt",
159+ "spaceRedirects": false,
160+ },
124161 }
125162 ` )
126163 } )
0 commit comments