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

Rust code in doc: false positive #878

Open
vepain opened this issue Apr 20, 2024 · 0 comments
Open

Rust code in doc: false positive #878

vepain opened this issue Apr 20, 2024 · 0 comments
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature

Comments

@vepain
Copy link

vepain commented Apr 20, 2024

First, thank you for your amazing work!

Is your feature request related to a problem? Please describe.
In Rust, you can put code in method-documentation such that this code is checked.
Because this code in markdown format

/// Blabla
///
/// # Examples
///
/// ```
/// # let my_var = 1; // you can hide code lines from doc, there are still checked
/// assert_eq!(my_var, 1);
/// ```
pub fn my_func() { }

ltex will check the code part in the documentation as natural-language, and thus produces false positives.

Describe the solution you'd like

  • The code under markdown code part in Rust documentation should not be checked
  • The comments in codes that are under markdown code part in Rust documentation should be checked

Describe alternatives you've considered
Just ignore markdown code part in Rust documentation, but we will face a false negative issue.

Additional context

@vepain vepain added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature
Projects
None yet
Development

No branches or pull requests

1 participant