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.

False Positive Rubocop RSpec/FilePath Warning #625

@ghost

Description

Your environment

  • vscode-ruby version: 0.27.0
  • Ruby version: 2.7.1
  • Ruby version manager (if any): rvm
  • VS Code version:1.45.1
  • Operating System: macOS Mojave 10.14.6
  • Using language server? (eg useLanguageServer is true in your configuration?)
    Tried true and false

Expected behavior

rubocop lint output should match what is run from the command line. There should be no RSpec/FilePath error

Actual behavior

For an rspec file spec/controllers/admin/orders_controller_spec.rb
with the code


describe Admin::OrdersController, type: :controller do
end

I get the following error

{
	"resource": "/Users/alan/Projects/pie-backend/spec/controllers/admin/orders_controller_spec.rb",
	"owner": "rubocop",
	"severity": 2,
	"message": "Spec path should end with `admin/orders_controller*_spec.rb`.",
	"source": "RSpec/FilePath",
	"startLineNumber": 3,
	"startColumn": 1,
	"endLineNumber": 3,
	"endColumn": 52
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions