看起來好像根本不可能。
關於golint唯一可用的CONFIGS是:
// Run Lint tool on save.
"go.lintOnSave": true,
// Specifies Lint tool name.
"go.lintTool": "golint",
// Flags to pass to Lint tool (e.g. ["-min_confidence=.8"])
"go.lintFlags": [],
也許你可以通過改變雖然這些選項破解這樣的:
// Controls auto save of dirty files. Accepted values: "off", "afterDelay", "onFocusChange" (editor loses focus), "onWindowChange" (window loses focus). If set to "afterDelay", you can configure the delay in "files.autoSaveDelay".
"files.autoSave": "off",
// Controls the delay in ms after which a dirty file is saved automatically. Only applies when "files.autoSave" is set to "afterDelay"
"files.autoSaveDelay": 1000,
您可以設置files.autoSave
到afterDelay
和較低的files.autoSaveDelay
。
如果文件沒有保存,那麼lint應該如何運行? – Flimzy
配置您的編輯器以保存所有擊鍵? – icza