Skip to content

create more precise range for implicit web annotation names validation #1411

Closed

Description

@martinlippert

The validation that marks unnecessary name attributes in certain web annotations (like @RequestParam or @PathVariable) underlines the whole annotation section of the code at the moment, creating the impression that the full annotation statement is not necessary, whereas the attribute about the name is the only piece of the annotation that could be removed.

Instead of marking the complete annotation statement, the validation should only mark the name attribute definition.

Example

public Owner findOwner(@PathVariable(name = "ownerId", required = false) Integer ownerId) {
                       |-----------------------------------------------|

whereas the marker should only be positioned below the name = "ownerId":

public Owner findOwner(@PathVariable(name = "ownerId", required = false) Integer ownerId) {
                                     |--------------|

Activity

  1. added
    for: eclipse
    for: vscode
    on Nov 18, 2024
  2. added this to the Backlog milestone on Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetheme: validationtype: enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions