Skip to contentSlop Block

require-blank-line-between-documented-members

Warning

Separate struct fields, enum variants and class fields that have doc comments with blank lines.

pub struct Environment {Separate documented members with blank lines	/// Database URL	pub database_url: String,	/// Port	pub port: u16,}
// ast-grep-ignore: require-blank-line-between-documented-members-rust

How to fix

When a struct field or enum variant has a doc comment, leave a blank line between the comment and the preceding member. Undocumented members can stay together.

The report points at the containing block because the syntax tree has no blank lines.