Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages.
When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key, and other editors (Emacs for example) have the ability to "pretty up" lines by automatically setting up the white space before the code on the line, possibly inserting spaces in a code that up to now used only tabs for indentation.
Since the NUMBER of space characters showed on screen for each tab character in the source code changes between editors (unless the user sets up the number to his liking...), one of the standard problems programmers are facing when moving from one editor to another is that code containing both spaces and tabs that was up to now perfectly indented, suddenly becomes a mess to look at when changing to another editor. Even if you as a programmer take care to ONLY use spaces or tabs, looking at other people's source code can still be problematic.
To address this problem, Artistic Style was created – a filter written in C++ that automatically re-indents and re-formats C / C++ / C# / Java source files. It can be used from a command line, or it can be incorporated as classes in another C++ program.
There is complete documentation for using Artistic Style. Most documentation is included in the distribution package.
Information on the changes in the current release. The News contains information on major changes and how they might affect the use of Artistic Style. The Release Notes contains a list of all changes made to the program. Information on old releases is also listed.
The latest release can be downloaded from the SourceForge file releases page. A link to the "latest version" near the top of the page will download the correct package for your platform. Or you can select the appropriate package from the "astyle" release folders. The Windows package contains a compiled binary. Other platforms will need to compile the source code. Makefiles are included for the most popular compilers. Follow the install instructions for the appropriate platform as described in the "Install" documentation.
The latest development files can be checked out from the Artistic Style repository using Subversion.
Information on compiling and installing Artistic Style. The Windows platform comes with a precompiled executable. Other platforms must compile the project. Follow the instructions for the appropriate platform (Linux, Mac, or Windows).
Artistic Style may be used and distributed under version 3 the GNU Lesser General Public License (LGPL). The LGPL is a set of additional permissions added to version 3 of the GNU General Public License. You can use Artistic Style in free or commercial software without charge. Projects that use Artistic Style do not have to make the source code available. If Artistic Style itself is modified, however, the modified Artistic Style source code must be made available.
This page contains scripts to support the Artistic Style program. They are in various script languages and work on different platforms. It includes scripts to clean the directories of backup files created by Artistic Style.
There are several applications that use Artistic Style as contributed software. It is either embedded in the application or called as a command line program. The applications include Graphical User Interfaces to view the effect of formatting on the source code, development environments for various platforms, and other software.
Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical User Interface (GUI). With the Java Development Kit (JDK) installed it can be compiled as a Java Native Interface (JNI) and called from a Java program. The Developer Information documents the calling procedure and has example programs for C++, Java, C#, and Python.
Bug reports and change requests should be submitted to the bug tracker page. You must be logged in to SourceForge to submit a report. If possible include an example that shows the problem. It does not need to be functional code. Note that code copied and pasted into the bug report will not be indented after the data is submitted. You must indicate the indentation when you submit the request (e.g. replace leading spaces with periods).
New releases are announced through an astyle-announce mailing list. You will receive notification of new releases and important repository commits. No SourceForge user account is needed, but registered site users can subscribe using their SourceForge mail alias. (Mail aliases take the form: firstname.lastname@example.org). The sign-up page can also be accessed from the user support page. There are other ways to subscribe on the file releases page that use an RSS feed. You can use them if you want.
To contact the project by email use the address email@example.com.
Artistic Style is maintained and updated by Jim Pattee. The original author was Tal Davidson, Israel.
Thanks to Jim Watson, Fred Shwartz, W. Nathaniel Mills III, Danny Deschenes, Andre Houde, Richard Bullington, Paul-Michael Agapow, Daryn Adler, Dieter Bayer, Sam Cooler, Jim Duff, Emilio Guijarro, Jens Krinke, Eran Ifrah, Travis Robinson, Max Horn, Ettl Martin, Mario Gleichmann, J P Nurmi, Colin D Bennett, Christian Stimming, MrTact, Wim Rosseel, Matthew Woehlke, Chris Schwarz, Chang Jiang, Arseny Solokha, Milian Wolff, Johannes Martin, Arne F?rlie, Marvin Humphrey, J, Christopher Sean Morrison, Keith OHara, louis6g, for their patches and contributions to Artistic Style.
Thanks to SourceForge for giving Artistic Style its home.
Thanks to all the dedicated beta-testers and bug notifiers!