MCPcopy
hub / github.com/pyrevitlabs/pyRevit / parse_dotnet_build_output

Function parse_dotnet_build_output

dev/scripts/utils.py:85–100  ·  view source on GitHub ↗

Parse dotnet build output to find the result and error reports

(output)

Source from the content-addressed store, hash-verified

83
84
85def parse_dotnet_build_output(output):
86 """Parse dotnet build output to find the result and error reports"""
87 build_finder = re.compile(r"^Build (success.*|FAIL.*)$")
88 time_finder = re.compile(r"^Time Elapsed (.+)$")
89 capture = False
90 report = ""
91 for oline in output[0].split("\n"):
92 if time_finder.match(oline):
93 break
94 if capture:
95 report += f"{oline}\n"
96 if match := build_finder.match(oline):
97 if "fail" in match.groups()[0].lower():
98 result = False
99 capture = True
100 return output[1] == 0, output[0]
101
102
103def ensure_windows():

Callers

nothing calls this directly

Calls 3

splitMethod · 0.80
compileMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected