redhat-developer / redhat-developer/vscode-java

References to google-styleguide in formatter documentation

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

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

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

説明

Problem

The official documentation page about linting has a section about formatting which includes a link to the unmaintened/abandoned google/styleguide repo which might be misleading to some unfamiliar with the differences between google/styleguide and google-java-format.

A bit more explanation

The project, I currently work on uses the Intellij google-java-format plugin (like almost any other project, I have worked on in the past 6+ years). I know that the section above links to google/styleguide repo, which is not the same as google/google-java-format repo. Not being overly familiar with the repos, I thought that the formatting output should be the same (or at least very similiar), especially, because the offical documentation links to it.

After spending a few hours trying to get a working solution, it seems to me, that the google/styleguide java style is abandoned (last updated 5 years ago), without an offical statement. I found this issue which funnily enough also mentions the vscode-java docs.

The formatting output is very different. Here is a small example:

google/styleguide:
image

google/google-java-format:
image

Suggestion

Can the reference to the google styleguide be removed? I think it would be bad idea to just mention that the formatter is unmaintained, because people don't read carefully enough, instead just copy the configuration.

I know the referenced documentation is not part of this repo, but I (as somebody unaffiliated with vscode-java) didn't want to open an issue on the vscode repo straight away.

google-java-format Solution

This stackoverflow question lists different solutions.

There are a lot of plugins that are floating around (mostly forks of one plugin) where I tried a few, but none worked: https://marketplace.visualstudio.com/search?term=google%20java%20format&target=VSCode&category=All%20categories&sortBy=Relevance

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

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

はじめの一歩

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

調査の方向性

まず、issue でリンクされている Java linting ドキュメントのセクションを確認し、その google/styleguide への参照を google/google-java-format と比較してください。ドキュメント内の誤解を招く参照が削除または修正されれば完了ですが、issue ではこのリポジトリ内のファイルが特定されておらず、その外部ページがどこで管理されているかも示されていません。

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

評価

技術スタック
java
領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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