@@ -13,6 +13,7 @@ describe('ConfigSchema', () => {
1313 "logLevel": "info",
1414 "shellcheckArguments": [],
1515 "shellcheckPath": "shellcheck",
16+ "shfmtPath": "shfmt",
1617 }
1718 ` )
1819 } )
@@ -25,6 +26,7 @@ describe('ConfigSchema', () => {
2526 includeAllWorkspaceSymbols : true ,
2627 shellcheckArguments : ' -e SC2001 -e SC2002 ' ,
2728 shellcheckPath : '' ,
29+ shfmtPath : 'myshfmt' ,
2830 } ) ,
2931 ) . toMatchInlineSnapshot ( `
3032 {
@@ -41,6 +43,7 @@ describe('ConfigSchema', () => {
4143 "SC2002",
4244 ],
4345 "shellcheckPath": "",
46+ "shfmtPath": "myshfmt",
4447 }
4548 ` )
4649 } )
@@ -67,12 +70,14 @@ describe('getConfigFromEnvironmentVariables', () => {
6770 "logLevel": "info",
6871 "shellcheckArguments": [],
6972 "shellcheckPath": "shellcheck",
73+ "shfmtPath": "shfmt",
7074 }
7175 ` )
7276 } )
7377 it ( 'preserves an empty string' , ( ) => {
7478 process . env = {
7579 SHELLCHECK_PATH : '' ,
80+ SHFMT_PATH : '' ,
7681 EXPLAINSHELL_ENDPOINT : '' ,
7782 }
7883 const { config } = getConfigFromEnvironmentVariables ( )
@@ -86,6 +91,7 @@ describe('getConfigFromEnvironmentVariables', () => {
8691 "logLevel": "info",
8792 "shellcheckArguments": [],
8893 "shellcheckPath": "",
94+ "shfmtPath": "",
8995 }
9096 ` )
9197 } )
@@ -94,6 +100,7 @@ describe('getConfigFromEnvironmentVariables', () => {
94100 process . env = {
95101 SHELLCHECK_PATH : '/path/to/shellcheck' ,
96102 SHELLCHECK_ARGUMENTS : '-e SC2001' ,
103+ SHFMT_PATH : '/path/to/shfmt' ,
97104 EXPLAINSHELL_ENDPOINT : 'localhost:8080' ,
98105 GLOB_PATTERN : '*.*' ,
99106 BACKGROUND_ANALYSIS_MAX_FILES : '1' ,
@@ -113,6 +120,7 @@ describe('getConfigFromEnvironmentVariables', () => {
113120 "SC2001",
114121 ],
115122 "shellcheckPath": "/path/to/shellcheck",
123+ "shfmtPath": "/path/to/shfmt",
116124 }
117125 ` )
118126 } )
0 commit comments