redhat-developer / redhat-developer/vscode-java

References to google-styleguide in formatter documentation

Ouverte
#2,955 3 commentaires 3 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

formatter
Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
11

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner la section de la documentation sur le linting Java référencée dans l’issue et comparez sa référence à google/styleguide avec google/google-java-format. Le travail est considéré comme terminé lorsque la référence trompeuse est supprimée ou corrigée dans la documentation, mais l’issue n’identifie pas de fichier dans ce dépôt et n’indique pas où cette page externe est maintenue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
documentation
Type d'issue
Documentation
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.