enable doc_markdown lint

This commit is contained in:
Charles Hall 2024-05-21 22:05:41 -07:00
parent c9859a9b2d
commit 5048af3a8f
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 17 additions and 7 deletions

View file

@ -72,7 +72,6 @@ wildcard_dependencies = "warn"
missing_errors_doc = "allow" missing_errors_doc = "allow"
missing_panics_doc = "allow" missing_panics_doc = "allow"
doc_markdown = "allow"
manual_is_variant_and = "allow" manual_is_variant_and = "allow"
mixed_attributes_style = "allow" mixed_attributes_style = "allow"
multiple_bound_locations = "allow" multiple_bound_locations = "allow"

View file

@ -159,7 +159,7 @@ pub(crate) struct KeyValueDatabase {
/// Remember the state hash at events in the past. /// Remember the state hash at events in the past.
pub(super) shorteventid_shortstatehash: Arc<dyn KvTree>, pub(super) shorteventid_shortstatehash: Arc<dyn KvTree>,
/// StateKey = EventType + StateKey, ShortStateKey = Count /// `StateKey = EventType + StateKey`, `ShortStateKey = Count`
pub(super) statekey_shortstatekey: Arc<dyn KvTree>, pub(super) statekey_shortstatekey: Arc<dyn KvTree>,
pub(super) shortstatekey_statekey: Arc<dyn KvTree>, pub(super) shortstatekey_statekey: Arc<dyn KvTree>,
@ -176,16 +176,17 @@ pub(crate) struct KeyValueDatabase {
pub(super) shorteventid_authchain: Arc<dyn KvTree>, pub(super) shorteventid_authchain: Arc<dyn KvTree>,
/// RoomId + EventId -> outlier PDU. /// `RoomId + EventId -> outlier PDU`
///
/// Any pdu that has passed the steps 1-8 in the incoming event /// Any pdu that has passed the steps 1-8 in the incoming event
/// /federation/send/txn. /// /federation/send/txn.
pub(super) eventid_outlierpdu: Arc<dyn KvTree>, pub(super) eventid_outlierpdu: Arc<dyn KvTree>,
pub(super) softfailedeventids: Arc<dyn KvTree>, pub(super) softfailedeventids: Arc<dyn KvTree>,
/// ShortEventId + ShortEventId -> (). /// `ShortEventId + ShortEventId -> ()`
pub(super) tofrom_relation: Arc<dyn KvTree>, pub(super) tofrom_relation: Arc<dyn KvTree>,
/// RoomId + EventId -> Parent PDU EventId. /// `RoomId + EventId -> Parent PDU EventId`
pub(super) referencedevents: Arc<dyn KvTree>, pub(super) referencedevents: Arc<dyn KvTree>,
// Trees "owned" by `self::key_value::account_data` // Trees "owned" by `self::key_value::account_data`

View file

@ -60,6 +60,8 @@ enum AdminCommand {
/// # ``` /// # ```
/// # yaml content here /// # yaml content here
/// # ``` /// # ```
// Allowed because the doc comment gets parsed by our code later
#[allow(clippy::doc_markdown)]
RegisterAppservice, RegisterAppservice,
/// Unregister an appservice using its ID /// Unregister an appservice using its ID
@ -107,6 +109,8 @@ enum AdminCommand {
/// # ``` /// # ```
/// # User list here /// # User list here
/// # ``` /// # ```
// Allowed because the doc comment gets parsed by our code later
#[allow(clippy::doc_markdown)]
DeactivateAll { DeactivateAll {
#[arg(short, long)] #[arg(short, long)]
/// Remove users from their joined rooms /// Remove users from their joined rooms
@ -116,7 +120,7 @@ enum AdminCommand {
force: bool, force: bool,
}, },
/// Get the auth_chain of a PDU /// Get the `auth_chain` of a PDU
GetAuthChain { GetAuthChain {
/// An event ID (the $ character followed by the base64 reference hash) /// An event ID (the $ character followed by the base64 reference hash)
event_id: Box<EventId>, event_id: Box<EventId>,
@ -132,6 +136,8 @@ enum AdminCommand {
/// # ``` /// # ```
/// # PDU json content here /// # PDU json content here
/// # ``` /// # ```
// Allowed because the doc comment gets parsed by our code later
#[allow(clippy::doc_markdown)]
ParsePdu, ParsePdu,
/// Retrieve and print a PDU by ID from the Grapevine database /// Retrieve and print a PDU by ID from the Grapevine database
@ -186,6 +192,8 @@ enum AdminCommand {
/// # ``` /// # ```
/// # json here /// # json here
/// # ``` /// # ```
// Allowed because the doc comment gets parsed by our code later
#[allow(clippy::doc_markdown)]
SignJson, SignJson,
/// Verify json signatures /// Verify json signatures
@ -193,6 +201,8 @@ enum AdminCommand {
/// # ``` /// # ```
/// # json here /// # json here
/// # ``` /// # ```
// Allowed because the doc comment gets parsed by our code later
#[allow(clippy::doc_markdown)]
VerifyJson, VerifyJson,
} }

View file

@ -63,7 +63,7 @@ pub(crate) enum Error {
#[error("{0}")] #[error("{0}")]
BadConfig(&'static str), BadConfig(&'static str),
#[error("{0}")] #[error("{0}")]
/// Don't create this directly. Use Error::bad_database instead. /// Don't create this directly. Use [`Error::bad_database`] instead.
BadDatabase(&'static str), BadDatabase(&'static str),
#[error("uiaa")] #[error("uiaa")]
Uiaa(UiaaInfo), Uiaa(UiaaInfo),