Skip to content

New Check: IllegalSymbol to forbit emoj in code #18065

@romani

Description

@romani

AI generates unicode emoj in code comments
example:

// ✅ Enhancement 1: Basic validation

this also raised by other users to address this at #17983 (reply in thread)

Potential soluton:

    <module name="RegexpSingleline">
        <property name="format" value="\u2705" />
        <property name="message" value="Unicode emoj symbols should not be used." />
    </module>

use https://www.mauvecloud.net/charsets/CharCodeFinder.html in mode "Hexadecimal Character Codes" to get code.

To make it easier to search and collaborate to extend to all other Unicode pictures, we can put this as example https://checkstyle.org/checks/regexp/regexpsingleline.html#Examples so it will part of git files and user can contribute to make list to cover most

Website sources are part of main repository https://github.com/checkstyle/checkstyle/blob/master/src/site/xdoc/checks/regexp/regexpsingleline.xml.template

We need to put in https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle-checks.xml config that violates majority of unicode emoj symbols, try to find in web or AI list of them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions