Skip to content

many-void-attributes:37 suppression not recognized by incorrect-unlint #546

@ErnestMatskevich

Description

@ErnestMatskevich

The suppression of the lint many-void-attributes using a line-specific directive like: many-void-attributes:37 at win32.eo is not recognized by the incorrect-unlint lint checker.

This causes an error during eo-maven-plugin:lint execution when running tests for dataize in eoc project by command npm test -- test/commands/test_dataize.js

At the step dataizes: lang Java, version 0.56.2, tag 0.56.2 The following error occurs:

[ERROR] org.eolang.sys.win32:10 Suppressing "many-void-attributes:37" does not make sense, because there is no lint with that name (incorrect-unlint (Single))

The generated win32.xmir file contains meta:

      <meta line="10">
         <head>unlint</head>
         <tail>many-void-attributes:37</tail>
         <part>many-void-attributes:37</part>
      </meta>

The LtIncorrectUnlint.java contains this code for split tail by ":"

xml.path("/object/metas/meta[head='unlint']")
    .filter(
        u -> !this.names.contains(
            u.element("tail").text().orElse("unknown").split(":", -1)[0]
        )
    )

Expected behaviour

The lint name should be parsed correctly, ignoring the line number suffix during validation. That is:
many-void-attributes:37 → should be recognized as "many-void-attributes"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions