drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar
Apache License 2.0
315 stars 32 forks source link

multiline issues only display the first line #180

Open drahnr opened 3 years ago

drahnr commented 3 years ago

Describe the bug

To Reproduce

Steps to reproduce the behaviour:

  1. A file containing non\n fungible
  2. Run cargo spellcheck ...
  3. ...
error: spellcheck(NlpRules)
   --> /media/supersonic1t/projects/parity/polkadot/xcm/src/v0/multi_asset.rs:82
    |
 82 |  consensus system relative to the context interpreting. Use of a `MultiLocation` ensures that similar but non
    |                                                                                                           ^^^
    | - non-fungible
    |
    |   It appears that a hyphen is missing.

Expected behavior

Show two lines with both segments underlined.

Please complete the following information:

Additional context

drahnr commented 2 years ago

Even more trivial example: The * splits the issue into two segments, but the underline cannot handle that.

error: spellcheck(NlpRules)
    --> /media/supersonic1t/projects/parity/polkadot-bernhard-malus-fx/xcm/src/v1/order.rs:108
     |
 108 |  - `effects`: The orders to execute on the assets once arrived *on the destination location*.
     |                                                        ^^^^^^^^
     | - arrived at
     |
     |   The usual preposition after "arrived" is "at", not "on". Did you mean arrived at?