featureparity 0.0.10 → 0.0.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4c131ba204a5f2e3b872551963af559ee1cc2ba941eb192228cd261a12c6f48
4
- data.tar.gz: 4919cdca3946beec35921271be6998938150085879a3b6c9ed4d8cd4c84aa622
3
+ metadata.gz: f3bf1014e57b31bb56a73f768b635114ea15621f81986e0f8e94aded5c32c06b
4
+ data.tar.gz: edc45b069c7cee17cfd382096db52d1a835cbecb3a0af1d19652c4ee242aacef
5
5
  SHA512:
6
- metadata.gz: 8977bbdb59e48dd3d19878858ebc0e5363ec9be1313b8352054f8227e9a84a99c8b3e7343ae74cb034bc96f2f45fc5700656a5218f46db61abcaa5a32f9fa146
7
- data.tar.gz: e37abf6853447467b7b91937f26447d4e2c7b4de5d52bcc3b17ac6c348ce01fbd996e806e0a10add88f04b8c4823af292302a81b6cb81b7eae5b3cb306846caf
6
+ metadata.gz: 87f36cb76299fc104298a23ed41cb9e6ab82e54fa773f88a8808f32758e77f1c9e7373476e8d843bc7ed0fd1df6fbc7471491cec14217c5a41eb7a7d67613843
7
+ data.tar.gz: 73f0e7fc3e58db8acebd37ad645e8a2a0dca300b54db51aa31d84a8d5727726c1e4fc24f40dc69b7d4c57959922d2fbc14d97ad50bf2ca2bbb42eff86010e4ba
@@ -180,6 +180,7 @@ module Fp
180
180
 
181
181
  print_state_counts(summary)
182
182
  print_violations(violations)
183
+ print_orphans(report)
183
184
  print_pending_reviews(report, project_slug)
184
185
  print_unscoped_warning(summary, project_slug)
185
186
  print_verdict(passed, violations, opts)
@@ -227,6 +228,38 @@ module Fp
227
228
  puts
228
229
  end
229
230
 
231
+ # Markers the run carried that bind to no requirement in this project — the test
232
+ # claims to cover something that doesn't exist. FP identifies them; it does not
233
+ # propose the requirement, because a slug and a test name aren't enough to write a
234
+ # good one. Whether this fails the build is the server's call (orphans_violate,
235
+ # true at covered/strict), already folded into `passing` — here we only render it,
236
+ # as a violation when it counts and a note when it doesn't. Only the --junit path
237
+ # has a run to find these in; plain `fp check` reads recorded state and shows none.
238
+ def print_orphans(report)
239
+ orphans = report['orphans'] || []
240
+ return if orphans.empty?
241
+
242
+ violates = report['orphans_violate']
243
+ lead = violates ? "#{orphans.size} orphan marker(s) — a violation at this level:" \
244
+ : "#{orphans.size} orphan marker(s) (not failing the gate at this level):"
245
+ puts lead
246
+ output.table(
247
+ %w[SLUG SURFACE WHERE],
248
+ orphans.map { |o| [o['slug'], o['surface'], marker_location(o)] }
249
+ )
250
+ puts 'These tests are marked fp:<slug> for a requirement that does not exist. ' \
251
+ 'Either propose it (fp propose --slug <slug> ...) or fix the marker\'s slug — ' \
252
+ 'FP will not invent a requirement from a marker.'
253
+ puts
254
+ end
255
+
256
+ def marker_location(orphan)
257
+ file = orphan['source_file']
258
+ return '—' if file.nil? || file.empty?
259
+
260
+ orphan['source_line'] ? "#{file}:#{orphan['source_line']}" : file
261
+ end
262
+
230
263
  # Informational, never a violation: an active requirement naming no surface this
231
264
  # project has can't be satisfied, so it would pass any gate silently. Worth
232
265
  # saying out loud without blocking a merge on someone else's data-entry gap.
data/lib/fp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fp
4
- VERSION = '0.0.10'
4
+ VERSION = '0.0.11'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: featureparity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stowzilla