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

cfg_attr based modification of ticks is split into two code chunks #263

Open
drahnr opened this issue Mar 31, 2022 · 1 comment · May be fixed by #264
Open

cfg_attr based modification of ticks is split into two code chunks #263

drahnr opened this issue Mar 31, 2022 · 1 comment · May be fixed by #264
Assignees
Labels
bug Something isn't working

Comments

@drahnr
Copy link
Owner

drahnr commented Mar 31, 2022

Describe the bug

Some code blocks are not ignored as block.

To Reproduce

Steps to reproduce the behaviour:

  1. A file containing
/// # Example
///
#[cfg_attr(unix, doc = "```no_run")]
#[cfg_attr(not(unix), doc = "```ignore")]
/// use std::path::Path;
/// assert_eq!(Path::new("./is_a_directory/").is_dir(), true);
/// ```
  1. Run cargo spellcheck ...
  2. ...

Expected behavior

Ignore the code

Screenshots

Please complete the following information:

  • System: Fedora
  • Obtained: git
  • Version: 0.11.2

Additional context

@drahnr drahnr added the bug Something isn't working label Mar 31, 2022
@drahnr drahnr self-assigned this Mar 31, 2022
@drahnr drahnr changed the title some code blocks are not igored cfg_attr based modification of ticks is split into two code chunks Mar 31, 2022
@drahnr
Copy link
Owner Author

drahnr commented Apr 1, 2022

In rust (a39ac5ae175e0f9f910b1800a430b488ec0f2105) there are a handful of instances of the pattern:

library/std/src/path.rs:    #[cfg_attr(unix, doc = "```no_run")]
library/std/src/path.rs:    #[cfg_attr(not(unix), doc = "```ignore")]
library/std/src/fs.rs:    #[cfg_attr(unix, doc = "```no_run")]
library/std/src/fs.rs:    #[cfg_attr(not(unix), doc = "```ignore")]
library/std/src/os/unix/net/stream.rs:    #[cfg_attr(any(target_os = "android", target_os = "linux"), doc = "```no_run")]
library/std/src/os/unix/net/stream.rs:    #[cfg_attr(not(any(target_os = "android", target_os = "linux")), doc = "```ignore")]
library/std/src/os/unix/net/datagram.rs:    #[cfg_attr(any(target_os = "android", target_os = "linux"), doc = "```no_run")]
library/std/src/os/unix/net/datagram.rs:    #[cfg_attr(not(any(target_os = "android", target_os = "linux")), doc = "```ignore")]
src/tools/clippy/tests/ui/doc/doc-fixable.rs:#[cfg_attr(feature = "a", doc = " ```")]
src/tools/clippy/tests/ui/doc/doc-fixable.rs:#[cfg_attr(not(feature = "a"), doc = " ```ignore")]
src/tools/clippy/tests/ui/doc/doc-fixable.fixed:#[cfg_attr(feature = "a", doc = " ```")]
src/tools/clippy/tests/ui/doc/doc-fixable.fixed:#[cfg_attr(not(feature = "a"), doc = " ```ignore")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant