Skip to content

leventeBajczi/intellij-idea-format

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e3867bc · Oct 18, 2024

History

28 Commits
Jul 13, 2023
Oct 18, 2024
Nov 27, 2023
Jul 10, 2023
Jul 10, 2023

Repository files navigation

Run docker run -v $PWD:/github/workspace ghcr.io/leventebajczi/intellij-format:latest "*.java,*.kts,*.kt" "" "./<intellij-stylesheet.xml>" to format the current working directtory's java, kts and kt files according to the stylesheet.

To use as an action:

    - name: Reformat
      uses: leventeBajczi/intellij-idea-format@v1.0
      with:
        settings-file: "./doc/ThetaIntelliJCodeStyle.xml"
        file-mask: "*.java,*.kts,*.kt"
        additional-options: "-dry" # omit this to actually reformat the code

    - name: Create Pull Request # this will create a pull request towards the current branch with the modifications
      uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
      with:
        commit-message: "Reformatted code"
        branch: "code-reformat"
        title: '[AutoPR] Reformatted code'