Skip to content

format code consistently and programmatically (like gofmt or rustfmt) #35

@pdurbin

Description

@pdurbin

Over at https://groups.google.com/g/dataverse-dev/c/y2Jpk3szTf8/m/rckKmP6-BgAJ I explained that I was playing with Go and fell in love with the idea that all Go code is formatted the same way using a tool called gofmt. (Rust, which came along later, also has this with rustfmt).

Can we programmatically format the Java code in this repo?

I just stumbled upon https://github.com/google/google-java-format via https://github.com/eclipse-ee4j/cargotracker but I'm not picky about the tool.

Ideally the tool can be used by the command line as well as in an IDE.

We could even run all code through the tool as a pre or post commit hook in git or a GitHub Action.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions