MCPcopy Create free account
hub / github.com/byterocket/c4udit / String

Method String

analyzer/types.go:105–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105func (r Report) String() string {
106 // Build files string.
107 files := "Files analyzed:\n"
108 for _, f := range r.FilesAnalyzed {
109 files += fmt.Sprintf("- %s\n", f)
110 }
111 files += "\n"
112
113 // Build issues string.
114 issues := "Issues found:\n"
115 for i, issue := range r.Issues {
116 // Get findings for issue
117 findings := r.FindingsPerIssue[issue.Identifier]
118
119 // Skip if no findings
120 if len(findings) == 0 {
121 continue
122 }
123
124 // Add findings per issue
125 issues += " " + issue.Identifier + ":\n"
126 for _, finding := range findings {
127 issues += " " + finding.String()
128 }
129
130 // Add newline if not last issue
131 if i+1 != len(r.Issues) {
132 issues += "\n"
133 }
134 }
135
136 return files + issues
137}
138
139func (i Issue) String() string {
140 return i.Identifier

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected