require-blank-line-between-top-level-declarations
WarningWarningWarningWarningSeparate multi-line top-level declarations with a blank line. Single-line declarations and imports can stay grouped.
impl AuthenticationQuery { fn run() {}}#[derive(Default)]pub struct AuthenticationMutation;fn first() { run();}fn second() {}pub mod data;pub mod guard;#[derive(Default)]pub struct AuthenticationQuery;impl AuthenticationQuery { fn run() {}}const MAX_SIZE: u32 = 1920;const MIN_SIZE: u32 = 1;#[derive( Debug, Clone,)]pub enum FileInterface { Document,}export function run() { return 1;}export function stop() {}registerTheme({ name: "dark",});registerLayout({ name: "default",});import { a } from "a";import { b, c,} from "b";import { d } from "d";const first = 1;const second = 2;export function run() { return first;}class First { void run() {}}class Second {}import "package:a/a.dart";class First { void run() {}}class Second {}class First { void run() {}}class Second {}class First { void run() {}}class Second {}How to fix
Separate a multi-line top-level declaration from the next one with a blank line. Groups of single-line declarations and imports can stay together.
The check reads the file's text because the syntax tree omits blank lines. If the file is missing more than one blank line, the report can land on a neighboring declaration.
How to fix
Separate a multi-line top-level declaration from the next one with a blank line. Groups of single-line declarations and imports can stay together.
The check reads the file's text because the syntax tree omits blank lines. If the file is missing more than one blank line, the report can land on a neighboring declaration.
How to fix
Separate a multi-line top-level declaration from the next one with a blank line. Groups of single-line declarations and imports can stay together.
The check reads the file's text because the syntax tree omits blank lines. If the file is missing more than one blank line, the report can land on a neighboring declaration.
How to fix
Separate a multi-line top-level declaration from the next one with a blank line. Groups of single-line declarations and imports can stay together.
The check reads the file's text because the syntax tree omits blank lines. Comments or annotations before the next declaration can affect where a report lands.