(w *os.File, f taskcontext.FileEntry, r *lipgloss.Renderer)
| 224 | } |
| 225 | |
| 226 | func printContextFile(w *os.File, f taskcontext.FileEntry, r *lipgloss.Renderer) { |
| 227 | path := f.Path |
| 228 | if !f.Exists { |
| 229 | path += " " + formatWarning("(missing)", r) |
| 230 | } else if f.IsDir { |
| 231 | path += " " + formatDim("(dir)", r) |
| 232 | } else if f.Binary { |
| 233 | path += " " + formatDim("(binary)", r) |
| 234 | } else if f.Generated { |
| 235 | path += " " + formatDim("(generated)", r) |
| 236 | } |
| 237 | if f.Content != "" { |
| 238 | fmt.Fprintf(w, " %s (%d lines)\n", path, f.Lines) |
| 239 | separator := strings.Repeat("\u2500", 49) |
| 240 | fmt.Fprintf(w, " %s\n%s\n %s\n", separator, f.Content, separator) |
| 241 | } else { |
| 242 | fmt.Fprintf(w, " %s\n", path) |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | func printContextDeps(w *os.File, deps []taskcontext.DepEntry, r *lipgloss.Renderer) { |
| 247 | if len(deps) == 0 { |
no test coverage detected