Page MenuHomePhabricator

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

Authored by tobias_ruck on Apr 4 2023, 09:41.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fix regex to catch false negatives

This revision is now accepted and ready to land.Apr 4 2023, 13:51
tobias_ruck edited the test plan for this revision. (Show Details)
tobias_ruck retitled this revision from [Lint] Also catch `log!` and `log_chronik!` in .rs files to LogLinter to [Lint] Also catch `log!` and `log_chronik!` in .rs files in LogLinter.