Support passing `--srcdir` to goimports
未关闭
enhancement
- 主要语言
- Vim Script
- 星标
- 1.1k
- 派生
- 102
- PR 合并指标
- 30 天内没有已合并 PR
描述
When using goimports via our gofmt formatter as [suggested in the docs](https://github.com/google/vim-codefmt/blob/1025977/doc/codefmt.txt#L42), the goimports path-based inference doesn't work because we don't tell goimports about the path. It does support a `--srcdir` argument we could pass.
We'd have to make it conditional and detect `basename(gofmt_executable) == 'goimports'` or something like that because gofmt doesn't support any `--srcdir` arg.
贡献指南
调研方向
从 doc/codefmt.txt 中描述的 gofmt 格式化器用法开始,跟踪 gofmt_executable 的调用方式。检查 goimports 的路径推断行为和 --srcdir 选项;完成标准是仅向 goimports 传递该参数,而 gofmt 继续在不带该参数的情况下运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, vim
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100