Stanza

wall

A run of 6 or more statements with no blank line, reported and never fixed.

Reports 6 or more consecutive single-line statements with no blank line, reported only where a blank line --fix keeps can split the run.

Example
function bootstrap(options: Options) {
  const config = loadConfig(options.configPath);
  const logger = createLogger(config.logLevel);
  const db = connect(config.databaseUrl);
  const cache = createCache(config.cacheSize);
  const server = createServer(config.port, db, cache);
  server.start();
  logger.info(`listening on ${config.port}`);
}
Findings
2:3 wall

Report only: --check and --fix both print it, neither changes the code. A wall is a run of 6 or more consecutive statements, none of them multi-line, with no separator between any two. Stanza cannot know where the steps are, so it reports the run at its first statement and leaves the split to you. In the example the finding points at the first const. The finding clears once blank lines split the run into pieces of five statements or fewer.

A separator is a blank line the rules keep, a gap that wants a blank line (even before --fix has put it there), or a gap frozen by a directive. A multi-line statement ends the run, so a braceless two line if in the middle of eight statements breaks the wall. Imports and re-exports (export ... from) are not counted and end the run, so a long import list is never a wall. The clause list of a switch is never a wall.

A gap that a join rule keeps closed is not a place to split the run: --fix removes any blank line you put there. The exception is a statement with a comment directly above it. A blank line between that comment and the statement sets the comment apart, --fix keeps it, and so the run can split there. Joined groups of 5 statements or fewer count toward the run like other statements. A joined group of 6 or more ends the surrounding run and is not reported or counted toward another wall, because no kept blank line can break it into pieces of 5 or fewer. This applies even when there is a gap you can split just after the group, such as a final return after six guards.

The six guards below stay joined by guard-chain and do not report wall. The six calls after them still form a wall. Split those calls with a blank line to clear the finding. A run of let declarations that use-join keeps together with a following block follows the same rule.

Joined guards beside a wall
function run(status) {
  if (status === 401) return;
  if (status === 402) return;
  if (status === 403) return;
  if (status === 404) return;
  if (status === 405) return;
  if (status === 406) return;

  console.log(0);
  console.log(1);
  console.log(2);
  console.log(3);
  console.log(4);
  console.log(5);
}
Findings
9:3 wall