Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy: enforce comment blocks to have an even number of backticks #108726

Merged
merged 6 commits into from
Mar 12, 2023

Commits on Mar 11, 2023

  1. Configuration menu
    Copy the full SHA
    cde0b16 View commit details
    Browse the repository at this point in the history
  2. tidy: enforce comment blocks to have even number of backticks

    Some comments may be formed like:
    
    // This function takes a tuple `(Vec<String>,
    // Box<[u8]>)` and transforms it into `Vec<u8>`.
    
    where the "back-ticked" section wraps around.
    Therefore, we can't make a single-line based
    lint.
    
    We also cannot make the lint paragraph based,
    as it would otherwise complain about inline
    code blocks:
    
    /// ```
    /// use super::Foo;
    ///
    /// fn main() { Foo::new(); }
    /// ```
    
    For the future, one could introduce some checks
    to treat code blocks specially, but such code
    would make the check even more complicated.
    est31 committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    7a686bf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f4cc17 View commit details
    Browse the repository at this point in the history
  4. Add a fixme and address a more non trivial case

    Co-authored-by: nils <48135649+Nilstrieb@users.noreply.github.com>
    est31 and Noratrieb committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    9475717 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3a20d52 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b2aeb07 View commit details
    Browse the repository at this point in the history