google / google/google-java-format
Feature request - make a git-aware google-java-format-diff.py
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
google-java-format-diff.py is generic in that it takes any diff and formats it.
This is certainly useful, but it means that every user who also uses git has to write a wrapper to run "git diff" appropriately and pass in that input. This makes automating formatting in a repository a bit more work.
It would be nice if there were a more git-aware variant that took in commits and/or files directly. For example, clang-format has an official git-clang-format hook (https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format) which provides very tight integration with git when running clang-format.
貢獻指南
研究方向
先閱讀 google-java-format-diff.py,並將其介面與連結的 git-clang-format 範例進行比較。定義支援 git 的變體應如何接受提交和/或檔案並呼叫格式化。完成的標準是,儲存庫使用者可以將格式化整合到 git 中,而不必另外撰寫 git diff 包裝器。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- git, java, python
- 領域
- cli, tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100