google / google/google-java-format

Missing empty line after copyright section

未關閉
#434 1 則留言 9 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
6.2k
分支
937
平均合併
6 分鐘
30 天內合併 PR
3

描述

https://google.github.io/styleguide/javaguide.html#s3-source-file-structure says

> A source file consists of, in order:
>
> 1. License or copyright information, if present
> 2. Package statement
> 3. Import statements
> 4. Exactly one top-level class
>
> Exactly one blank line separates each section that is present.

But google-java-format does not add the blank line between a License section and a package statement.

![image](https://user-images.githubusercontent.com/28604/72165837-2e1d3b00-3396-11ea-9acf-c8266b86a27c.png)

貢獻指南

開啟貢獻指南

研究方向

閱讀連結的 Google Java Style Guide 中關於原始檔結構的章節,然後重現一個包含版權資訊、後接 package 陳述式的 Java 檔案的格式化程式輸出。當 google-java-format 在這兩個部分之間插入恰好一個空白行時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
tooling
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。