google / google/google-java-format
No new line break for some at-sign@ in Javadoc comment
- Linguagem predominante
- Java
- Estrelas
- 6.2k
- Forks
- 937
- Merge médio
- 6min
- PRs com merge (30d)
- 3
Descrição
We have a string as:
```java
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
*
Sample code:
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* try (EchoServiceClient echoServiceClient =
* EchoServiceClient.create()) {
* EchoResponse response =
* echoServiceClient.chat();
* }
* }
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @InternalApi This method is internal used only. Please do not use directly.
*/
```
After running java-format on the above string, the Javadoc comment gets reformatted as:
```java
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* try (EchoServiceClient echoServiceClient =
* EchoServiceClient.create()) {
* EchoResponse response =
* echoServiceClient.chat();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method
* is internal used only. Please do not use directly.
*/
```
Notice the line break before `@InternalApi ` was removed and a line break was added after `@InternalApi This method`. This makes the method comments hard to read.
Could you please help investigate?
Thank you!
Guia de contribuição
Direção de pesquisa
Comece reproduzindo o exemplo de Javadoc fornecido com java-format e compare a entrada e a saída formatada ao redor de @InternalApi. Siga o caminho de formatação do Javadoc para determinar por que essa quebra de linha é removida e, em seguida, adicione ou atualize um teste de regressão mostrando que a quebra é preservada.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- java
- Domínio
- tooling
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100