Skip to content

[clojure] add cljstyle format tool #2011

@practicalli-johnny

Description

@practicalli-johnny

Provide a format tool for the Clojure language linters

Proposal

Add cljstyle to the Clojure language linters with a default configuration that matches the Clojure Style Guide (which it does by default)

cljstyle provides a binary to check and fix Clojure code (.clj, .cljs, .cljc, .edn) and can format code following the Clojure style guide.

cljstyle can be configured via the .cljstyle file, so can easily be configured by the end user as well as provide a default configuration

cljstyle is available as part of the setup-clojure GitHub Action, so having the same tool in MegaLinter would help with consistency and allowing easy migration path to MegaLinter if desired.

Alternatives

cljfmt is a library cljstyle was based on. cljfmt is not availabe as a binary, so would either require building or uses as a library.

zprint is available as a binary, although it is a more general file formatting tool that requires more understanding to configure. zprint may be a useful addition along with cljstyle, especially if a good default configuration can be defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersnostaleThis issue or pull request is not stale, keep it open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions