AdamNiederer / AdamNiederer/cov
buffer-local values for `cov-lcov-project-root`
- 主要語言
- Emacs Lisp
- 星號
- 96
- 分支
- 20
- PR 合併指標
- 30 天內沒有已合併 PR
描述
hi there,
#60 introduced `cov-lcov-project-root` as a `defvar`, but I often find myself working in monorepo projects where different sub-packages have different coverage files in different locations. I'd like to open a PR to define `cov-lcov-project-root` as buffer-local but I'm not sure what the best way is to accomplish that.
simply changing `(defvar cov-lcov-project-root)` to `(defvar-local cov-lcov-project-root)` is not sufficient, because parsing of lcov files is done in a temp buffer (in `cov--read-and-parse`) which needs access to that variable in order to map lcov SF paths to files on disk (in `cov--lcov-parse`).
the easiest thing to do would be to modify `cov--read-and-parse` to check the value of `format` and, if eq to `'lcov`, set some additional buffer-local variables. another solution might be to use something like [inheritenv](https://github.com/purcell/inheritenv) to automatically propagate _all_ buffer-local variables from the user's source buffer into the parser's temp buffer. there are probably other solutions too.
I figured I'd ask for advice before opening a PR, so I don't waste your time reviewing code which isn't what you'd prefer in terms of approach, so any input you had here would be welcome.
thanks!
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。