Skip to content

Files

Latest commit

 

History

History
49 lines (36 loc) · 841 Bytes

Naming-HeredocDelimiterCase.md

File metadata and controls

49 lines (36 loc) · 841 Bytes

Pattern: Invalid heredoc delimiter case

Issue: -

Description

This rule checks that your heredocs are using the configured case. By default it is configured to enforce uppercase heredocs.

Examples

# EnforcedStyle: uppercase (default)

# good
<<-SQL
  SELECT * FROM foo
SQL

# bad
<<-sql
  SELECT * FROM foo
sql
# EnforcedStyle: lowercase

# good
<<-sql
  SELECT * FROM foo
sql

# bad
<<-SQL
  SELECT * FROM foo
SQL

Default configuration

Attribute Value
EnforcedStyle uppercase
SupportedStyles lowercase, uppercase

Further Reading