Skip to main content
tally reads .editorconfig for formatting rules that need repository style preferences. Use .editorconfig for shared whitespace and indentation settings, and use .tally.toml for enabling, disabling, or changing the severity of lint rules. This page will collect tally features that integrate with EditorConfig as they are added. Add this section to your repository’s .editorconfig to keep Dockerfiles and Containerfiles consistent:
The pattern matches Dockerfile, Dockerfile.*, Containerfile, and Containerfile.*.

Rules that use EditorConfig

  • tally/prefer-formatted-heredocs formats COPY and ADD heredoc bodies for JSON, YAML, TOML, XML, and INI files, plus shell heredocs from executable RUN heredocs and COPY heredocs with a shell shebang or .sh destination. PowerShell heredocs are formatted through PSScriptAnalyzer and do not use EditorConfig today.
For structured heredoc payloads, tally resolves EditorConfig settings using a virtual filename next to the Dockerfile and the heredoc destination basename. For example, a heredoc in services/api/Dockerfile targeting /etc/app/config.yaml is resolved as services/api/config.yaml, so *.yaml and config.yaml sections apply. COPY shell heredocs use that same destination-basename lookup. For example, a heredoc targeting /usr/local/bin/entrypoint.sh is resolved as entrypoint.sh, so *.sh and entrypoint.sh sections apply. For RUN shell heredocs, tally uses a virtual filename next to the Dockerfile named Dockerfile.heredoc.<dialect>, such as Dockerfile.heredoc.sh, Dockerfile.heredoc.bash, or Dockerfile.heredoc.zsh.

Supported Properties

The heredoc formatter currently reads these EditorConfig properties: Other EditorConfig properties are intentionally not interpreted by the heredoc formatter today: