LuaLS / LuaLS/lua-language-server

Line with just a space in gitignore causes whole project to be ignored

オープン
#3,458 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

An empty space (literally just ) along with "Lua.workspace.useGitIgnore" : true being set seems to be causing my whole project to be ignored.

Actual Behaviour

I'd expect it to be ignored. The .gitignore docs (https://git-scm.com/docs/gitignore#_pattern_format) say:

Trailing spaces are ignored unless they are quoted with backslash ("").

Reproduction steps
  1. Assign global in a.lua: x = 100
  2. Add .gitignore with empty space character
  3. See below:
Image

Removing the .gitignore file fixes the issue.

Additional Notes

No response

Log File

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Lua.workspace.useGitIgnore 設定を有効にし、スペース 1 つだけを含む .gitignore と、issue で説明されている a.lua の代入を使って動作を再現します。診断で使われている gitignore の処理を追跡し、空白のみの行が無視され、それによってプロジェクト全体が無視されないことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
64/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。