@jphutchins/code-review 0.1.0-alpha.52 → 0.1.0-alpha.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +359 -110
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/comment.eta +20 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jphutchins/code-review",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"description": "Deterministic commenter for agentic PR review
|
|
3
|
+
"version": "0.1.0-alpha.54",
|
|
4
|
+
"description": "Deterministic commenter for agentic PR review — gather, render, inline, post, adapt, extract, cost, validate, print-schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "JP Hutchins <jp@intercreate.io>",
|
package/templates/comment.eta
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
### 🔗 Systemic problems
|
|
49
49
|
|
|
50
50
|
<% it.systemic.forEach(function(s) { -%>
|
|
51
|
-
#### <%= it.severityEmoji(s.severity) %> (<%= s.severity %>) <%= s.title %> · confidence <%= it.formatConfidence(s.confidence) %>
|
|
51
|
+
#### <%= it.severityEmoji(s.severity) %> (<%= s.severity %>) <%= s.title %><% if (s.code) { %> (<% if (s.code_url) { %>[`<%= s.code %>`](<%~ s.code_url %>)<% } else { %>`<%= s.code %>`<% } %>)<% } %> · confidence <%= it.formatConfidence(s.confidence) %>
|
|
52
52
|
<% const meta = [] %><% if (s.paths && s.paths.length > 0) { meta.push('Affects: ' + s.paths.map(function(p) { return '`' + p + '`' }).join(', ')) } %><% if (s.finding_codes && s.finding_codes.length > 0) { meta.push('Ties together: ' + s.finding_codes.map(function(c) { return '`' + c + '`' }).join(', ')) } %><% if (meta.length > 0) { %>_<%~ meta.join(' · ') %>_<% } %>
|
|
53
53
|
|
|
54
54
|
<%~ s.description %>
|
|
@@ -103,12 +103,16 @@ _<%= it.unanchoredCount %> finding<%= it.unanchoredCount === 1 ? '' : 's' %> bel
|
|
|
103
103
|
<% } %>
|
|
104
104
|
|
|
105
105
|
<% it.strays.forEach(function(f) { -%>
|
|
106
|
-
#### <%= it.severityEmoji(f.severity) %> (<%= f.severity %>) `<%= f.path %>:<%= f.
|
|
106
|
+
#### <%= it.severityEmoji(f.severity) %> (<%= f.severity %>) `<%= f.path %>:<%= f.rangeLabel %><% if (f.side) { %> (<%= f.side %>)<% } %>` — <%= f.title %><% if (f.code) { %> (<% if (f.code_url) { %>[`<%= f.code %>`](<%~ f.code_url %>)<% } else { %>`<%= f.code %>`<% } %>)<% } %> · confidence <%= it.formatConfidence(f.confidence) %> · likelihood <%= it.formatConfidence(f.likelihood) %>
|
|
107
|
+
<% if (f.permalink) { -%>
|
|
108
|
+
|
|
109
|
+
<%~ f.permalink %><% if (f.permalinkAnchored) { %> · _agent-reported location_<% } %>
|
|
110
|
+
<% } -%>
|
|
107
111
|
|
|
108
112
|
<%~ f.description %>
|
|
109
|
-
<% if (f.code && it.sameRootNotes && Object.prototype.hasOwnProperty.call(it.sameRootNotes, f.code)) { -%>
|
|
113
|
+
<% if (f.code && it.sameRootNotes && Object.prototype.hasOwnProperty.call(it.sameRootNotes, (f.codeKey !== undefined ? f.codeKey : f.code))) { -%>
|
|
110
114
|
|
|
111
|
-
> ⚠️ <%~ it.sameRootNotes[f.code] %>
|
|
115
|
+
> ⚠️ <%~ it.sameRootNotes[(f.codeKey !== undefined ? f.codeKey : f.code)] %>
|
|
112
116
|
<% } -%>
|
|
113
117
|
<% if (f.answeredNote) { -%>
|
|
114
118
|
|
|
@@ -146,8 +150,19 @@ _<%= it.unanchoredCount %> finding<%= it.unanchoredCount === 1 ? '' : 's' %> bel
|
|
|
146
150
|
> <details><summary>🔇 <%= it.suppressedNits.length %> nit<%= it.suppressedNits.length === 1 ? '' : 's' %> below the visibility floor (confidence × likelihood < <%= it.nitVisibilityFloor %>) — hidden</summary>
|
|
147
151
|
>
|
|
148
152
|
<% it.suppressedNits.forEach(function(n) { -%>
|
|
149
|
-
> - `<%= n.path %>:<%= n.startLine %>` — <%= n.title %><% if (n.code) { %> (`<%= n.code %>`)<% } %> _(m = <%= n.m %>)_
|
|
153
|
+
> - `<%= n.path %>:<%= n.startLine %>` — <%= n.title %><% if (n.code) { %> (<% if (n.codeUrl) { %>[`<%= n.code %>`](<%~ n.codeUrl %>)<% } else { %>`<%= n.code %>`<% } %>)<% } %> _(m = <%= n.m %>)_
|
|
154
|
+
> <%~ '<!-- code-review:suppressed-nit' %>
|
|
155
|
+
> <%~ 'severity: ' + n.severity %>
|
|
156
|
+
> <%~ 'location: ' + n.path + ':' + n.startLine + '-' + n.endLine + (n.side ? ' (' + n.side + ')' : '') %>
|
|
157
|
+
> <%~ 'confidence: ' + n.confidence + ' \u00b7 likelihood: ' + n.likelihood %>
|
|
158
|
+
<% n.carried.forEach(function(cl) { -%>
|
|
159
|
+
> <%~ cl %>
|
|
150
160
|
<% }) -%>
|
|
161
|
+
> <%~ '-->' %>
|
|
162
|
+
<% }) -%>
|
|
163
|
+
<% if (it.carriedDroppedNits > 0) { -%>
|
|
164
|
+
> <%~ '<!-- code-review:suppressed-nit ' + it.carriedDroppedNits + ' nit(s) dropped from the sticky — their findings are in the artifact -->' %>
|
|
165
|
+
<% } -%>
|
|
151
166
|
>
|
|
152
167
|
> </details>
|
|
153
168
|
<% } %>
|