skip to Main Content

It’s so annoying to see the yellow warnings, how can I disable them?

I couldn’t find the org.eclipse.jdt.core.prefs file as described here. (I’m not using a project)

Is there a particular global setting I can add to the settings.json file? Like this one.

2

Answers


  1. Here is a good article to follow Configure Formatting for Java (VS Code)

    TLDR

    1. Add the Extension Pack for Java (Microsoft)
    2. Go to settings (Bottom left cog icon)
    3. Search for java.format.settings
    4. In the URL options point to your settings file (a .XML file) with your eclipse settings within it.

    enter image description here

    Once you have that configured, you can go back to settings and search for editor.formatOnSave and voila!

    Login or Signup to reply.
  2. do you have an extension like SonarLint installed? If installed, you can choose to extend the disable. If it’s not for the reason for the extension. You can modify "java.import.information.showUnusedImports":false settings by the settings file. You can also choose to disable diagnostics for a specific file. Modify the settings file try to solve:

     "editor.diagnosticIgnoreRequest": true,
        "[java]": {
            "editor.defaultFormatter": null,
            "editor.formatOnSave": false,
            "editor.codeActionsOnSave": {
                "source.fixAll.eslint": false
            }
        }
    

    .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search