Skip to content

Commit

Permalink
clean: remove more useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed May 30, 2023
1 parent b435854 commit cfb498e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ function isCallPure (file: string, functionName: string, node: recast.types.name
}
}

if (functionName === 'CommandsRegistry.registerCommand') {
if (file.includes('fileActions.contribution') || file.includes('workspaceCommands')) {
return true
}
}

// Remove Registry.add calls
if (functionName.endsWith('Registry.add')) {
const firstParam = args[0]!
Expand Down Expand Up @@ -237,7 +243,8 @@ function isCallPure (file: string, functionName: string, node: recast.types.name
'SAVE_FILE_COMMAND_ID',
'SAVE_FILE_AS_COMMAND_ID',
'SAVE_ALL_COMMAND_ID',
'openToSideCommand'
'openToSideCommand',
'workbench.action.quickOpen'
].some(text => secondParamCode.includes(text))) {
return true
}
Expand Down

0 comments on commit cfb498e

Please sign in to comment.