All notable changes to this project will be documented in this file, which follows the conventions of keepachangelog.com. This project adheres to Semantic Versioning.
...
version
task uses a new cljstyle/version.txt
resource instead of the
jar manifest, as it gets overridden when building a native-image.-march=compatibility
to avoid CPU feature support
issues.
#106WARNING: this release formally deprecates the .tar.gz
artifacts in favor
of .zip
files. Make sure you update any integrations
accordingly.
tools.deps
and
tools.build
build chain.eof-newlines
rule will now remove additional trailing blank lines by
default. This can be controlled with the :trailing-blanks?
option.
#88
#102tools.deps
usage instructions.
#87.cljstyle.clj
and .cljstyle.edn
as additional options
for style configuration.
#95A handful of minor fixes in this release. No new native binaries, just a Clojars update.
:ignore
configuration to work correctly with relative paths.
#91Dockerfile
so it works out-of-the-box on other architectures.
#99This release adds a major missing element to cljstyle
's formatting rules,
covering comment indentation, padding, and prefixes. This version also sorts
string libspecs (such as from npm
) in a more widely-adopted way. As a result,
this version is likely to result in a diff for files which passed the previous
code.
rewrite-clj
v0 to v1. This solves a number of parsing-related
issues with the old version. In particular, auto-resolved namespaced maps
work as expected now.
#13
#52##Inf
and ##-Inf
are supported.
#43:import
and :require
forms
at the top level of the ns
form.
#56.zip
file in addition to the .tar.gz
archive.
Eventually, this will become the primary archive format for releases.#!
, the formatter will ignore the
first line of text and only style the rest of the file contents.
#70:break-libs?
which controls whether requires and imports will start on a
new line.
#35:comments
formatting rule standardizes comment prefixes,
differentiating between inline comments (;
) and leading comments (;;
).
Prefixes are configurable.
#30This release significantly changes the way that cljstyle
is configured.
Instead of a single flat map of options, configuration has been split up into
rule-specific and file-specific nested maps. This helps make the options more
understandable, less repetitive, and will support more nuanced configuration
options in the future.
Legacy configuration will still work, but the tool now emits a warning when it
loads files with the old style config. Use the new migrate
command to
automatically update your config files. Eventually, the legacy format will be
deprecated.
In addition, formatting rules are now applied in many fewer passes over the
syntax tree. This results in a significant speedup for most workloads, measured
at about 2.3x the throughput of the previous version. Use the new
--report-timing
option to show a detailed table of which rules the processing
time was spent in.
--exclude
option has been renamed to --ignore
and uses standard regex
syntax instead of globs. This provides better consistency with the :ignore
configuration for :files
.migrate
command will rewrite configuration files to use the new syntax.^:concat
on sequential values to have
the value appended to instead of replacing the previous value.--report-timing
option will enable detailed timing data for each
formatting rule in the report output.--timeout
option,
providing an execution limit in seconds.--timeout-trace
option will print a dump of all threads' stack traces
when processing times out.clojure.stacktrace
.letfn
forms when function formatting was disabled.
#54--exclude
CLI options that allow you to specify
directories/files to ignore at runtime.
#44check
output.
#48deps.edn
to support usage from tools.deps and the clj
CLI.
#33core
and tool
projects back into one top-level project.--report
option which will cause the execution stats to
be printed at the end of a run.NullPointerException
when formatting type methods with empty
bodies.reify
rules slightly and uses two-blank-lines between inline method
definitions.def
) have line-break rules, constrolled by
:line-break-vars?
.deftype
, defrecord
, defprotocol
, reify
, and
proxy
have formatting rules, controlled by :reformat-types?
.:list-indent-size
now applies to ns
forms as well.
#25defmacro
is now subject to function line-breaking rules.letfn
form to be treated
like a function definition.case
group lists beginning with a numeric value to throw an
error when formatting the file.pipe
command will respect configuration directly in the process working
directory. Previously, it only considered parent directories.:list-indent-size
configuration option allows the default indentation
amount for lists to be adjusted.
#8
#21pipe
command reads Clojure code from stdin and writes the reformatted
code to stdout.
#22The biggest change in this release is renaming the project to cljstyle
to
better differentiate it from the original cljfmt
.
:require
type forms, and inside libspecs. Some other cases
(such as conditionals inside :import
) may still cause errors.
#5:single-import-break-width
threshold which were
already in a package group will not be forced into a qualified class symbol.:require-eof-newline?
configuration option will ensure that all source
files end with a newline character.
#15completion.zsh
.defn-
are no longer ignored by function
rules.
#17UnsupportedOperationException
.
#12--stats FILE
option allows writing the task statistics to a file after
processing is complete. The file name may end in .edn
or .tsv
to control
the output format.cljfmt
library so it can be used by plugins
if desired..
and ..
properly.--verbose
and
--no-color
will work on the tool output.config
task on a file will produce the correct config list now.This is a significant release which revamps the tooling entirely. Instead of a Leiningen plugin, the tool is now a stand-alone native binary compiled with Graal.
cljfmt.config
namespace for specs and working with configuration files..cljfjmt
files on
disk.cljfmt/indents.clj
resource.ForkJoinPool
to efficiently utilize
processor cores.lein-cljfmt
project.First fork release. Rewrote most of the code and added a bunch of new functionality.
Legacy project release.
Can you improve this documentation? These fine people already did:
Greg Look, Drew Inglis & Ace LevenbergEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close