Skip to content

A pasted reading in docs/lifecycle.md names two line numbers the file does not answer #387

Description

@iderex

docs/lifecycle.md pastes a reading over
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs and names two line
numbers the file does not answer. Read at origin/master
6d37f70c11f0a666babbd5efabe081532dffb42d.

What the document pastes:

git show origin/master:docs/lifecycle.md | sed -n '135,137p'
    git grep -n 'AddHostedService' -- Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs
    Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:50:        serviceCollection.AddHostedService<ConfigurationAtStartup>();
    Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:160:        serviceCollection.AddHostedService<StoreAtStartup>();

What the command answers:

git grep -n 'AddHostedService' -- Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:52:        serviceCollection.AddHostedService<ConfigurationAtStartup>();
Jellyfin.Plugin.ServerPairing/PluginServiceRegistrator.cs:264:        serviceCollection.AddHostedService<StoreAtStartup>();

Two lines out by two and by a hundred and four. Both were already wrong before
the change that moved the second of them by four; at 4f5cd66, the mainline
before that change, the file answered 52 and 260.

Why nothing caught it

reading-check.sh declares this case out of its walk, on its own line, rather
than missing it:

git grep -n 'is outside this walk' -- .github/reading-check.sh
.github/reading-check.sh:55:# hash - is outside this walk; those are the same claim read a different way,

The readings it judges are the ones naming origin/master, because it
substitutes the commit under judgement for that word and substitutes it back out
of the output. This block names a working tree instead, so there is nothing for
it to substitute and the block is skipped. That is the same limit 9c8dedd
repaired three instances of by hand, and this is a fourth.

What the population is

Every line in tracked markdown of the shape path:line:content, carrying no
origin/master: prefix and naming a tracked file, compared against that file's
line at 6d37f70:

reproduce: 6
do not reproduce: 2

The two are the block above. That count is a floor and not the class. It sees
only pastes in that one shape, so a working-tree reading pasted as anything else

  • a sed -n window, a file listing, a count - is outside it, and this issue does
    not claim there are two such readings in the tree, only that this shape yields
    two.

Done when

  • the two line numbers in docs/lifecycle.md are what the command answers
  • the block says which reading it is, so a later reader can tell whether the
    check judges it, or the block is rewritten to name origin/master so that it
    is judged

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions