mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
build(lint): allow "bufnr" as positional param #39515
Allow `bufnr` as a positional param name because it is very common. However as a field name, or part of a function name, it is usually a mistake.
This commit is contained in:
@@ -27,13 +27,13 @@ local regex = {} -- luacheck: no unused
|
||||
--- @return integer? # match end (byte index), or `nil` if no match
|
||||
function regex:match_str(str) end
|
||||
|
||||
--- Matches line at `line_idx` (zero-based) in buffer `bufnr`. Match is restricted to byte index
|
||||
--- Matches line at `line_idx` (zero-based) in buffer `buf`. Match is restricted to byte index
|
||||
--- range `start` and `end_` if given, otherwise see |regex:match_str()|. Returned byte indices are
|
||||
--- relative to `start` if given.
|
||||
--- @param bufnr integer
|
||||
--- @param buf integer
|
||||
--- @param line_idx integer
|
||||
--- @param start? integer
|
||||
--- @param end_? integer
|
||||
--- @return integer? # match start (byte index) relative to `start`, or `nil` if no match
|
||||
--- @return integer? # match end (byte index) relative to `start`, or `nil` if no match
|
||||
function regex:match_line(bufnr, line_idx, start, end_) end
|
||||
function regex:match_line(buf, line_idx, start, end_) end
|
||||
|
||||
Reference in New Issue
Block a user