@jphutchins/code-review 0.1.0-alpha.52 → 0.1.0-alpha.53
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 +286 -98
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/comment.eta +16 -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.53",
|
|
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,12 @@ _<%= 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.start_line %><% if (f.start_line !== f.end_line) { %>–<%= f.end_line %><% } %>` — <%= f.title %> · confidence <%= it.formatConfidence(f.confidence) %> · likelihood <%= it.formatConfidence(f.likelihood) %>
|
|
106
|
+
#### <%= it.severityEmoji(f.severity) %> (<%= f.severity %>) `<%= f.path %>:<%= f.start_line %><% if (f.start_line !== f.end_line) { %>–<%= f.end_line %><% } %><% 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
107
|
|
|
108
108
|
<%~ f.description %>
|
|
109
|
-
<% if (f.code && it.sameRootNotes && Object.prototype.hasOwnProperty.call(it.sameRootNotes, f.code)) { -%>
|
|
109
|
+
<% if (f.code && it.sameRootNotes && Object.prototype.hasOwnProperty.call(it.sameRootNotes, (f.codeKey !== undefined ? f.codeKey : f.code))) { -%>
|
|
110
110
|
|
|
111
|
-
> ⚠️ <%~ it.sameRootNotes[f.code] %>
|
|
111
|
+
> ⚠️ <%~ it.sameRootNotes[(f.codeKey !== undefined ? f.codeKey : f.code)] %>
|
|
112
112
|
<% } -%>
|
|
113
113
|
<% if (f.answeredNote) { -%>
|
|
114
114
|
|
|
@@ -146,8 +146,19 @@ _<%= it.unanchoredCount %> finding<%= it.unanchoredCount === 1 ? '' : 's' %> bel
|
|
|
146
146
|
> <details><summary>🔇 <%= it.suppressedNits.length %> nit<%= it.suppressedNits.length === 1 ? '' : 's' %> below the visibility floor (confidence × likelihood < <%= it.nitVisibilityFloor %>) — hidden</summary>
|
|
147
147
|
>
|
|
148
148
|
<% it.suppressedNits.forEach(function(n) { -%>
|
|
149
|
-
> - `<%= n.path %>:<%= n.startLine %>` — <%= n.title %><% if (n.code) { %> (`<%= n.code %>`)<% } %> _(m = <%= n.m %>)_
|
|
149
|
+
> - `<%= n.path %>:<%= n.startLine %>` — <%= n.title %><% if (n.code) { %> (<% if (n.codeUrl) { %>[`<%= n.code %>`](<%~ n.codeUrl %>)<% } else { %>`<%= n.code %>`<% } %>)<% } %> _(m = <%= n.m %>)_
|
|
150
|
+
> <%~ '<!-- code-review:suppressed-nit' %>
|
|
151
|
+
> <%~ 'severity: ' + n.severity %>
|
|
152
|
+
> <%~ 'location: ' + n.path + ':' + n.startLine + '-' + n.endLine + (n.side ? ' (' + n.side + ')' : '') %>
|
|
153
|
+
> <%~ 'confidence: ' + n.confidence + ' \u00b7 likelihood: ' + n.likelihood %>
|
|
154
|
+
<% n.carried.forEach(function(cl) { -%>
|
|
155
|
+
> <%~ cl %>
|
|
150
156
|
<% }) -%>
|
|
157
|
+
> <%~ '-->' %>
|
|
158
|
+
<% }) -%>
|
|
159
|
+
<% if (it.carriedDroppedNits > 0) { -%>
|
|
160
|
+
> <%~ '<!-- code-review:suppressed-nit ' + it.carriedDroppedNits + ' nit(s) dropped from the sticky — their findings are in the artifact -->' %>
|
|
161
|
+
<% } -%>
|
|
151
162
|
>
|
|
152
163
|
> </details>
|
|
153
164
|
<% } %>
|