Name |
Ceylon Source Code Formatter |
---|---|
Category |
Command-line plugins
Modules which have command-line plugins available. You can install them with |
Backends | JVM |
Maven coordinates | |
Compatible Ceylon release |
JVM: 1.1.0 (outdated) |
Published | Oct 8, 2014 |
Stats |
Downloads (JVM): 595 Source downloads: 668 |
Authors |
Lucas Werkmeister <mail@lucaswerkmeister.de> |
License | http://www.apache.org/licenses/LICENSE-2.0.html |
Description |
A formatter for the Ceylon programming language. Command line usage(If the To format all Ceylon code in the ceylon format source test-source To format all Ceylon code in the ceylon format source --to source-formatted To format all Ceylon code in the ceylon format source --and test-source --to source-formatted (This results in two subdirectories You can specify an arbitrary amount of these formatting commands: ceylon format \ source --to source-formatted \ test-source --to test-source-formatted (The line breaks are only included for clarity and not a part of the command line syntax.) If no formatting commands are present, the formatter operates in “pipe mode”, reading code from standard input and writing to standard output. OptionsYou can specify formatting options using the following syntax: --optionName=optionValue # or --optionName optionValue For available option names, see
Library usageUse the If the node was parsed from an existing file, don’t forget
to pass the token stream to To construct FormattingOptions { indentMode = Spaces(8); maxLineLength = 80; } You can also use combinedOptions { baseOptions = companyWideOptions; SparseFormattingOptions { indentMode = Spaces(1); // our department has very small screens :-( } } |
Change Log |
Initial release. (The version number 1.0.0 was skipped to be in sync with the main Ceylon version.) |
Dependencies |
ceylon.file/1.1.0
shared
java.base/7 JDK
shared
|
Usage |
import ceylon.formatter "1.1.0"; $ ceylon run ceylon.formatter/1.1.0 <property name="ceylon.home" value="…"/> <property name="ceylon.ant.lib" value="${ceylon.home}/lib/ceylon-ant.jar"/> <path id="ant-tasks"> <pathelement path="${ceylon.ant.lib}"/> </path> <typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/> <target name="run"> <ceylon-run module="ceylon.formatter/1.1.0"/> </target> $ ceylon plugin install ceylon.formatter/1.1.0 <property name="ceylon.home" value="…"/> <property name="ceylon.ant.lib" value="${ceylon.home}/lib/ceylon-ant.jar"/> <path id="ant-tasks"> <pathelement path="${ceylon.ant.lib}"/> </path> <typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/> <target name="run"> <ceylon-plugin mode=install module="ceylon.formatter/1.1.0"/> </target> |
Module links |
Members Imported By Home Code repository Issue tracker Browse Download .car No .js archive Download source archive Download scripts archive Scripts Download module documentation View API documentation |