A source code formatter for the Ceylon programming language.
Version 1.3.3 has been released and is available on Herd. There are no immediate plans for changes; the next release will probably be for bugfixes, or to support new language features, or for a new binary version of Ceylon.
ant
git clone https://github.com/eclipse/ceylon.formatter
cd ceylon.formatter
ant install
The buildfile assumes that ceylon-dist
(including the Ceylon ant files) is a sibling folder; otherwise, you might have to adjust the paths in build.properties
.
ceylon.formatter
repository and import the ceylon.formatter
projectsource_gen.ceylon.formatter.run()
from the source-gen
source folder (ignore the warning that the project has build errors, that’s exactly what this is going to fix)test.ceylon.formatter
module and choose Run As -> Ceylon Test to test if everything worksOptionally, you can run the following command in your clone of the repository to restore older Git history:
git fetch origin 'refs/replace/*:refs/replace/*'
The formatter is part of the Ceylon IDE. You can format any source file by hitting Ctrl+Shift+F, or selecting Source > Format from the menu.
You can also run the formatter from the command line:
ceylon format source # to format all Ceylon code in source
ceylon format source --to source-formatted # if you’re afraid I might break your code – directory structure is preserved
ceylon format source test-source # to format all Ceylon code in source and test-source
ceylon format source --and test-source --to formatted # to format all Ceylon code in source and test-source into formatted
(Replace ceylon format
with ceylon run ceylon.formatter
if you don’t have the plugin installed.)
If you have found a bug or want to suggest a feature, create an issue. You can also send me an e-mail (address is on my Github page).
The content of this repository is released under the ASL v2.0 as provided in the LICENSE file that accompanied this code.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.