LuaLS / LuaLS/vscode-lua

Add a problemMatcher

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

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

enhancement good first issue
主要言語
TypeScript
スター
215
フォーク
62
PR マージ指標
30日以内にマージされた PR はありません

説明

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

MacOS

What is the issue affecting?

Other

Expected Behaviour

I am not sure how you normally run your Lua application. But I am used to use the tasks feature of VS code, so I created a tasks.json with this content:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Run main",
            "type": "shell",
            "command": "./main.lua",   
            "problemMatcher": [
                "$lua"
            ]       
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

Normally such a task makes use of a problemMatcher which parses the tasks console output for problems and then highlight the code line that was affected. But there seems no problemMatcher to be defined by the plugin.

Actual Behaviour

No problemMatcher provided.

Reproduction steps
  1. Create a tasks.json as given in "Expected Behaviour"
  2. Crate a main.lua with an error such as "local i = 5 + "foo"
  3. Run the task, the output shows something like
/usr/bin/lua: ./main.lua:3: attempt to add a 'number' with a 'string'
stack traceback:
        [C]: in metamethod 'add'
        ./main.lua:3: in main chunk
        [C]: in ?

See the main.lua, there is no highlight due to this error.

Additional Notes

No response

Log File

No response

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

ソースファイルやテストは指定されていません。提供されている tasks.json と main.lua の例を使って問題を再現し、その後、VS Code 拡張機能がタスク統合と problem matchers にどのように関与しているかを調べてください。タスクの出力に含まれる Lua ランタイムエラーが解析され、影響を受けた main.lua の行がハイライトされれば完了です。

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

評価

技術スタック
lua, vscode
領域
tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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