Changelog
For more recent entries, please see Scalafmt Releases.
v2.6.3 (2020-07-10)
Merged pull requests:
- Dependencies: upgrade scalameta to 4.3.19 #2087 (kitbellew)
- Increased maxVisitsPerToken limit #2086 (poslegm)
- ScalafmtConfig: implicit with binpack unsupported #2084 (kitbellew)
- Policy: introduce more specific expire strategies #2083 (kitbellew)
- #1627 [24]: FormatOps bugfix: ignore NL before infix for fold/unfold #2082 (kitbellew)
- Router: don't format #! lines in sbt files #2077 (kitbellew)
- RedundantParens: don't rewrite (()), aka Lit.Unit #2076 (kitbellew)
- ScalafmtReflectConfig: invoked .forSbt, not legacy dialect #2075 (kitbellew)
- BestFirstSearch: make the Provided split active #2074 (kitbellew)
- Dependency: upgrade scalameta to 4.3.18 #2072 (kitbellew)
v2.6.2 (2020-07-05)
Merged pull requests:
- Documentation: describe optIn.configStyleArguments, clarify optIn.breaksInsideChains #2068 (kitbellew)
- Router: merge classic select chain rule with other #2067 (kitbellew)
- Router: indent comment before first select #2066 (kitbellew)
- ScalafmtDynamic: throw once if can't resolve config #2065 (kitbellew)
- Upgrade the scalafmt binary to 2.6.1 #2064 (kitbellew)
- PR conflict: fix test from #2061 affected by #2060 #2063 (kitbellew)
- {Token,Tree}Ops: remove unused methods #2062 (kitbellew)
- FormatOps: method to check classic select chain #2061 (kitbellew)
- Policy: preserve original policies and ranges for control #2060 (kitbellew)
- Dockerize #2059 (gurinderu)
- Dependency updates #2057 (poslegm)
- Update scalameta, testkit to 4.3.17 #2055 (scala-steward)
- Update sbt-mdoc to 2.2.3 #2053 (scala-steward)
- Update sbt to 1.3.13 #2052 (scala-steward)
- Update sbt-native-packager to 1.7.3 #2051 (scala-steward)
- Update sbt-assembly to 0.15.0 #2050 (scala-steward)
- Remove reference to binPack.parentConstructors being a boolean #2049 (emma-burrows)
- Router: break between comma and multiline comments #2048 (kitbellew)
- TokenOps: no blank line for scaladoc in expression #2047 (kitbellew)
- FormatWriter: single-character one-line scaladoc #2046 (kitbellew)
- Router: keep blank line in empty case clause body #2045 (kitbellew)
- Add build with musl libc #2041 (gurinderu)
- clarify how
.scalafix.conf
& the CLI binary versions relate #2040 (bjaglin)
v2.6.1 (2020-06-18)
Merged pull requests:
- FormatWriter: fold long oneline javadoc if no wrap #2036 (kitbellew)
- State: for overflow delay, apply no more than once #2035 (kitbellew)
- Router bugfix: respect config style for tuples #2034 (kitbellew)
- FormatWriter: fix handling of one-line docstrings #2031 (kitbellew)
- TokenOps fix: blank line between mod and scaladoc #2030 (kitbellew)
- FormatWriter: fix empty 1st part of interpolation #2029 (kitbellew)
v2.6.0 (2020-06-16)
Merged pull requests:
- State: don't penalize strings that always overflow #2024 (kitbellew)
- Router: allow relative formatting of spliced XML #2021 (kitbellew)
- ScalafmtRunner: respect filters with custom files #2020 (kitbellew)
- Scaladoc: support gaps in code, refs with punctuation #2018 (kitbellew)
- TokenOps: look for "format: off" in any comment #2017 (kitbellew)
- Router: penalize NL on breakChainOnFirstMethodDot #2016 (kitbellew)
- RedundantBraces: don't rewrite nested Defn #2015 (kitbellew)
- FormatWriter bugfix: handle asterisks in docstring #2014 (kitbellew)
- Split: represent a newline alternative differently #2011 (kitbellew)
- Router: idempotence of breakChainOnFirstMethodDot #2010 (kitbellew)
- State: fix column positions for multiline strings #2009 (kitbellew)
- Router: merge config-style rule into others #2008 (kitbellew)
- FormatOps bugfix: get TParams correctly, not the Paramss #2007 (kitbellew)
- Scaladoc: support table formatting in FormatWriter #2006 (kitbellew)
- FormatToken: store the syntax of tokens in meta #2005 (kitbellew)
- Documentation: move comments section, add release #2002 (kitbellew)
- FormatWriter bugfix: align strip margin in
s"""|
#2001 (kitbellew) - #1627 [23]: Router: source=keep try keep NL/noNL in apply(... #2000 (kitbellew)
- Self formatting with 2.5.3 #1999 (poslegm)
- Update scalatest to 3.1.2 #1997 (scala-steward)
- Update sbt-mdoc to 2.2.0 #1995 (scala-steward)
- Update sbt-scalajs to 1.1.0 #1994 (scala-steward)
- Update sbt-native-packager to 1.7.2 #1992 (scala-steward)
- Update scalatags to 0.9.1 #1991 (scala-steward)
- FormatWriter bugfix: comment with empty first line #1990 (kitbellew)
- FormatWriter: format multiline docstrings #1987 (kitbellew)
- Dependency: upgrade scalameta to 4.3.13 #1986 (kitbellew)
- FormatWriter: fix off-by-one bug in comment wrap #1985 (kitbellew)
- FormatOps: fix finding
=\>
in lambda without args #1983 (kitbellew) - Docstrings: rename styles, clean up text after
\*
#1982 (kitbellew) - FormatWriter: minor refactoring of comment formatting code #1981 (kitbellew)
- Router: allow folded
extends
if ctor is folded #1980 (kitbellew) - FormatOps: for source=fold, compact extends/with #1979 (kitbellew)
- Spaces configuration documented #1977 (poslegm)
- Documentation: expand docstrings #1972 (kitbellew)
- sbt plugin update #1971 (poslegm)
- FormatWriter: implement wrapping of long comments #1970 (kitbellew)
- FormatWriter bugfix: comment format on lookaround #1968 (kitbellew)
- mdoc DefaultsModifier: allow multiple defaults #1967 (kitbellew)
- FormatWriter: allow folding scaladoc to one line #1965 (kitbellew)
v2.5.3 (2020-05-11)
Merged pull requests:
- #1627 [22]: Router: preserve split after
=\>
in source=keep #1963 (kitbellew) - FormatWriter: shift lines after StateColumn align #1962 (kitbellew)
v2.5.2 (2020-05-09)
Merged pull requests:
- interface ScalafmtSessionFactory shouldn't extend Scalafmt interface #1961 (unkarjedy)
- Documentation: retire Homebrew, point to coursier #1960 (kitbellew)
- Documentation: old scalafmt plugin is deprecated #1959 (kitbellew)
- RedundantBraces bugfix: skip deep if without else #1958 (kitbellew)
- When using in pipeline don't print info to stderr #1957 (sideshowcoder)
- RedundantBraces: don't rewrite anon infix funcs #1954 (kitbellew)
- FormatWriter: use getAlignContainer to flush on comments #1951 (kitbellew)
- FormatWriter: don't align
Defn
withBlock
as body #1947 (kitbellew) - Documentation for RedundantBraces settings #1945 (poslegm)
v2.5.1 (2020-05-03)
Merged pull requests:
- Discord link fixed (#1942) #1946 (poslegm)
- TreeOps: require space before
\(
in function #1944 (kitbellew) - FormatWriter: flush alignment blocks on blank line #1943 (kitbellew)
- Changelog for 2.5.0 #1941 (poslegm)
- ScalafmtRunner: fix handling of trait "extends" #1940 (kitbellew)
- ScalafmtConfig: see if dialect has trailing commas #1939 (kitbellew)
- RedundantParens: may not be redundant around infix #1938 (kitbellew)
- FormatWriter: simplify two regular expressions; fix pipe char bug #1936 (LeeTibbert)
v2.5.0 (2020-04-30)
Managed formatting modes
We are defining the newlines.source
parameter (see https://scalameta.org/scalafmt/docs/configuration.html#newlinessource), which introduces managed, wholesale changes to how code is formatted. One of the options (keep
) is intended to hand control over line breaks to the user, while the other two (fold
and unfold
) will in fact completely ignore user input.
These modes are new and will potentially have a few bugs here and there (especially keep
), in addition to, possibly, causing mixed sentiment of the "this looks almost good, if only we could do this differently" type. That is expected and likely par for the course for an opinionated formatter that scalafmt
was intended to be.
However, please submit your bugs and opinions via https://github.com/scalameta/scalafmt/issues/new or comment on existing ones, so that if there are ideas on how to modify the behaviour in a way that resonates with the community, without violating the constraints (for fold
/unfold
, user input must be ignored), we'll implement them.
Editions
Editions were envisioned as a way to allow formatter upgrades while preserving formatting behaviour, but this turned out to be substantially harder to do, so edition 2020-01 is the last one. Also, the same result can easily be accomplished by not upgrading the formatter.
File overrides
One can customize configuration to apply to a subset of files, based on a file pattern. Cases can include special formatting rules for sbt
files, or others for test suites (for instance, using AvoidInfix
rewrite for main code with an empty rewrite.neverInfix.excludeFilters
while allowing special scalatest
DSL for tests with rewrite.neverInfix.excludeFilters
containing should
etc.).
See https://scalameta.org/scalafmt/docs/configuration.html#fileoverride
Infix formatting
Formatting line breaks around infix expressions turned out to be a difficult problem, and a couple of years ago scalafmt
gave up on that and let the user choose where to break. Here, we are defining a couple of parameters to try and take that control back, by adding newlines after an infix operator (as the only universally safe place; there are some cases when a break can happen before an infix operator, but those are rare, and this logic doesn't attempt to discern them).
See https://scalameta.org/scalafmt/docs/configuration.html#newlinesafterinfix
Presets
This is not a new setting but a new, more general way to specify groups of parameters. Previously, you'd use style = defaultWithAlign
or align = most
or danglingParentheses = true
. However, because configuration is represented using HOCON/json, doing it like that meant one couldn't partially override these presets.
The new approach is to define preset = defaultWithAlign
, or align.preset = most
, or danglingParentheses.preset = true
. This way, naming is standardized, and partial overrides are possible.
Please see https://scalameta.org/scalafmt/docs/configuration.html#presets.
Alignment
The major additions, apart from several bug fixes, are
- right-aligning of infix operators
- ability to align lines with different number of columns
- ability to disable alignment within strip-margin multi-line strings; please see https://scalameta.org/scalafmt/docs/configuration.html#alignstripmargin
- ability to align multi-line blocks (previously, only consecutive, single-line statements we considered); please see https://scalameta.org/scalafmt/docs/configuration.html#alignmultiline.
implicit
and dangling
Formatting around This was handled in fixed way in classic formatting mode while had some control in verticalMultiline
mode. We brought those styles together, by adding a few parameters to control the outcome.
Please see:
- https://scalameta.org/scalafmt/docs/configuration.html#newlines-around-implicit-parameter-list-modifier
- https://scalameta.org/scalafmt/docs/configuration.html#danglingparentheses (
exclude
andctrlSite
are new)
Indentation
We added several new options to control indentation:
- within constructors:
continuationIndent.ctorSite
- in
with
expressions following anextends
:continuationIndent.withSiteRelativeToExtends
Please see https://scalameta.org/scalafmt/docs/configuration.html#indentation - indentation of case clauses has been changed to be more consistent, no parameter available
Top-level statements
In addition to enforcing breaks before top-level statements, we now allow the same after the top-level statements. Also, there's a more granular control of which top-level statements are considered. Please see https://scalameta.org/scalafmt/docs/configuration.html#newlinestoplevelstatements
Rewrites
- trailing commas: a new
multiple
parameter (see https://scalameta.org/scalafmt/docs/configuration.html#trailing-commas) - multiple bugfixes for
AvoidInfix
RedundantParens
expanded to more cases
Literals
A number of new parameters is available to control formatting of numeric literals. Please see https://scalameta.org/scalafmt/docs/configuration.html#literals.
Defaults
The following are changes in default behaviour:
newlines.afterCurlyLambda = never
: the parameter itself doesn't change, but its behaviour changed since 2.4.2 (a newsquash
setting mimics the oldnever
); see https://scalameta.org/scalafmt/docs/configuration.html#newlinesaftercurlylambdarewrite.redundantBraces.generalExpressions = true
; previously, it wasfalse
align.multiline = true
: this new setting modifies the behaviour ofalign.preset = most
newlines.alwaysBeforeMultilineDef
: there is a change in behaviour due to a bugfix, making this option apply consistently.
Merged pull requests:
- FormatWriter: optionally support multiline align #1934 (kitbellew)
- FormatWriter: no arbitrary depth to match align #1933 (kitbellew)
- Self-formatting with 2.5.0-RC3 #1932 (poslegm)
- Documentation: move alwaysBeforeMultilineDef #1931 (kitbellew)
- Update scalameta, testkit to 4.3.10 #1930 (scala-steward)
- Update sbt-scalafmt to 2.3.4 #1928 (scala-steward)
- Update sbt to 1.3.10 #1927 (scala-steward)
- Update scalatags to 0.9.0 #1926 (scala-steward)
- Update sbt-ci-release to 1.5.3 #1925 (scala-steward)
- Documentation: add newlines.alwaysBeforeMultilineDef #1923 (ljwagerfield)
- State bugfix: filter new indents the same as old #1922 (kitbellew)
- Documentation: add version to newer parameters #1920 (kitbellew)
v2.5.0-RC3 (2020-04-28)
Merged pull requests:
- ContinuationIndent: add granularity to defnSite #1919 (kitbellew)
- DanglingParentheses: add ctrlSite flag #1918 (kitbellew)
- FormatWriter bugfix: add margin in the middle only #1917 (kitbellew)
- FormatWriter: use
\h
for horizontal whitespace #1916 (kitbellew) - Pretty format multiline expressions in enumerator with align.arrowEnumeratorGenerator #1915 (poslegm)
- Usage of default align token owners #1914 (poslegm)
- RedundantBraces: fix try with partially enclosed expressions #1913 (kitbellew)
- FormatWriter: match on any horizontal whitespace #1911 (kitbellew)
- ScalafmtDynamicRunner: read and format only matching files #1910 (kitbellew)
- ContinuationIndent: add ability to control "with" #1909 (kitbellew)
- Newlines: add flexibility to implicitParamListModifier #1908 (kitbellew)
- AvoidInfix bugs: RedundantParens conflicts, newline before
\(
#1906 (kitbellew) - RedundantParens: fix handling of tuples #1905 (kitbellew)
v2.5.0-RC2 (2020-04-24)
Merged pull requests:
- Binpack literals: allow simple expressions, too #1902 (kitbellew)
- FormatWriter: fix indent for complex interpolation #1901 (kitbellew)
- BinPack: allow single-line formatting of literals #1900 (kitbellew)
- #1627 [21]: Router: improve source=fold formatting of val/def #1899 (kitbellew)
- AvoidInfix: correctly determine when to wrap LHS #1898 (kitbellew)
- RedundantParens: support additional patterns #1897 (kitbellew)
- #1627 [20]: Router bugfix: binPack call rules: overflow, dangling parens #1894 (kitbellew)
- FormatOps: fix infix indent if followed by comment #1893 (kitbellew)
- Router: force indent before comment, not break #1891 (kitbellew)
- RedundantBraces: exclude nested partial function #1890 (kitbellew)
- Router: indent comments in the middle of a select #1888 (kitbellew)
- Presets: automatically decode all config builtins #1886 (kitbellew)
- ScalafmtConfig: move default40 into the test suite #1885 (kitbellew)
- FormatBenchmark: fix, use the correct parameter #1884 (kitbellew)
- Documentation: clarify glob pattern in the example #1883 (kitbellew)
- [docs] Pipe Bash script to Bash, not sh #1880 (bsolomon1124)
- Docs: Assembling and Executing New CLI Artifacts #1879 (aarsenij)
- Fix literals.double example #1878 (xavierguihot)
- Self formatting with 2.5.0-RC1 #1877 (poslegm)
- Release notes for 2.5.0-RC1 to website #1876 (poslegm)
v2.5.0-RC1 (2020-04-15)
Merged pull requests:
- AvoidInfix: simplify, fix incorrect rewrites #1875 (kitbellew)
- Router: remove unnecessary splits cache, used once #1874 (kitbellew)
- RedundantBraces: re-enable general expressions #1873 (kitbellew)
- CLI: add explicit flag --reportError to exit 1 on malformatted code #1872 (kitbellew)
- Router: fix strip margin in interpolated strings #1870 (kitbellew)
- Fixed alignment overriding #1869 (poslegm)
- Dynamic configuration doc moved to "Disabling or customizing formatting" section #1868 (poslegm)
- literals.* docs #1867 (poslegm)
- Documentation: explain
newlines.topLevelStatements
#1866 (kitbellew) - ScalafmtConfig: allow overriding per file pattern #1865 (kitbellew)
- Newlines: allow break after top-level statements #1864 (kitbellew)
- Newlines: implicitParamListModifier to replace two #1863 (kitbellew)
- Documentation: add availability for recent params #1862 (kitbellew)
- Error.NoMatchingFiles: don't display a stack trace #1860 (kitbellew)
- TreeOps: use numParents for nestedApplies/Select #1859 (kitbellew)
- Flexible literal formatting #1857 (poslegm)
- #1627 [19]: Documentation: describe
newlines.afterInfix
#1856 (kitbellew) - #1627 [18]: FormatOps: ignore line breaks in infix expressions #1855 (kitbellew)
- Router bugfix: regression in statement/comments #1854 (kitbellew)
- FormatOps: implement recursive findToken method #1853 (kitbellew)
- Upgrade to the latest Metaconfig #1852 (olafurpg)
- Debug: move printing debug info from FormatWriter #1851 (kitbellew)
- State: clarify how priority is determined #1850 (kitbellew)
- #1627 [17]: Several fixes for ApplyType, symbolic select, if in case clause #1849 (kitbellew)
- #1627 [16]: ScalafmtConfig: refactor checking source errors #1848 (kitbellew)
- #1627 [15]: Documentation: describe newlines.source #1847 (kitbellew)
- FormatOps: don't start a statement on a comment #1846 (kitbellew)
- Compiler warnings enabled #1843 (poslegm)
- Enforce Prettier formatting on markdown sources. #1840 (olafurpg)
- Sunset editions #1839 (olafurpg)
- Align strip margin: allow disabling the alignment #1837 (kitbellew)
- Tests for already fixed SearchStateExploded error (#1527) #1836 (poslegm)
- TokenOps bugfix: logic for newline on docstring #1834 (kitbellew)
- Fixed newlines on NewAnonymous with empty arguments lambda #1833 (poslegm)
- Hide lambda body squashing under newlines.source=fold #1832 (poslegm)
- Update sbt-native-packager to 1.7.0 #1827 (scala-steward)
- Update scalatest to 3.1.1 #1824 (scala-steward)
- Update scalameta, testkit to 4.3.7 #1823 (scala-steward)
- Update scalafmt-core to 2.4.2 #1822 (scala-steward)
- Update sbt-scalafmt to 2.3.2 #1821 (scala-steward)
- Update sbt-mdoc to 2.1.5 #1820 (scala-steward)
- Update scala-xml to 1.3.0 #1819 (scala-steward)
- Update sbt-scalajs to 1.0.1 #1818 (scala-steward)
- Update sbt-native-packager to 1.6.2 #1816 (scala-steward)
- Update sbt-mima-plugin to 0.7.0 #1815 (scala-steward)
- Update scalatags to 0.8.6 #1814 (scala-steward)
- Update metaconfig-core, ... to 0.9.9 #1813 (scala-steward)
- Fixed unclear example for danglingParentheses in documentation #1812 (poslegm)
- #1627 [14]: Router: single-line Defn lambda for fold only #1810 (kitbellew)
- #1627 [13]: Router: ignore line breaks in comma-separated args #1808 (kitbellew)
- All tests moved into the scalafmt-tests package #1807 (dkartashev)
- #1627 [12]: Router: ignore line breaks in enumerators #1806 (kitbellew)
- #1627 [11]: Router: relax restrictions on breaks within interpolate #1805 (kitbellew)
- #1627 [10]: Router: ignore line breaks in select chains #1796 (kitbellew)
- Preserve newlines in for comprehension generators and values #1795 (poslegm)
- #1627 [09]: Router: ignore line breaks in case clauses #1793 (kitbellew)
- #1627 [08]: Router: ignore line breaks in annotations #1792 (kitbellew)
- GraalVM Native Image fix #1791 (poslegm)
- #1627 [07]: FormatOps: ignore line breaks in rhsOptimalToken #1790 (kitbellew)
- Router bugfix: handle implicit consistently #1789 (kitbellew)
- #1627 [06]: Router: ignore line breaks for config style apply #1786 (kitbellew)
- Align lines with different columns count #1785 (poslegm)
- All tests enabled on CI (and fixed) #1784 (poslegm)
- Add script to test that a release succeeded #1782 (olafurpg)
- Document config overriding functionality #1781 (poslegm)
- Scalameta update #1780 (poslegm)
- #1627 [05]: Router: ignore line breaks in def/val assignments #1779 (kitbellew)
- #1627 [04]: Router: ignore line breaks in if-else and bodies #1778 (kitbellew)
- Changelog updated #1777 (poslegm)
- Router: modify indent of case clauses consistently #1776 (kitbellew)
- #1627 [03]: Router: newlines.source=unfold for semicolons #1774 (kitbellew)
- "// format: off" enabled for comments, literals, etc. #1773 (poslegm)
- #1627 [02]: Router: ignore line breaks for blocks #1772 (kitbellew)
- BestFirstSearch: check optimal token not to overflow #1771 (kitbellew)
- Fetch tags on CI #1770 (poslegm)
- Fixed contradiction between blankLineBeforeDocstring name and value #1768 (poslegm)
- Documentation improvements #1767 (poslegm)
- Router bugfix: extend line break past infix for any block #1766 (kitbellew)
- #1627 [01]: ScalafmtConfig: flag to ignore input line breaks #1765 (kitbellew)
- Minor refactoring to prepare for #1627 #1764 (kitbellew)
- Router: remove currently unused comma split #1763 (kitbellew)
- Fixed AST changes after formatting variant types with symbolic name #1762 (poslegm)
- DanglingParentheses: move
exclude
list from VerticalMultiline #1761 (kitbellew) - Router: fix #1749, conflict with #1755 #1760 (kitbellew)
- Alignment by right-side expression #1759 (poslegm)
- Router: handle implicit in non-vertical-multiline #1749 (kitbellew)
- VerticalMultiline: check config style #1696 (kitbellew)
v2.4.2 (2020-02-22)
Merged pull requests:
- BestFirstSearch: if failed without a solution, retry without optimization #1731 (kitbellew)
- Release Drafter workflow #1730 (poslegm)
- BestFirstSearch: don't give up too soon #1729 (kitbellew)
- Various cleanup and refactoring changes in BestFirstSearch #1728 (kitbellew)
- Dummy parameter against github caches #1727 (poslegm)
- GraalVM to 20.0.0 #1726 (poslegm)
- Documentation: describe a few important parameters #1725 (kitbellew)
- FormatOps: extract methods to get func/case arrow #1724 (kitbellew)
- RedundantBraces: add parensForOneLineApply flag #1723 (kitbellew)
- Router bugfix: find the correct lambda right arrow #1719 (kitbellew)
- FormatWriter: don't rewrite {} => () in assignment #1715 (kitbellew)
- Update scalafmt-core to 2.4.1 #1713 (scala-steward)
- TreeOps: structure the details of defns or calls #1710 (kitbellew)
v2.4.1 (2020-02-16)
Merged pull requests:
- FormatWriter: {} => (): don't rewrite some lambdas #1709 (kitbellew)
- Update scalafmt-core to 2.4.0 #1706 (scala-steward)
v2.4.0 (2020-02-15)
Merged pull requests:
- Trailing commas bugfix: can't have trailing comma in
preserve
without a break #1705 (kitbellew) - A couple of bugfixes in handling of first arg after "(" #1701 (kitbellew)
- Various cleanup and refactor changes #1700 (kitbellew)
- Update metaconfig-core, ... to 0.9.8 #1699 (scala-steward)
- Tests: determine test's location, provide to Intellij #1698 (kitbellew)
- MUnit reverted to ScalaTest #1697 (poslegm)
- Update sbt-scalajs-crossproject to 1.0.0 #1695 (scala-steward)
- Update metaconfig-core, ... to 0.9.7 #1694 (scala-steward)
- Update metaconfig-core, ... to 0.9.6 #1693 (scala-steward)
- Resource folder path resolution from classloader #1692 (poslegm)
- Policy: add apply() with partial func in 2nd group #1691 (kitbellew)
- Router: minor refactor for align vars in apply #1690 (kitbellew)
- Router: extract simple T.Dot patterns before chain #1689 (kitbellew)
- TreeOps: find a parent, avoid getting all parents #1688 (kitbellew)
- Update munit to 0.4.5 #1687 (scala-steward)
- Self formatting with 2.4.0-RC2 #1686 (poslegm)
- ScalaTest -> MUnit #1681 (poslegm)
v2.4.0-RC2 (2020-02-09)
Merged pull requests:
- Update metaconfig-core, ... to 0.9.5 #1685 (scala-steward)
- Update sbt-ci-release to 1.5.2 #1684 (scala-steward)
- Update sbt-mima-plugin to 0.6.4 #1683 (scala-steward)
- Update scalatags to 0.8.5 #1680 (scala-steward)
- RewriteTrailingCommas: trivial, remove duplicate #1679 (kitbellew)
- Rewrites: traverse tree once, applying all rules #1677 (kitbellew)
- Update sbt-scalajs to 1.0.0 #1676 (scala-steward)
- Scalafmt is supported by format-all for emacs #1675 (sideshowcoder)
- ScalafmtConfig: clean up unused code, move some to tests #1674 (kitbellew)
- ScalafmtConfig bugfix: read align tokens as seq, not set #1673 (kitbellew)
- Update sbt to 1.3.8 #1672 (scala-steward)
- Trailing commas: add a rewrite rule, remove first #1669 (kitbellew)
- Router: treat single-arg lambda of init like apply #1666 (kitbellew)
- RedundantParens: rewrite single-arg apply of block #1665 (kitbellew)
- RedundantBraces: use () for {} one-line lambdas #1663 (kitbellew)
- RedundantBraces: update method body rewrite rules #1662 (kitbellew)
- Minor improvements to split, decision and policy logic #1661 (kitbellew)
- Router: allow single-line curly lambdas #1660 (kitbellew)
v2.4.0-RC1 (2020-01-30)
Merged pull requests:
- Update sbt-native-packager to 1.6.1 #1658 (scala-steward)
- Update sbt-scalafmt to 2.3.1 #1657 (scala-steward)
- Enable to download and run snapshot version from dynamic #1656 (tanishiking)
- Scalafmt bugfix: restore .format signatures while passing filename #1654 (kitbellew)
- Router bugfix: break on else, indent for block within case #1652 (kitbellew)
- Policy: always pass sourcecode.Line implicitly #1651 (kitbellew)
- Update interface to 0.0.17 #1650 (scala-steward)
- SortModifiers: Use .syntax on tokens, not tree #1649 (kitbellew)
- State/FormatWriter: various optimizations and simplifications #1647 (kitbellew)
- Update sbt-scalajs to 0.6.32 #1642 (scala-steward)
- Update sbt-mdoc to 2.1.1 #1621 (scala-steward)
- Update paradise to 2.1.1 #1620 (scala-steward)
v2.3.3-RC2 (2020-01-22)
Merged pull requests:
- Update sbt-native-packager to 1.6.0 #1641 (scala-steward)
- Update scalatags to 0.8.4 #1636 (scala-steward)
- RedundantBraces: fix various bugs with general expressions #1635 (kitbellew)
- Update sbt to 1.3.7 #1634 (scala-steward)
- Add headers for each individual editor that Metals supports. #1629 (olafurpg)
- FormatOps: check "new anonymous" in infix indent #1626 (kitbellew)
- Rewrite: rewrite patchsets unless any is no-format #1625 (kitbellew)
- Router bugfix: improve optimal token for assign #1623 (kitbellew)
- Update scalatags to 0.8.3 #1619 (scala-steward)
- add in a bit of documentation about Metals #1617 (ckipp01)
v2.3.3-RC1 (2020-01-08)
Merged pull requests:
- Don't silence stdout when it is the only output #1622 (sideshowcoder)
- Some performance optimizations for FormatToken #1616 (kitbellew)
- Various refactoring and simplification commits #1615 (kitbellew)
- Router bugfix: keep single-line comment split #1614 (kitbellew)
- Update sbt-ci-release to 1.5.0 #1613 (scala-steward)
- Various bugfixes for single-arg apply of a lambda #1612 (kitbellew)
- Update sbt-mdoc to 2.1.0 #1611 (scala-steward)
- Update sbt to 1.3.6 #1610 (scala-steward)
- FormatOps: allow break after assign in infixSplit #1608 (kitbellew)
- FormatOps: consider comment for RHS optimal token #1604 (kitbellew)
- Update scalacheck to 1.14.3 #1602 (scala-steward)
- Update sbt to 1.3.5 #1601 (scala-steward)
- Router: dangle only if breaking in multi-line lambda #1600 (kitbellew)
- Update sbt-native-packager to 1.5.2 #1598 (scala-steward)
- Update scalafmt-core to 2.3.2 #1597 (scala-steward)
- Update sbt-scalafmt to 2.3.0 #1596 (scala-steward)
- Upgrade to Scalatest 3.1 #1595 (olafurpg)
- Router: preserve single-line formatting for if/try #1560 (kitbellew)
v2.3.2 (2019-12-08)
Merged pull requests:
- Do not add a new line in multilevel chained package clause #1594 (iRevive)
- Update scalafmt-core to 2.3.1 #1590 (scala-steward)
- Update interface to 0.0.16 #1589 (scala-steward)
- adding possibility to specify custom repositories for coursier (#1521) #1586 (slivkamiro)
v2.3.1 (2019-12-06)
Merged pull requests:
v2.3.0 (2019-12-04)
Merged pull requests:
- Update sbt-mdoc to 2.0.3 #1585 (scala-steward)
- Update typesafe:config to 1.4.0 #1584 (scala-steward)
- Update sbt-jmh to 0.3.7 #1581 (scala-steward)
- Update paiges-core to 0.3.0 #1580 (scala-steward)
- Update sbt-mdoc to 2.0.2 #1579 (scala-steward)
- Update sbt-scalajs to 0.6.31 #1578 (scala-steward)
- Update sbt-scalajs-crossproject to 0.6.1 #1577 (scala-steward)
- Update sbt-coursier to 1.0.3 #1576 (scala-steward)
- Update interface to 0.0.14 #1575 (scala-steward)
- Update sbt-mima-plugin to 0.6.1 #1574 (scala-steward)
- Update typesafe:config to 1.3.4 #1573 (scala-steward)
- Update sbt-buildinfo to 0.9.0 #1572 (scala-steward)
- Update sbt-assembly to 0.14.10 #1571 (scala-steward)
- Add installation instructions for scalafmt-native. #1570 (olafurpg)
- Router: break between curly and catch, like else #1567 (kitbellew)
- Formatter upgraded to 2.3.0-RC1 #1566 (poslegm)
v2.3.0-RC2 (2019-11-27)
v2.3.0-RC1 (2019-11-27)
Merged pull requests:
- Upgrade to the latest Scalameta #1565 (olafurpg)
- Performance improvements #1564 (olafurpg)
- RedundantBraces: lambda braces to single-arg apply, remove arou… #1563 (kitbellew)
- Router: fix split rule after catch in try #1562 (kitbellew)
- Setup GitHub Actions to generate native images #1561 (olafurpg)
- Remove irregular files, including symbolic links, from
git ls-files
. #1559 (SamirTalwar) - Router: fix def body indent with a comment #1240 #1556 (kitbellew)
- FormatWriter: insert newline after packages #1069 #1555 (kitbellew)
- Router: treat try/finally the same as if/else #350 #1554 (kitbellew)
- Make it easier to test scalafmt local snapshot build #1552 (tanishiking)
- Router: format lambda in 1-arg call as with braces #1551 (kitbellew)
- RedundantBraces: remove nested braces in lambda #1549 (kitbellew)
- Revert avoidEmptyLinesAroundBlock feature #1548 (poslegm)
v2.2.2 (2019-10-29)
Merged pull requests:
- Discord label in README #1545 (poslegm)
- Edition docs fix #1544 (poslegm)
- Remove
avoidEmptyLinesAroundBlock
option #1541 (olafurpg) - sbt plugin version update #1537 (poslegm)
- Fix inconsistent spaces with verticalMultiline and spaces.inParentheses #1529 (sirmax)
- Avoid empty lines in the beginning and end of blocks #1431 (tdidriksen)
v2.2.1 (2019-10-21)
Merged pull requests:
- Do not add space between constructor parameters #1535 (tanishiking)
- Welcome Mikhail Chugunkov to the team! #1533 (olafurpg)
v2.2.0 (2019-10-17)
Merged pull requests:
v2.1.1 (2019-10-11)
Merged pull requests:
- Use Coursier defaults, which also adds support for COURSIER_REPOSITORIES #1524 (henricook)
- Insert newline for else keyword, fixes #1509. #1520 (olafurpg)
- Add a space between constructor annotations and their parameter lists #1516 (dominics)
v2.1.0 (2019-09-30)
Merged pull requests:
- Fixed bug with private[x] after class definitions (#1491) #1513 (poslegm)
- typo danglingParentheses #1508 (ilyakharlamov)
v2.1.0-RC2 (2019-09-26)
Merged pull requests:
- Use coursier/interface instead of coursier-small #1511 (olafurpg)
- With chains alignment for "new" with mixins #1503 (poslegm)
- Remove scalafmt-intellij #1500 (tanishiking)
- Update dependencies #1497 (tanishiking)
- Updated sbt plugin version on the website #1494 (poslegm)
- Fixed alwaysBeforeTopLevelStatements for modifiers #1489 (poslegm)
- Make comment blocks line up. #1488 (adampauls)
v2.1.0-RC1 (2019-08-25)
Merged pull requests:
- Add release-drafter.yml #1483 (tanishiking)
- Tweak a test that makes sure multiple exclude flags works as expected #1481 (tanishiking)
- Don't treat commas in lambda bodies as "trailing commas" #1479 (adampauls)
- Add --check cli option #1478 (droptheplot)
- Update ISSUE_TEMPLATE to current version support #1476 (anilkumarmyla)
- Update CHANGELOG #1475 (tanishiking)
- fix running with the diff branch file filter #1472 (stephennancekivell)
- Keep indentation for comments within method chain #1470 (droptheplot)
- Allow for multiple --exclude flags #1469 (sortega)
- fix include resolution for cli and sbt plugin #1450 (nadavwr)
- Fixed unindentTopLevelOperator behavior without indentOperator=spray #1440 (poslegm)
v2.0.1 (2019-08-12)
This release contains some new features and fixes for regressions. Full Changelog
New features
--list
option
When you want to check if your files are formatted, you can run scalafmt with the --list
flag. This will output a list of unformatted files if any.
$ scalafmt --list
if some of the files require re-formatting, scalafmt print the list of those files and return exit code 1.
src/main/scala/file1.scala
src/main/scala/file1.scala
Merged pull requests:
- Return exit code 1 for
scalafmt --list
if there are any files that require re-formatting #1474 (tanishiking) - dont uppercase long hex literal 0x prefix #1473 (stephennancekivell)
- Use openjdk8 instead of oraclejdk8 #1471 (tanishiking)
- do not cache for ever invalid configs #1467 (bjaglin)
- Add --list cli option #1459 #1466 (droptheplot)
- Update the release process document, and upgrade docusaurus #1452 (tanishiking)
- Update .gitignore for metals and bloop #1451 (tanishiking)
- Suppress cli output in case option was set #1449 (stremlenye)
- exclude dangling parens in methods with enabled verticalMultiline #1435 (darl)
- Prints out the paths of files subjected to formatting before the beginning of formatting in debug mode #1422 (stremlenye)
v2.0.0-RC8 (2019-06-06)
Merged pull requests:
- Fixed error with includeNoParensInSelectChains and full qualified names #1429 (poslegm)
- Fixed spaces.beforeContextBoundColon=IfMultipleBounds behavior for case with subtyping #1428 (poslegm)
- Fixed bug with RedundantBraces for string interpolation #1425 (poslegm)
- Remove space for variance annotations with underscore #1419 (vlovgr)
- Add the CLI option to fetch only recently changed files for formatting. #1416 (stremlenye)
- Use a simple cache based on futures to avoid redownloading on concurrent usage #1384 (jrudolph)
- Upgrade IntelliJ plugin #1381 (olafurpg)
- Upgrade to latest scalafmt. #1380 (olafurpg)
- Update changelog and document release process #1379 (olafurpg)
- Avoid newlines after yield keyword. #1378 (olafurpg)
- Update website for sbt-scalafmt 2.0.0-RC5 #1377 (tanishiking)
v2.0.0-RC6 (2019-04-04)
Merged pull requests:
- Add flags to support apache/spark style of configuration #1395 (lihaoyi-databricks)
- Update changelog and document release process #1379 (olafurpg)
- Avoid newlines after yield keyword. #1378 (olafurpg)
v2.0.0-RC5 (2019-02-28)
Merged pull requests:
- Indent Operator Fix #1372 (er1c)
- Indent Operator Tests #1371 (er1c)
- 1344 api changes to integrate with intellij #1368 (unkarjedy)
- Make scalafmt-cli to use scalafmt-dynamic module instead of depending only on a specific version of scalafmt-core. #1366 (tanishiking)
- Minor tweak for java11 .lines not getting picked up via StringOps in scala-dynamic testfile DynamicSuite.scala #1365 (er1c)
- Welcome Rikito Taniguchi to the team! #1363 (olafurpg)
- Make ScalafmtReflect format any files if respectProjectFilters=false #1361 (tanishiking)
- sbt #1359 (dwijnand)
- GitHub #1358 (dwijnand)
- No more extempore2 #1357 (dwijnand)
- Fix a typo #1356 (dwijnand)
- Switch to non-legacy align = more #1355 (dwijnand)
- Switch from bintray to sonatype snapshots #1354 (dwijnand)
- Justify discouraging format on compile #1353 (dwijnand)
- Clarify scalafmtConfig's default vs None #1352 (dwijnand)
- Fix sbt plugin Maven Central badge #1350 (dwijnand)
- Update Coursier CLI link #1348 (er1c)
- Added Arch Linux installation instruction on website #1347 (poslegm)
v2.0.0-RC4 (2019-01-07)
Merged pull requests:
v2.0.0-RC3 (2019-01-07)
Merged pull requests:
v2.0.0-RC2 (2019-01-07)
Merged pull requests:
- Change publish organization to org.scalameta from com.geirsson #1339 (olafurpg)
- Add release notes for v2.0 #1338 (olafurpg)
v2.0.0-RC1 (2019-01-07)
Merged pull requests:
- Add scalafmt-dynamic module for easier build tool integrations. #1337 (olafurpg)
- Type Annotation Site indentation same as Definition Site #1336 (AesaKamar)
- Fix the mysterious case of missing newline at end of file. #1333 (olafurpg)
- Expand on the align=none protip #1331 (dwijnand)
- Fix broken links README #1330 (glammers1)
- Add Continuation Indentation for Type Annotation Site #1324 (AesaKamar)
- avoid generating invalid scala code #1323 (woparry)
- Update sbt plugin docs #1322 (cb372)
- Preferences changed to Settings. #1319 (P3trur0)
- Clarify "use intellij formatter" #1315 (olafurpg)
- Update docs to clarify installation #1314 (olafurpg)
- Add includeNoParensInSelectChains #1310 (nkouevda)
- Fix configuration example for continuationIndent.callSite in document #1308 (tanishiking)
- add JDK 11 to Travis-CI matrix #1304 (SethTisue)
- Enable sbt-idea-plugin in intellij project #1301 (olafurpg)
- Add test for preserving location of comment when removing trailing comma #1296 (tanishiking)
- Upgrade mdoc and generate docs in PRs #1295 (olafurpg)
- Upgrade scala to 2.12.7 #1294 (aaabramov)
- Add test for https://github.com/scalameta/scalafmt/issues/1176 #1287 (tanishiking)
- Revert fix for unindentTopLevelOperators, acknowledge limitation instead #1286 (olafurpg)
- Add explicit dependency on org.scala-lang/scala-reflect #1284 (tanishiking)
- Scalameta 4.0.0 #1283 (eed3si9n)
- Bring back the docs for sbt-scalafmt #1277 (tanishiking)
- Fix quote in homepage #1276 (gabro)
- Upgrade to sbt-docusaurus v0.2 #1275 (olafurpg)
- Enable search in website #1274 (gabro)
- Use sbt-docusaurus 0.1.2 #1273 (gabro)
- Publish website with CI #1271 (gabro)
- Add website landing page #1270 (gabro)
- Enable builds under GraalVM #1266 (ssaavedra)
- Fix trailing commas always/never not to put/delete trailing comma on incorrect location #1262 (tanishiking)
- Fix jvm options #1261 (jiminhsieh)
- Vertical align adjacent single lines of comment #1260 (tanishiking)
- Cleanup empty parentheses check #1258 (gabro)
- Add ignore and allElementsOf to AvoidInfix #1257 (joan38)
- Update Adopters.scala #1253 (alodavi)
- Fix the typos detected by github.com/client9/misspell #1251 (seratch)
- Simplify build #1250 (olafurpg)
- Add codacy to adopters list #1248 (bmbferreira)
- Upgrade sbt to 1.2.0 #1247 (tanishiking)
- Fix combination of trailingCommas=always and verticalMultilineAtDefnSite=true #1241 (tanishiking)
- Fix invalid rewrite of trailingCommas=always #1239 (tanishiking)
- Add blurb about comment wrapping #1235 (calebharris)
- Move website to markdown + docusaurus #1199 (gabro)
v1.6.0-RC4 (2018-07-09)
Merged pull requests:
- Fix trailing comma handling when followed by indentation-free comment #1230 (gabro)
- Add foursquare to adopters list #1229 (iantabolt)
- Upgrade metaconfig #1226 (olafurpg)
v1.6.0-RC3 (2018-06-10)
Merged pull requests:
v1.6.0-RC2 (2018-06-05)
Merged pull requests:
- Support
align.tokens={none,some,more,most}
#1215 (olafurpg) - Change default to
trailingCommas = never
#1214 (olafurpg) - Avoid lookup up match for non-Token.Left{Brace,Paren} #1213 (olafurpg)
- Re-add fromHoconString overload to please neo-scalafmt #1212 (olafurpg)
- Don't crash on isWindows check, fixes #1207 #1211 (olafurpg)
v1.6.0-RC1 (2018-05-27)
Merged pull requests:
- Upgrade to the latest metaconfig #1145 (olafurpg)
- Enable dangling parentheses and disable align.openParen by default #1198 (olafurpg)
- Unskip trailing commas tests, fixes #1174 #1197 (olafurpg)
- Indent commas in val patterns by continuationIndent.defnSite #1192 (olafurpg)
- Indent body of vals when unindentTopLevelOperators=true. #1191 (olafurpg)
- Clean up handling of exit codes in the cli #1189 (olafurpg)
- Add option spaces.afterSymbolicDefs #1188 (slavaschmidt)
- Force blocks in try / finally to format on multiple lines #1187 (slavaschmidt)
- Print out unified diff on --test failure. #1186 (olafurpg)
- Pretty-print parse error more nicely. #1185 (olafurpg)
- Add support to force upper/lower case literal suffixes #1183 (olafurpg)
- Fix indent for nested infix operators #1181 (olafurpg)
- Fix 3 bugs #1180 (olafurpg)
- Disable inline modifier by default. #1179 (olafurpg)
- Include more information on "error due to bug" failure #1178 (olafurpg)
- Add more examples for standalone library usage #1177 (olafurpg)
- Add repro for #1033. #1175 (olafurpg)
- Add trailingCommas option #1174 (gabro)
- Upgrade to Scalameta v3.7 #1170 (olafurpg)
- Allow with-chain wrapping for all params #1125 #1169 (iantabolt)
- updated maven settings #1165 (jozic)
- Add section about scalafmt support in mill #1164 (rockjam)
- Render the used config values as part of formatting examples #1163 (mads-hartmann)
- Remove obsolete warning #1162 (jbgi)
- Update Configuration.scalatex #1160 (jozic)
- Add size to AvoidInfix #1159 (joan38)
- Disable redundantBraces.generalExpressions by default. #1157 (olafurpg)
- Fix the full-width example styling #1156 (mads-hartmann)
- Reorganise the documentation for configuration options #1155 (mads-hartmann)
- Make it configurable when to exclude dangling parens for vertical #1154 (mads-hartmann)
v1.5.1 (2018-04-26)
Merged pull requests:
- SortModifiers rewrite fixes + doc prettifying #1153 (lorandszakacs)
v1.5.0 (2018-04-23)
Merged pull requests:
- Style the page using the colors from the scalameta logo #1144 (mads-hartmann)
- Add verticalMultilineAtDefinitionSiteArityThreshold setting #1143 (mads-hartmann)
- Implement SortModifiers rewrite rule #1140 (lorandszakacs)
- Configuration doc fix #1139 (mattkohl)
- Make sbt-scalafmt incremental #1136 (vovapolu)
- Example for new sbt plugin #1135 (vovapolu)
- Add configuration to disable newlines between multiline defs #1134 (iantabolt)
- Generalize with-chain wrapping for defs and type definitions #1132 (iantabolt)
- Correct Homebrew installation terminology #1121 (srstevenson)
- Fix #1116, insert space in type projection when selecting symbolic members #1117 (olafurpg)
- Fix documentation #1114 (jiminhsieh)
- Ensure RedundantParens only removes matching parens - fixes #1111 #1112 (bcarl)
- Fix openParenDefnSite docs #1108 (lorandszakacs)
- Adds support for formatting .sc files using sbt options. #1107 (lloydmeta)
- Include ZSH tab-completion file to bin/_scalafmt #1105 (propensive)
- Support trailing commas in sbt files #1103 (dwijnand)
- Add section on align.openParenDefnSite #1102 (lorandszakacs)
- Add optIn.blankLineBeforeDocstring setting #1101 (olafurpg)
- Remove redundant braces from if-else and case expressions #1122 (japgolly)
v1.4.0 (2017-12-18)
Merged pull requests:
- Add an "original code" section the issue template #1092 (dwijnand)
- Fix version number in website and document pre-release. #1089 (olafurpg)
- Add -r bintray:scalameta/maven to Coursier install commands #1088 (lloydmeta)
- Use - instead of + in snapshot versions #1082 (olafurpg)
- Point to a correct project on scaladex #1071 (alenkacz)
- Bump dependencies versions #1070 (loskutov)
- Add Mendix to the list of adopters #1066 (nerush)
- Document that RedundantBraces may cause non-idempotent formatting. #1057 (olafurpg)
- Empty input with
--diff
and--stdin
is okay #1093 (yln) - Introduce "default", "akka" and "akka-http" as IndentOperator config #1090 (daddykotex)
- Fix file not found errors when running from a subdirectory w/ project.git = true #1087 (lloydmeta)
- New scalafmt sbt plugin #1085 (vovapolu)
- No space in by-name params #1079 (vovapolu)
v1.3.0 (2017-09-24)
Merged pull requests:
- add missing wonderbar to the optIn.breakChainOnFirstMethodDot code examples #1046 (esarbe)
- Disabling alignment helps minimizing git diffs #1045 (nightscape)
- Add http4s to adopters list #1036 (aeons)
- Repository transfer scmInfo: olafurpg => scalameta #1034 (MasseGuillaume)
- Fix new GitOpsTest on OSX #1030 (olafurpg)
- Use the encoding option when writing files, too. #1053 (alexdupre)
- AsciiSortImports is now incompatible with ExpandImportSelectors. Fixes #1024 #1048 (Lasering)
- Add optIn.breaksInsideChains = true #1037 (olafurpg)
- Git testing framework and fix for some git-file-fetching issues #1028 (pjrt)
- Return non-zero exit code in ./scalafmt if no files match filter #1025 (yln)
v1.2.0 (2017-08-11)
Merged pull requests:
- Tweak Coursier installation instructions #1011 (dwijnand)
- [typo] bin.packParentConstructors => binPack.parentConstructors #1009 (ronanM)
- Enable mima binary checks in CI. #1017 (olafurpg)
- Hacky hacks to fix off-by-two errors #1016 (olafurpg)
- Update to sbt 1.0.0 #1015 (olafurpg)
- Fail fast on invalid .scalafmt.conf when running with no args. #1014 (olafurpg)
- Use the VCS root as a potential config path in the IntelliJ plugin #1007 (stuhood)
- Implement option for discarding whitespace between a keyword and left-paren #998 (nrinaudo)
- Add support for inserting a line break between a curly if and an else. #996 (nrinaudo)
v1.1.0 (2017-07-09)
Merged pull requests:
- Update Adopters.scala #992 (cwbeck)
- fix for jvmopts and enabling no-stderr by default if possible #987 (muxanick)
- Re-enable appveyor #986 (olafurpg)
- Adding of --no-stderr option #985 (muxanick)
- Add optIn.selfAnnotationNewline, fixes #938 #983 (olafurpg)
- Fix off-by-one error, #976. #982 (olafurpg)
- Document removal of bestEffortInDeeplyNestedCode. #980 (olafurpg)
- Use lenient dialect by default #979 (olafurpg)
v1.0.0-RC4 (2017-06-17)
v1.0.0 (2017-06-17)
v1.0.0-RC3 (2017-06-14)
Merged pull requests:
v1.0.0-RC2 (2017-06-08)
Merged pull requests:
- Re-enable auto-publish on merge into master. #968 (olafurpg)
- Enable alignment on case arrows by default #964 (olafurpg)
- Remove outdated contributing tutorial. #963 (olafurpg)
- Fix #960 and #927: Oddness with git and non-root #961 (pjrt)
- Topic/#933 #959 (Daxten)
- Break line if def equals is at columns + 1 #957 (aeons)
- #916 Add option to space context bounds only when multiple. ReaderUti… #956 (hejfelix)
- Replace
./scalafmt
withscalafmt
#954 (amirkarimi) - Enable optIn.annotationNewlines = true by default, fixes #942 #953 (olafurpg)
- Bump build dependencies #952 (olafurpg)
- Exclude scalapb from runtime, fixes #944 #951 (olafurpg)
- Enable Travis CI #947 (olafurpg)
v1.0.0-RC1 (2017-05-26)
Merged pull requests:
- Upgrade to non-broken metaconfig release. #946 (olafurpg)
- documentation fix #945 (nadavwr)
- Remake the CLI interface #939 (pjrt)
- Invite Paul Draper to the team and document neo-sbt-scalafmt! #926 (olafurpg)
- Cleanup before v1.0, fixes #918 #921 (olafurpg)
- Fix #911 #920 (olafurpg)
- Remove enclosing parens in avoidinfix , closes #851 #919 (otolabqu)
- Add support for auto-binpacking of argument lists with idents only #910 (olafurpg)
- Fix coordinates for scalafmt-bootstrap #908 (nightscape)
- Update docs. #906 (olafurpg)
- Remove homebrew. #905 (olafurpg)
v0.7.0-RC1 (2017-04-23)
Merged pull requests:
- Multiline top level statement, addresses #893 #904 (olafurpg)
- Fix #735. newlines before and after implicit keyword #903 (sugakandrey)
- Make build green again on appveyor and IntelliJ #902 (olafurpg)
- Fix AvoidInfix for methods with empty parameters list #901 (sugakandrey)
- Port core to Scala.js #898 (olafurpg)
- Migrate to sbt 1.0.0-M5 for sbt-scalafmt. #896 (olafurpg)
- Fix #883. #887 (olafurpg)
- Upgrade dependencies #885 (olafurpg)
- Fix #880, filter diff files with canFormat #881 (caoilte)
v0.6.8 (2017-04-06)
Merged pull requests:
v0.6.7 (2017-04-05)
Merged pull requests:
- Publish to bintray #870 (olafurpg)
- Clean up repo. #869 (olafurpg)
- Document random stuff in CONTRIBUTING.md #868 (olafurpg)
- Implement #863: vertical-multiline for type params #864 (pjrt)
- Fix #799 Allow ASCII sorting of imports #860 (pjrt)
- Fix #808: newlines after curly lambda #859 (pjrt)
- Fix appveyor again #858 (olafurpg)
- Remove unused statement #857 (ocadaruma)
- Updated latest_version in scalafmt_auto #856 (jupblb)
- Fix appveyor #855 (olafurpg)
- Fix #736: Make verticalMultiline apply to classes too #854 (pjrt)
- fix readme.md #852 (xuwei-k)
v0.6.6 (2017-03-20)
Merged pull requests:
- Switch to coursier 1.0.0-M15-5 #846 (alexarchambault)
v0.6.5 (2017-03-18)
Merged pull requests:
- Bootstrap should resolve with lock retry #838 (stephennancekivell)
v0.6.4 (2017-03-14)
Merged pull requests:
v0.6.3 (2017-03-13)
Merged pull requests:
- Update appveyor #826 (olafurpg)
- Fix spaces.inParens for brackets #825 (olafurpg)
- Update badges #824 (olafurpg)
- Clean up home dir and drone build steps. #823 (olafurpg)
- Upgrade to drone v0.5 #821 (olafurpg)
- fix mainClass not found error on windows machine (that comment makes … #819 (Daxten)
- Fix issue #816: Makes verticalMultilineDefnSite respect continuationIndent.defnSite #829 (pjrt)
- Topic/newlines_annotations #806 #820 (Daxten)
- Fix #780, add spaces in parens flag #818 (olafurpg)
- Don't resolve from ivy2local in ScalafmtBootstrap. #817 (olafurpg)
- Fix newlines.alwaysBeforeTopLevelStatements doc #804 (dwijnand)
- Fix #798. #803 (olafurpg)
- Fix #800. #801 (olafurpg)
- [WIP] fix for #774; no newline after comments #797 (Daxten)
v0.6.2 (2017-03-07)
v0.6.1 (2017-03-06)
v0.6.0 (2017-03-06)
Merged pull requests:
- s/precommit/pre-commit #795 (xuwei-k)
- Cross-build to 2.12 #794 (olafurpg)
- Fix #535 #793 (olafurpg)
- Validate rewrite rule combination, fixes #775 #792 (olafurpg)
- Clean up docstrings and ScalafmtConfig, fixes #586 #791 (olafurpg)
- Fix #728, infix indent for :: #790 (olafurpg)
- Fix #699, exclude excluded files in format-on-save in IntelliJ #789 (olafurpg)
- Fix #694, support encoding configuration. UTF-8 is default. #788 (olafurpg)
- Fix #741, unified spark colon for def/val #787 (olafurpg)
- Fix #590, indent by 2 spaces for = // #786 (olafurpg)
- Fix #747, respect align settings even for tuples #785 (olafurpg)
- Fix #748 #784 (olafurpg)
- Fix #753, add support for custom error message for --test via .scalafmt.conf #783 (olafurpg)
- Fix #745, handle config style + forced bin packing #782 (olafurpg)
- Guard against tests that have ONLY in CI #781 (olafurpg)
- Fix #756 #779 (olafurpg)
- Improve performance of State.next by reusing syntax instance #776 (rorygraves)
- Handle comment breaking wrapping #773 (dwijnand)
- Simplify build so
sbt test
"just works" #760 (olafurpg) - Polish infix indentation around assignment. #740 (olafurpg)
v0.5.8 (2017-03-03)
Merged pull requests:
- #763 Fix Varargs expansion shouldn't be split #772 (tgodzik)
- Make sure to always resolve HOCON config #771 (dwijnand)
- #759 filter out deleted files on --diff #770 (tgodzik)
- Fix vertical alignment on last block of file #769 (dwijnand)
- Generalise and structure the issue template #766 (dwijnand)
- Clarify config values & examples some #761 (dwijnand)
- fix isTopLevelStatement for edge-cases #750 (Daxten)
- #739: AvoidInfix Bug #749 (ysusuk)
- Upgrade to meta 1.6 #746 (olafurpg)
- Remove 'HEAD' from git diff, to include all uncommitted changes aswell #742 (bjornj12)
- Fix #731: empty-param group with vertical style #734 (pjrt)
- Add flag for newline before toplevel statements #733 (Daxten)
- #726: unimport is not respected #729 (ysusuk)
v0.5.7 (2017-02-24)
Merged pull requests:
v0.5.6 (2017-02-08)
Merged pull requests:
- #709: Feature request: AvoidInfix rewrite #715 (ysusuk)
- Fix #710: Extra space added for unary operations #714 (pjrt)
- Add Iurii Susuk to the team! #713 (olafurpg)
- #706: Migrate to scalafix patches #712 (ysusuk)
- Another fix for
verticalMultilineAtDefinitionSite
#711 (pjrt) - Fix #672, edge case with inline comment #708 (olafurpg)
v0.5.5 (2017-02-01)
Merged pull requests:
- #690: Support check for "redundant enclosing brace" in string interpo... #703 (ysusuk)
- Add new "Team" section in readme #702 (olafurpg)
- Fix issue on verticalMultilineAtDefinitionSite #700 (pjrt)
v0.5.4 (2017-01-26)
Merged pull requests:
- Fix #697, unary operator to symbolic ident #698 (olafurpg)
- Adds a new style for function defs #682 (pjrt)
v0.5.3 (2017-01-24)
v0.5.3-RC1 (2017-01-23)
Merged pull requests:
v0.5.2 (2017-01-22)
Merged pull requests:
- Fix #677 #688 (olafurpg)
- Fix #671 #687 (olafurpg)
- 679 #686 (olafurpg)
- Fix #661 #685 (olafurpg)
- Resolve config #681 (avdv)
- New ContinuationIndent: extendSite #678 (pjrt)
- fix Patch insideRange #675 (MasseGuillaume)
- #657: New rewrite: expand import selectors #674 (ysusuk)
- #660: Feature request: configurable spaces around infix types #669 (ysusuk)
- Update ln numbers and output in Tutorial #666 (ysusuk)
- Remove extra newline from stdout #665 (dguo-coursera)
- Add --fallback-mode flag to cli #659 (olafurpg)
v0.5.2-RC1 (2016-12-28)
Merged pull requests:
- Ditch synthetic project in favor of coursier. #658 (olafurpg)
- Fixes #399 - Automate IntelliJ Plugin Update #655 (rbellamy)
- Fix #607. #651 (olafurpg)
- Make nested path exclusions working on Windows #648 (mpociecha)
- Fix links to Tutorial.md #647 (mpociecha)
- Setup AppVeyor #645 (olafurpg)
- Christmas cleaning #643 (olafurpg)
- Fix path separators and line endings to make most of tests passing on Windows #642 (mpociecha)
v0.5.1 (2016-12-23)
Merged pull requests:
v0.5.0 (2016-12-23)
v0.5.0-RC4 (2016-12-21)
Merged pull requests:
- Fix idempotency regression from #629 #631 (olafurpg)
- Improve builds in IntelliJ and on Windows #630 (mpociecha)
v0.5.0-RC3 (2016-12-20)
Merged pull requests:
- Automatically bin pack for argument lists of literals. #629 (olafurpg)
- add maven version badge to readme #628 (emanresusername)
- Fewer search state exploded. #626 (olafurpg)
- Improve search state for reactjs style DSLs. Fixes #458 #622 (olafurpg)
- Add runner.optimizer.forceConfig... flag. #621 (olafurpg)
- Add config-str flag, fixes #617 #620 (olafurpg)
- fixing regex for latest version #619 (sudev)
v0.5.0-RC2 (2016-12-18)
Merged pull requests:
v0.5.0-RC1 (2016-12-18)
Merged pull requests:
- Prepare for 0.5 release. #613 (olafurpg)
- Support intellij style + config style arg, fixes #593. #612 (olafurpg)
- Bump penalty for select chains of length 1. #611 (olafurpg)
- Revive the sbt plugin #610 (olafurpg)
- Fix Linux installation command #602 (felixmulder)
- Remove SBT plugin, see #597. #598 (olafurpg)
- Add newlines.neverInDanglingParenthesesSingleLineArgList, fixes #593 #595 (olafurpg)
- Add indentYieldKeyword setting, fixes #592. #594 (olafurpg)
v0.4.10 (2016-11-10)
Merged pull requests:
- Fix #583. Avoid try to format dirs #584 (andreaTP)
- Remove redundant braces in enumerator guard conditions #578 (ShaneDelmore)
v0.4.9 (2016-11-04)
Merged pull requests:
- Create bootstrap script, towards #571. #577 (olafurpg)
- /usr/bin/env #575 (MasseGuillaume)
- More configurable metaconfig #570 (olafurpg)
- Issue 457 long imports #567 (mtomko)
- Add info about Arch Linux package #565 (RatanRSur)
- Update IDEA plugin #562 (olafurpg)
- Fix scalafmt_auto script. #559 (olafurpg)
v0.4.8 (2016-10-25)
Merged pull requests:
- Add flag: newlines.neverInResultType. Fixes #496 #555 (olafurpg)
- Replace java.io.File with custom AbsoluteFile. #554 (olafurpg)
- Handle Pat.Interpolate, fixes #512 #550 (olafurpg)
- Infix applications to count towards valign depth, fixes #531 #549 (olafurpg)
- Use constant instead of strings and remove useless statement in SBT #548 (joan38)
- Move Settings at project level #544 (joan38)
- Fix broken test. #539 (olafurpg)
- Format on save and update the notification system #534 (joan38)
- WIP Break select chain on curly braces #532 (olafurpg)
- Allow --config to be absolute path #528 (olafurpg)
v0.4.7 (2016-10-17)
Merged pull requests:
- Skip RedundantBraces rewrite on term.function #526 (olafurpg)
- Only align tokens with same distance to root node. #525 (olafurpg)
- Expose --assume-filename flag in CLI #524 (olafurpg)
- Swallow stderr when running gitops #523 (olafurpg)
v0.4.6 (2016-10-11)
Merged pull requests:
v0.4.5 (2016-10-10)
Merged pull requests:
- Fix --config flag #508 (olafurpg)
- Add indent for Term.Assign, fixes #506 #507 (olafurpg)
- Add syntax align.tokens.add = [foobar] #499 (olafurpg)
- 486 #498 (olafurpg)
v0.4.4 (2016-10-07)
Merged pull requests:
- Add scala-reflect back, fixes #492. #495 (olafurpg)
- Distinction between Import braces and string interpolation braces #424 #454 (hasumedic)
v0.4.3 (2016-10-05)
Merged pull requests:
- Port macros to inline meta #491 (cb372)
- Produce clearer error messages for config typos in tests. #489 (olafurpg)
- Display error message on configuration error in IntelliJ plugin #484 (phalodi)
- New rewrite rule for replacing parens with braces in for expressions #483 (caoilte)
- Fix for https://github.com/olafurpg/scalafmt/issues/478 #482 (caoilte)
- Created a scalafmt shell script to bootstrap usage #359 (hntd187)
v0.4.2 (2016-09-28)
Merged pull requests:
v0.4.1 (2016-09-27)
v0.4.0 (2016-09-27)
Merged pull requests:
- Remove redundant braces and no other tokens! #471 (olafurpg)
- Add note on how to build the docs. #469 (johnynek)
- The great refactoring. #468 (olafurpg)
- Add support for dynamic configuration, fixes #315 #464 (olafurpg)
- Semantics preserving rewrites before formatting. #447 (olafurpg)
0.4 (2016-09-23)
Merged pull requests:
- Move configuration to HOCON #459 (olafurpg)
- Bump scala.meta version to 1.1.0 #452 (olafurpg)
- #356 Code with windows line endings after formatting still has windows endings #445 (mmatloka)
v0.3.2-RC4 (2016-09-14)
v0.3.2-RC3 (2016-09-14)
v0.3.2-RC1 (2016-09-14)
v0.3.2-RC2 (2016-09-14)
Merged pull requests:
- Add support to align by tokens that have no space before them #441 (olafurpg)
- Add style config to keep new lines on chained method calls #440 (melrief)
- Option to put a newline to be put before the parameters of a lambda #439 (stefanobaghino)
- Exclude files with a CLI option #437 (stefanobaghino)
- align %%% in defaultWithAlign #436 (melrief)
- Add adopter: Teralytics #433 (stefanobaghino)
- Update Adopters.scala #430 (easel)
- Fix #417 #429 (olafurpg)
- Add letgo to adopters #428 (GMadorell)
- Update Adopters.scala #426 (RomanIakovlev)
v0.3.1 (2016-08-24)
Merged pull requests:
- Add hidden poorMansTrailingCommasInConfigStyle flag for fun #412 (olafurpg)
- Format sbt files #411 (olafurpg)
- Treat Pat.ExtractInfix like Term.ApplyInfix. Fixes #408 #409 (olafurpg)
- Make SBT plugin pick up .sbt files #407 (mdedetrich)
v0.3.0 (2016-08-17)
Merged pull requests:
v0.3.0-RC1 (2016-08-13)
Merged pull requests:
- Format sbt files, fixes #378 #402 (olafurpg)
- 0.3.0 rc1 #401 (olafurpg)
- Scalameta 1.0 #395 (olafurpg)
- Don't force break before self annotation, fixes #376 #391 (olafurpg)
- Consolidate type compounds and parent constructor handling, fixes #370 #390 (olafurpg)
- Allow limited mixed owner alignment, fixes #184 #389 (olafurpg)
- Allow _ as identifier before apply, fixes #375 #388 (olafurpg)
- Depend on scala-library in sbt plugin, fixes #190 #374 (olafurpg)
v0.2.12 (2016-08-05)
Merged pull requests:
- Increase control over infix operator indentation, fixes #367. #372 (olafurpg)
- Add spaceBeforeContextBoundColon option #369 (triggerNZ)
- Updated sbt-assembly to 0.14.3 #361 (VEINHORN)
- Fix indent expire token for lambdas, towards #357 #358 (olafurpg)
v0.2.11 (2016-07-08)
v0.2.10 (2016-06-30)
v0.2.9 (2016-06-30)
Merged pull requests:
v0.2.8 (2016-06-23)
v0.2.7 (2016-06-23)
v0.2.6 (2016-06-22)
Merged pull requests:
- Allow NoSplit in config style in case of single line policy #335 (olafurpg)
- Depenalize line breaks inside {}, fixes #318 #333 (olafurpg)
- Remove "bad files" from mega test, fixes #280 #332 (olafurpg)
- No newline between = {, fixes #328. #329 (olafurpg)
- No space before Decl.Type, fixes #288 #328 (olafurpg)
- Fail fast instead of best-effort formatting #326 (olafurpg)
- Add macro benchmark. #320 (olafurpg)
- Correct all other mentions of "paretheses" #314 (i-am-the-slime)
- Typo in parentheses #313 (i-am-the-slime)
- Fix typos #311 (williamho)
v0.2.6-RC1 (2016-06-01)
Merged pull requests:
- gitignore and clean repos.tar.gz #302 (annappropriate)
- Space after triple equals #298 (annappropriate)
- Expose --alignByArrowEnumeratorGenerator in CLI #287 (djspiewak)
- fallback to config file in home dir #246 (maximn)
- Drop %% in addSbtPlugin #245 (dwijnand)
v0.2.5 (2016-05-17)
v0.2.4 (2016-05-16)
Merged pull requests:
- 0.2.4 rc3 #240 (olafurpg)
- 0.2.4 rc2 #234 (olafurpg)
- 0.2.4 rc1 #231 (olafurpg)
- Use unmanagedSourceDirectories for sourceDirectories #229 (fthomas)
- Optimizations: roughly 17% improvement #216 (olafurpg)
- Parallel #215 (olafurpg)
v0.2.3 (2016-05-06)
Merged pull requests:
v0.2.2 (2016-04-19)
Merged pull requests:
v0.2.1 (2016-04-14)
Merged pull requests:
v0.2.0 (2016-04-12)
Merged pull requests:
v0.1.6 (2016-04-05)
Merged pull requests:
v0.1.5 (2016-04-01)
Merged pull requests:
v0.1.4 (2016-03-18)
Merged pull requests:
v0.1.3 (2016-03-11)
Merged pull requests:
v0.1.2 (2016-03-10)
Merged pull requests:
- Fix most issues from @sjrd #118 (olafurpg)
- Add Java 6 compatibility. #113 (olafurpg)
- "Bootstrap": format scalafmt with scalafmt #93 (olafurpg)
v0.1.1 (2016-03-08)
Merged pull requests:
v0.1.0 (2016-03-07)
Merged pull requests:
- Setup Scalatex doc site. #90 (olafurpg)
- Sbt plugin #89 (olafurpg)
- Remove logging dependency from core. #88 (olafurpg)
v0.1.0-RC3 (2016-03-04)
Merged pull requests:
v0.1.0-RC2 (2016-03-03)
Merged pull requests:
- Publish to Maven Central. #86 (olafurpg)
- Support binpack + non-binpack parameters. #85 (olafurpg)
- Optimization: limit queue size even inside no opt zones. #84 (olafurpg)
- Pretty #82 (olafurpg)
- Various optimizations, 4 files to go Scala.js. #81 (olafurpg)
- Up to ~30% performance improvements. #79 (olafurpg)
- Fix all remaining output bugs. #78 (olafurpg)
- Remove memoization, ~100x speed improvement. #77 (olafurpg)
- Fix multiple output bugs from FormatExperiment. #76 (olafurpg)
- Fix output bugs, scalafmt can format itself! #75 (olafurpg)
- Minor optimizations. #74 (olafurpg)
- Limit calls to token.position.end.line. #73 (olafurpg)
- Fix output bugs, find new ones. #72 (olafurpg)
- Find optimal tokens 3x faster, pay with memory. #71 (olafurpg)
- Prepare for optimisations. #70 (olafurpg)
- Refactor. #69 (olafurpg)
- Move tests back to core, fixes #66 #68 (olafurpg)
- Add more benchmarks. #67 (olafurpg)
- Benchmarks #65 (olafurpg)
- Setup multi-project build for easier benchmarking. #64 (olafurpg)
- Run formatter on scala-js repo. #63 (olafurpg)
- Fix warts in output. #62 (olafurpg)
- Format most files with scalafmt, yay :D #61 (olafurpg)
v0.1.0-RC0 (2016-02-09)
Merged pull requests:
- Add --range flag to cli. #60 (olafurpg)
- OptimalAt keyed by state.column -> format token. #59 (olafurpg)
- More polish. #58 (olafurpg)
- Update Split. #57 (olafurpg)
- Add optimalAt optimization. #56 (olafurpg)
- Fix formatting for lots of statements. #54 (olafurpg)
- Bump test coverage. #53 (olafurpg)
- Refactor: replace Push with Indent[T <: Length] #52 (olafurpg)
- Strip ONLY/SKIP from test names. #51 (olafurpg)
- Refine Formatter cases. #50 (olafurpg)
- No space on ApplyUnary. #49 (olafurpg)
- Await in afterAll until results are submitted. #48 (olafurpg)
- Add expire field to Indent. #47 (olafurpg)
- Remove couchapp to separate project. #46 (olafurpg)
- Simplify data submission. #45 (olafurpg)
- Too big change :( #44 (olafurpg)
- Update Travis jdk to 8. #40 (olafurpg)
- Add stopwatch class. #39 (olafurpg)
- Regression testing with speed.scalafmt.org, fixes #11. #38 (olafurpg)
- Format with 2x newlines. #37 (olafurpg)
- Add heatmap over state visits. #35 (olafurpg)
- Shrink search space. #34 (olafurpg)
- Format argument lists. #31 (olafurpg)
- Link tests from readme. #27 (olafurpg)
- Use policy to unindent when leaving block, fixes #19. #26 (olafurpg)
- Introduce policy, fixes #15. #24 (olafurpg)
- Add a Gitter chat badge to readme.md #22 (gitter-badger)
- Setup Coveralls. #21 (olafurpg)
- Add column-limit with basic strategies. #20 (olafurpg)
- Add pomExtra. #16 (olafurpg)
- Add FormatToken, fixes #9. #10 (olafurpg)
- Downgrade Coveralls. #6 (olafurpg)
- Add Travis badge to readme. #5 (olafurpg)
- Add multi-project support for coveralls. #4 (olafurpg)
- Coveralls #3 (olafurpg)
- Coverage #2 (olafurpg)
- Format using shortest path search. #1 (olafurpg)
* This Changelog was automatically generated by github_changelog_generator