Well-documented and readable source code is essential for every collaborative project. Logically structured, well organized and nicely formatted, the code can speed up the bug hunting and help to keep the code clean, minimal and still functional. These aspects are particularly important if the code is being developed by a group of developers: in this context a common scheme for source code presentation is necessary. You don’t have to do everything by hand; in fact, there are many tools which can save a lot of time – for you and your co-workers. [Content Care Oct/10/2016]
The tools and services we’ve collected below aren’t validators. They format and beautify the code; some of them can remove redundant elements. Using them, you have to make sure you have a backup, so your data can always be restored.
You may want to take a look at the following related posts:
Let’s take a look at code beautifier and formatter which can save you a lot of time and help to maintain a clean and readable source code.
Code Beautifier And Formatter Link
Ruby Beautifier accepts a command-line list of file names, creates a backup copy of each named file and beautifies the originals. If there is an indentation error (an imbalance of opening and closing keywords), the script will print an error message but will save the result anyway.
The tabifier is a tool to properly indent computer code. The style it produces is a mix of my personal preferences for indentation plus what I could manage to make a program produce from dirty source. The tabifier currently supports CSS, HTML, and C Style code; the latter being anything that uses curly braces to start and end blocks, and semicolons to terminate statements.
This tool offers a variety of options, among them – Alphabetizing Feature and De-Capitalization Feature.
PHP formatter adds comments after control structures, colors the output, links to the php-manual by inline-functions, removes comments and removes empty lines. There are 5 pre-defined layouts, but you can also define your own styles.
A tool to beautify PHP 4 and PHP 5 source code – to run on your own server. Requires PHP 5.
A classic. Tidy consists of many program libraries and comes and has many variations. E.g. you can use
- TidyGUI19 to format the code right on your desktop,
- HTML Tidy20
- Clean up your Web pages with HTML TIDY21
- HTML Validator Firefox Extension24
Commercial Solution Link
- 1 https://www.smashingmagazine.com/2008/05/35-useful-source-code-editors-reviewed/
- 2 https://www.smashingmagazine.com/2006/09/list-of-css-tools/
- 3 https://www.smashingmagazine.com/2012/10/why-coding-style-matters/
- 4 http://quickhighlighter.com/
- 5 http://quickhighlighter.com/
- 6 http://www.prettyprinter.de/
- 7 http://www.prettyprinter.de/
- 8 http://www.arachnoid.com/ruby/rubyBeautifier.html
- 9 http://tools.arantius.com/tabifier
- 10 http://tools.arantius.com/tabifier
- 11 http://www.lonniebest.com/FormatCSS/
- 12 http://www.lonniebest.com/FormatCSS/
- 13 http://softwaremaniacs.org/soft/highlight/en/
- 14 http://softwaremaniacs.org/soft/highlight/en/
- 15 http://formatter.gerbenvv.nl/version3/index.php?lang=en
- 16 http://formatter.gerbenvv.nl/version3/index.php?lang=en
- 17 http://beautifyphp.sourceforge.net/docs/
- 18 http://tidy.sourceforge.net/
- 19 http://perso.wanadoo.fr/ablavier/TidyGUI/
- 20 http://sourceforge.net/projects/tidy
- 21 http://www.w3.org/People/Raggett/tidy/
- 22 http://csstidy.sourceforge.net/
- 23 http://perltidy.sourceforge.net/
- 24 http://users.skynet.be/mgueury/mozilla/index.html
- 25 http://www.polystyle.com/