drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replacements are off with new correct_lines impl

drahnr opened this issue · comments

Describe the bug

--- a/node/subsystem-util/src/lib.rs
+++ b/node/subsystem-util/src/lib.rs
@@ -462,7 +462,7 @@ pub mod metrics {
                /// Try to register metrics in the Prometheus registry.
                fn try_register(registry: &prometheus::Registry) -> Result<Self, prometheus::PrometheusError>;
 
-           /// Convience method to register metrics in the optional Prometheus registry.
+         /// Convenience method to register metrics in the optional Prometheus registry.
                /// If the registration fails, prints a warning and returns `Default::default()`.
                fn register(registry: Option<&prometheus::Registry>) -> Self {
                        registry.map(|r| {

should not mess with indentation.

To Reproduce

Steps to reproduce the behaviour:

  1. cargo run -- fix ./parity/polkadot/node/subsystem-util/src/lib.rs
  2. Add custom fixes or pick suggested ones
  3. Go through with it till the end.
  4. Observe the git diff

Expected behavior

Properly aligned replacements.

Pplease complete the following information:

  • System: Fedora 32 x86_64
  • Obtained: git
  • Version: 92421f81

Additional context

Merge of #118 seems to be related here.

Unreproducible, seems to be related to a screwed up remote terminal eating some whitespace chars or interpreting them differently 🤷‍♂️

Feel free to re-open.