• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / modo / 12978042620

26 Jan 2025 08:23PM CUT coverage: 65.241% (+3.1%) from 62.103%
12978042620

Pull #123

github

web-flow
Merge 32c19e408 into 39fbafe7b
Pull Request #123: Unit tests for formatter

19 of 26 new or added lines in 5 files covered. (73.08%)

1 existing line in 1 file now uncovered.

1098 of 1683 relevant lines covered (65.24%)

30.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

39.13
/format/plain.go
1
package format
2

3
import (
4
        "path"
5

6
        "github.com/mlange-42/modo/document"
7
)
8

9
type Plain struct{}
10

11
func (f *Plain) Accepts(files []string) error {
×
12
        return nil
×
13
}
×
14

15
func (f *Plain) Render(docs *document.Docs, config *document.Config, subdir string) error {
×
16
        return document.Render(docs, config, f, subdir)
×
17
}
×
18

19
func (f *Plain) ProcessMarkdown(element any, text string, proc *document.Processor) (string, error) {
×
20
        return text, nil
×
21
}
×
22

23
func (f *Plain) WriteAuxiliary(p *document.Package, dir string, proc *document.Processor) error {
×
24
        return nil
×
25
}
×
26

27
func (f *Plain) ToFilePath(p string, kind string) string {
6✔
28
        if kind == "package" || kind == "module" {
10✔
29
                return path.Join(p, "_index.md")
4✔
30
        }
4✔
31
        if len(p) == 0 {
2✔
NEW
32
                return p
×
33
        }
×
34
        return p + ".md"
2✔
35
}
36

37
func (f *Plain) ToLinkPath(p string, kind string) string {
3✔
38
        return f.ToFilePath(p, kind)
3✔
39
}
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc