about summary refs log tree commit diff
path: root/clippy_lints/src/utils
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-20 23:59:07 +0000
committerbors <bors@rust-lang.org>2023-02-20 23:59:07 +0000
commitb1cf1e7b6acecfdf773dd24c09cb4cf27507481f (patch)
tree4af682816e1539c1698092e6e59b5cbfed129968 /clippy_lints/src/utils
parent574c8aeeb5320a672c4956a8749d577637ad7712 (diff)
parent790f28b1533cbc1aec7ee343b98ea5d570f9928e (diff)
downloadrust-b1cf1e7b6acecfdf773dd24c09cb4cf27507481f.tar.gz
rust-b1cf1e7b6acecfdf773dd24c09cb4cf27507481f.zip
Auto merge of #10303 - pvdrz:pub_crate_missing_docs, r=giraffate
Add configuration to lint missing docs of `pub(crate)` items

Fixes this: https://github.com/rust-lang/rust-clippy/issues/5736#issuecomment-1412442404

TODO:
- [x] Needs docs
- [x] Needs better names
- [x] Should `pub` items be checked to when this new option is enabled? I'm saying no because `missing_docs` already exists

`@flip1995` I'd like to get some input from you :)

---

changelog: Enhancement: [`missing_docs_in_private_items`]: Added new configuration `missing-docs-in-crate-items` to lint on items visible within the current crate. For example, `pub(crate)` items.
[#10303](https://github.com/rust-lang/rust-clippy/pull/10303)
<!-- changelog_checked -->
Diffstat (limited to 'clippy_lints/src/utils')
-rw-r--r--clippy_lints/src/utils/conf.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs
index 1d78c7cfae0..c3c73ac6e37 100644
--- a/clippy_lints/src/utils/conf.rs
+++ b/clippy_lints/src/utils/conf.rs
@@ -454,6 +454,11 @@ define_Conf! {
     /// configuration will cause restriction lints to trigger even
     /// if no suggestion can be made.
     (suppress_restriction_lint_in_const: bool = false),
+    /// Lint: MISSING_DOCS_IN_PRIVATE_ITEMS.
+    ///
+    /// Whether to **only** check for missing documentation in items visible within the current
+    /// crate. For example, `pub(crate)` items.
+    (missing_docs_in_crate_items: bool = false),
 }
 
 /// Search for the configuration file.