# no-empty-static-block

Disallow empty static and compile-time initialization blocks

An uncommented empty static or compile-time block performs no initialization.
Instead, you SHOULD remove the block or explain why it is intentionally empty with a comment.

- Category: style
- Level: warning
- Fix: automatic
- Scope: module

## Reported

```ds title="main.ds"
class Registry {
    static {}
    value(): int32 {
        return 1;
    }
}
```

## Accepted

```ds title="main.ds"
class Registry {
    value(): int32 {
        return 1;
    }
}
```

## Prior art

- [ESLint · no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)

[language/linter/src/rules/style/no_empty_static_block.rs:7](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/no_empty_static_block.rs#L7)
