Skip to content

require('module') doesn't respect relative path for diagnostic in 3.0 #1034

@kevinhwang91

Description

@kevinhwang91

Describe the bug
Make diagnostic wrong.

To Reproduce
Steps to reproduce the behavior:

  1. Build an ENV below
  2. Run client the server

Input: tree:
Output:

.
└── depth1
    └── foo.lua

1 directory, 1 file

Input: cat depth1/foo.lua
Output:

local M = {}

function M.init()
    return 'init'
end

function M.test()
    require('foo').init(2) -- The function takes only 0 parameters, but you passed 1.
    require('depth1.foo').init()
end

return M

Expected behavior
require('foo').init(2) keep silent

Environment (please complete the following information):

  • OS: ArchLinux
  • Client: Neovim with coc.nvim

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions