Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch code style to Google's Java Code Style #661

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .github/workflows/reformat-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Reformat Code

on:
workflow_dispatch

permissions:
contents: write
pull-requests: write

jobs:
reformat-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21.0.2
distribution: 'temurin'
- uses: axel-op/googlejavaformat-action@v3
with:
args: "-r -a --skip-reflowing-long-strings --skip-javadoc-formatting"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'Automated code reformat'
branch: reformat-code
title: 'Automated code reformat'
body: 'Contains the result of applying the [Google Java Format Action](https://github.com/axel-op/googlejavaformat-action?tab=readme-ov-file#google-java-format-action).'
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ permissions:
pull-requests: write

jobs:
checkstyle:
name: Checkstyle
gjf-checkstyle:
name: GJF (AOSP) and Checkstyle
runs-on: ubuntu-latest
steps:
- name: Checkout source
Expand All @@ -39,6 +39,13 @@ jobs:
with:
java-version: 21.0.2
distribution: 'temurin'
- uses: axel-op/googlejavaformat-action@v3
with:
args: "-r -a --skip-reflowing-long-strings --skip-javadoc-formatting --set-exit-if-changed"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run git diff on failure
if: failure()
run: git diff
- name: Run checkstyle reporter
uses: dbelyaev/action-checkstyle@master
with:
Expand Down
296 changes: 0 additions & 296 deletions config/IntelliJ Code Style.xml

This file was deleted.

Loading
Loading