Skip to content

Fix doc_markdown DevOps false positive #12995

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

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Fix doc_markdown DevOps false positive #12995

merged 1 commit into from
Jun 27, 2024

Conversation

reillysiemens
Copy link
Contributor

@reillysiemens reillysiemens commented Jun 25, 2024

This fixes an issue where the word "DevOps" ends up as a false positive for the doc_markdown lint.

In a doc comment like this

/// Call the Azure DevOps REST API.
pub fn example() {}

the word "DevOps" is highlighted as something which should be in backticks.

warning: item in documentation is missing backticks
 --> src/lib.rs:1:20
  |
1 | /// Call the Azure DevOps REST API.
  |                    ^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
  = note: requested on the command line with `-W clippy::doc-markdown`
help: try
  |
1 | /// Call the Azure `DevOps` REST API.
  |                    ~~~~~~~~

warning: `example` (lib) generated 1 warning (run `cargo clippy --fix --lib -p example` to apply 1 suggestion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s

This could be overriden with the doc-valid-idents configuration parameter as noted by the documentation, but I believe the word "DevOps" is sufficiently common to belong alongside exceptions like "GitHub" and "GitLab".

changelog: [doc_markdown]: Fix DevOps false positive.

@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @blyxyas (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 25, 2024
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! ❤️

@blyxyas
Copy link
Member

blyxyas commented Jun 26, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jun 26, 2024

📌 Commit e011b19 has been approved by blyxyas

It is now in the queue for this repository.

bors added a commit that referenced this pull request Jun 26, 2024
…sitive, r=blyxyas

Fix doc_markdown DevOps false positive

This fixes an issue where the word "DevOps" ends up as a false positive for the `doc_markdown` lint.

In a doc comment like this
```rust
/// Call the Azure DevOps REST API.
pub fn example() {}
```
the word "DevOps" is highlighted as something which should be in backticks.
```
warning: item in documentation is missing backticks
 --> src/lib.rs:1:20
  |
1 | /// Call the Azure DevOps REST API.
  |                    ^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
  = note: requested on the command line with `-W clippy::doc-markdown`
help: try
  |
1 | /// Call the Azure `DevOps` REST API.
  |                    ~~~~~~~~

warning: `example` (lib) generated 1 warning (run `cargo clippy --fix --lib -p example` to apply 1 suggestion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
```

This could be overriden with the `doc-valid-idents` configuration parameter as noted by the [documentation](https://rust-lang.github.io/rust-clippy/master/index.html#/doc_markdown), but I believe the word "DevOps" is sufficiently common to belong alongside exceptions like "GitHub" and "GitLab".

changelog: [`doc_markdown`]: Fix DevOps false positive.
@bors
Copy link
Contributor

bors commented Jun 26, 2024

⌛ Testing commit e011b19 with merge d4d6bb9...

@bors
Copy link
Contributor

bors commented Jun 26, 2024

💔 Test failed - checks-action_test

@blyxyas
Copy link
Member

blyxyas commented Jun 26, 2024

@reillysiemens Could you run cargo collect-metadata to generate the new documentation? And then squash the new commits?

@reillysiemens
Copy link
Contributor Author

@blyxyas, done!

@blyxyas
Copy link
Member

blyxyas commented Jun 27, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jun 27, 2024

📌 Commit 80b25b4 has been approved by blyxyas

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 27, 2024

⌛ Testing commit 80b25b4 with merge aaaa926...

@bors
Copy link
Contributor

bors commented Jun 27, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: blyxyas
Pushing aaaa926 to master...

@bors bors merged commit aaaa926 into rust-lang:master Jun 27, 2024
11 checks passed
@reillysiemens reillysiemens deleted the fix-doc-markdown-devops-false-positive branch June 28, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants