objectionary / objectionary/lints

Auto-fix is not present

Open
#556 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

I suggest adding a fix() method to the Defect interface, which will return data about a possible fix for the defect. I propose using a format similar to CodeAction from the LSP protocol. This format supports both simple fixes within a single file and structural changes, such as adding or removing files. By using this format, we can easily integrate the linter into our LSP server. Also, I think it won't be difficult to add support for this data in the eoc

It might make sense to directly include the lsp4j library in our project since it’s lightweight(less than a megabyte) and contains all the necessary classes for working with codeAction

Example usage of lsp4j

CodeAction codeAction = new CodeAction();
codeAction.setEdit(
    new WorkspaceEdit(
        Map.of(
            "./test.txt",
            List.of(
                new TextEdit(
                    new Range(
                        new Position(1, 1),
                        new Position(1, 1)
                    ),
                    "test"
                )
            )
        )
    )
);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Defect interface and inspect how defects are represented and consumed in this repository. Read the linked CodeAction format, then review the eo-vscode server and eoc references to understand the intended integration points. Done means the proposed fix data can represent both single-file edits and structural workspace changes, with the integration boundaries agreed and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.