redhat-developer / redhat-developer/vscode-java

Formatter Settings File Ignoring disabling_tag/enabling_tag

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

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

formatter
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

When I specify a formatter settings file, the disable/enable formatting tags are ignored.

Environment
  • Operating System: Win10 v1909 WSL 1 Ubuntu 18.04
  • JDK version: openjdk version "11.0.5" 2019-10-15
  • Visual Studio Code version: 1.42.1 (user setup)
  • Java extension version: 0.55.1
Steps To Reproduce
  1. Change workspace settings to:
{
    "java.format.settings.url": "https://raw.githubusercontent.com/snjeza/vscode-test/master/fluent.xml"
}
  1. Wrap some code w/ // @formatter:off & // @formatter:on
  2. Do something in that code that is outside of the default for the format settings
  3. Auto format the code (ALT + SHIFT + F)

Sample project

Current Result

Code between // @formatter:off & // @formatter:on is formatted

Expected Result

Code between // @formatter:off & // @formatter:on shouldn't be formatted

Additional Informations

Before auto-format:
image

After auto-format:
image

Format setting file:
image

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

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

はじめの一歩

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

調査の方向性

まず、issue に示されている workspace 設定と formatter XML を使用して、リンク先のサンプルプロジェクトの autoformat-ignoring-disable-enable ブランチで動作を再現します。formatter の統合を検証し、外部設定ファイルを使用した自動フォーマット中に // @formatter:off と // @formatter:on の間のコードが変更されないことを確認して完了とします。

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

評価

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

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

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