google-java-format - IntelliJ IDEs Plugin | Marketplace
google-java-format - Visual Studio Code
환경 설정 | 기타 설정 | google-java-format Settings
도움말 | 사용자 지정 VM 옵션 편집…
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
Ctrl
+ Alt
+ L
로 코드 포매팅https://github.com/axel-op/googlejavaformat-action
name: google-java-format
on: [ push, pull_request ]
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: axel-op/googlejavaformat-action@v3
with:
args: "--replace --aosp"
commit-message: "format: Google Java Format"
# MacOS를 사용한다면 아래 코드 추가
github-token: ${{ secrets.GH_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
Settings | Secrets and variables | Actions
Assigning permissions to jobs - GitHub Docs
Settings | Actions | General
on:
push:
branches-ignore:
- "main"
main
브랜치 제외