axel-op/googlejavaformat-action

Action conflits with the formatter.

danielferromeral opened this issue · 1 comments

Hello.

So, I have the action to check if some files should be formatted. Also, I have the plugin for IntelIj to format the code. As the plugin is currently running the version of google-java-format 1.13.0, I set also the action to run the same version, as you can see in the configuration.

name: Format
on:
  pull_request
jobs:
  formatting:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: "17"
      - uses: axel-op/googlejavaformat-action@v3
        with:
          args: "--dry-run --set-exit-if-changed"
          version: 1.13.0

The think is, that after formatting all the code in src with the plugin, the formatter is still marking some classes that should be formatted. I went class by class formatting them, but there wasn't any change.

Is there any way of debugging the action? Or getting the lines that are having the conflicts without doing a commit?

Hello @danielferromeral,

I think you should find in the logs the paths of the files that the executable consider as badly formatted. Have you tried downloading the executable and running it directly on your computer?