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

UiPath / uipathcli / 12435334590

20 Dec 2024 04:56PM UTC coverage: 90.349% (-0.04%) from 90.385%
12435334590

push

github

thschmitt
Add support for studio projects with target framework windows

37 of 47 new or added lines in 4 files covered. (78.72%)

44 existing lines in 4 files now uncovered.

4924 of 5450 relevant lines covered (90.35%)

1.01 hits per line

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

68.0
/plugin/studio/studio_project_reader.go
1
package studio
2

3
import (
4
        "encoding/json"
5
        "fmt"
6
        "io"
7
        "os"
8
        "strings"
9
)
10

11
type studioProjectReader struct {
12
        Path string
13
}
14

15
func (p studioProjectReader) GetTargetFramework() TargetFramework {
1✔
16
        project, _ := p.ReadMetadata()
1✔
17
        if strings.EqualFold(project.TargetFramework, "windows") {
1✔
NEW
18
                return TargetFrameworkWindows
×
NEW
19
        }
×
20
        return TargetFrameworkCrossPlatform
1✔
21
}
22

23
func (p studioProjectReader) ReadMetadata() (studioProjectJson, error) {
1✔
24
        file, err := os.Open(p.Path)
1✔
25
        if err != nil {
1✔
NEW
26
                return studioProjectJson{}, fmt.Errorf("Error reading %s file: %v", defaultProjectJson, err)
×
NEW
27
        }
×
28
        defer file.Close()
1✔
29
        byteValue, err := io.ReadAll(file)
1✔
30
        if err != nil {
1✔
NEW
31
                return studioProjectJson{}, fmt.Errorf("Error reading %s file: %v", defaultProjectJson, err)
×
NEW
32
        }
×
33

34
        var project studioProjectJson
1✔
35
        err = json.Unmarshal(byteValue, &project)
1✔
36
        if err != nil {
1✔
NEW
37
                return studioProjectJson{}, fmt.Errorf("Error parsing %s file: %v", defaultProjectJson, err)
×
NEW
38
        }
×
39
        return project, nil
1✔
40
}
41

42
func newStudioProjectReader(path string) *studioProjectReader {
1✔
43
        return &studioProjectReader{path}
1✔
44
}
1✔
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

© 2026 Coveralls, Inc