HomePhabricator

[Lint] Also catch `log!` and `log_chronik!` in .rs files in LogLinter

Description

[Lint] Also catch log! and log_chronik! in .rs files in LogLinter

Summary:
Missing \n at the end of log! and log_chronik! macro invocations in Rust files are now reported by LogLint.

Since string literals in Rust are allowed to contain newline characters, we need to insert a \s into the regex.

Test Plan:

  1. Remove the 4 \n in chronik-http/error.rs
  2. arc lint
  3. 4 errors are emitted

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13556

Details

Provenance
tobias_ruckAuthored on Apr 4 2023, 09:38
tobias_ruckPushed on Apr 4 2023, 13:55
Reviewer
Restricted Project
Differential Revision
D13556: [Lint] Also catch `log!` and `log_chronik!` in .rs files in LogLinter
Parents
rABCad0115891018: [Chronik] Move proto logic from `QueryTxs::tx_by_id` to `make_tx_proto`
Branches
Unknown
Tags
Unknown