Skip to content

additional_code_points for invisible_character is logically unsound as documented #6672

@rgoldberg

Description

@rgoldberg

New Issue Checklist

Bug Description

additional_code_points for invisible_character is logically unsound as documented.

Does additional_code_points contain additional code points beyond a baseline, or all the code points?

If the former, then, from the description, its default should be []; if the latter, then it should be renamed code_points.

Overall, code_points is more flexible, even if the current functionality is actually for additional code points.

If switching naming and/or functionality to code_points, documentation should become:

Disallows characters specified in `code_points` in string literals (which should be replaced by escapes).

By default, `code_points` contains the following invisible characters, as they can cause hard-to-debug issues: zero-width space (U+200B), zero-width non-joiner (U+200C), and FEFF formatting character (U+FEFF).

Environment

  • SwiftLint version 0.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionTopics that cannot be categorized as bugs or enhancements yet. They require further discussions.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions