Skip to content

Files

Latest commit

 

History

History
28 lines (20 loc) · 897 Bytes

Style-Encoding.md

File metadata and controls

28 lines (20 loc) · 897 Bytes

Pattern: Malformed source file encoding

Issue: -

Description

This rule checks whether the source file has a UTF-8 encoding comment or not. Setting this check to always and when_needed makes sense only for code that should support Ruby 1.9, since in 2.0+ UTF-8 is the default source file encoding. There are three styles:

when_needed - only enforce an encoding comment if there are non ASCII characters, otherwise report an offense always - enforce encoding comment in all files never - enforce no encoding comment in all files

Default configuration

Attribute Value
EnforcedStyle never
SupportedStyles when_needed, always, never

Further Reading