Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Rubocop/Linting problems aren't removed for closed files #262

Closed

Description

@jbeker

Your environment

  • vscode-ruby version: 0.16.1
  • Ruby version: ruby 2.4.0p0
  • VS Code version: Version 1.20.0 (1.20.0)
  • Operating System: 10.13.3 (17D47)
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

  • When a ruby file has warnings/errors listed in the Problems tab and I close the file, the section in Problems for that file goes away

Actual behavior

  • Problems are still listed in Problems pane for closed files

Steps to reproduce the problem

  • Enable rubocop/ruby warnings
  • open a file with errors (make sure errors are listed in problems tab)
  • close the file
  • Errors will still be displayed in problem pane

Activity

  1. wingrunr21 commented on Feb 9, 2018

    @wingrunr21
    Collaborator

    Is this the same as #238?

  2. jbeker commented on Feb 9, 2018

    @jbeker
    Author

    No, it is not the same. This has nothing to do with fixing errors. It is just saying that if you close a file, the Problems for that file are not also closed.

  3. doudou commented on Feb 14, 2018

    @doudou
    Contributor

    Just noticed the same behavior

  4. wingrunr21 commented on Mar 6, 2018

    @wingrunr21
    Collaborator

    @jbeker if you say so. Sounds to me like something about the Rubocop lint is sticking in VSCode for both issues.

  5. andrewmcodes commented on Sep 17, 2018

    @andrewmcodes

    Is this still an issue with 0.20.0?

  6. jbeker commented on Sep 18, 2018

    @jbeker
    Author

    @andrewmcodes Yes, I just tested with 0.20.0 and it still occurs.

    Steps

    • Open 2 files, one of which has rubocop reported issues
    • close the file with the errors
    • errors still show up in the "Problems" pane
  7. andrewmcodes commented on Sep 18, 2018

    @andrewmcodes

    What does your settings.json file look like?

  8. jbeker commented on Sep 19, 2018

    @jbeker
    Author

    @andrewmcodes Nothing particularly fancy. Included below:

    // Place your settings in this file to overwrite the default settings
    {
        "editor.fontFamily": "SourceCodePro-Light",
        "editor.fontSize": 13,
        "editor.lineHeight": 17,
        "editor.renderWhitespace": "boundary",
        "editor.renderIndentGuides": true,
        "editor.wordWrap": "on",
        "editor.wrappingIndent": "indent",
        "workbench.sideBar.location": "right",
        "workbench.colorTheme": "Solarized JEB 2",
        "workbench.iconTheme": "vscode-great-icons",
        "workbench.editor.enablePreview": false,
        "workbench.editor.enablePreviewFromQuickOpen": false,
        "workbench.editor.tabCloseButton": "left",
        "workbench.editor.showIcons": false,
        "window.openFilesInNewWindow": "on",
        "window.nativeTabs": true,
    
        "ruby.lint": {
            "reek": false,
            "rubocop": true,
            "ruby": true, //Runs ruby -wc
            "fasterer": false,
            "debride": false,
            "ruby-lint": false
        },
        "ruby.format": "rubocop",
        "editor.minimap.enabled": false,
        "workbench.startupEditor": "newUntitledFile",
        "extensions.ignoreRecommendations": false,
        "gitlens.advanced.messages": {
            "suppressCommitHasNoPreviousCommitWarning": false,
            "suppressCommitNotFoundWarning": false,
            "suppressFileNotUnderSourceControlWarning": false,
            "suppressGitVersionWarning": false,
            "suppressLineUncommittedWarning": false,
            "suppressNoRepositoryWarning": false,
            "suppressResultsExplorerNotice": false,
            "suppressShowKeyBindingsNotice": true,
            "suppressUpdateNotice": true,
            "suppressWelcomeNotice": false
        },
        "bracketPairColorizer.contextualParsing": true,
        "gitlens.statusBar.enabled": true,
        "gitlens.codeLens.scopes": [
            "document"
        ],
        "gitlens.codeLens.enabled": false,
        "gitlens.blame.heatmap.location": "left",
        "gitlens.statusBar.alignment": "left",
        "workbench.statusBar.feedback.visible": false,
        "coverage-gutters.lcovname": "my.lcov",
        "gitlens.keymap": "chorded",
        "telemetry.enableTelemetry": false,
        "gitlens.historyExplorer.enabled": true,
        "breadcrumbs.enabled": true
    }

    Versions currently are:

    vscode-ruby: 0.20.0
    Code itself: 1.27.2

  9. andrewmcodes commented on Sep 27, 2018

    @andrewmcodes

    Try changing

        "ruby.lint": {
            "reek": false,
            "rubocop": true,
            "ruby": true, //Runs ruby -wc
            "fasterer": false,
            "debride": false,
            "ruby-lint": false
        },
    

    to

        "ruby.lint": {
            "reek": false,
            "rubocop": {
                "rails": true,
             },
            "ruby": true, //Runs ruby -wc
            "fasterer": false,
            "debride": false,
            "ruby-lint": false
        },
    
  10. jbeker commented on Sep 27, 2018

    @jbeker
    Author

    Unfortunately not, same behavior.

  11. et commented on Nov 12, 2018

    @et

    I'm having the same issue.
    For context to why this can be annoying. Imagine you have an existing codebase that is trying to slowly transition to a 100% linted experience but don't have time to handle it all right now. Hence, each file opened up leaves a bunch of lint errors in the Problems window. Closing the file should remove those errors but they do not leave and just get stacked up 😢

    screen_shot_2018-11-12_at_7_52_23_am

    My work around has been to use Reload Window: CMD + SHIFT + P: Reload Window

  12. wingrunr21 commented on Nov 12, 2018

    @wingrunr21
    Collaborator

    I’m aware of this and the language server linter support will fix the issue.

  13. wingrunr21 commented on Feb 24, 2019

    @wingrunr21
    Collaborator

    This should be working correctly on v0.22.2 and up with language server based linting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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