C Java PHP Perl Python program source code formatting (beautification) Tool
C, c ++ c #=> indent Astyle
Java ==> astyle Jalopy jacbe ImportScrbber
Php ==> phpCodeBeautifier
Perl ==> perlTidy
Python ==> Pydent
Introduction to several open-source code beautification tools
Tool Name Language introduction install/use indent c indent is synonymous with code beautification tools indent is a standard tool attached to gcc,
Indent [options] [input-files]
Indent [options] [single-input-file] [-o output-file] perltidy perl
Perltidy itself is also written in perl. After downloading: perl Makefile. PL; make install
Perltidy [options] file1 file2 file3...
(Output goes to file1.tdy, file2.tdy, file3.tdy ,...)
Perltidy [options] file1-o outfile
Perltidy [options] file1-st> outfile
Perltidy [options] Outfile astyle c ++ java (php) is a very fast C/C ++/Java source code beautification tool.
Astyle has many complete set of style definitions better than indent: ansi java linux... you don't have to remember the complex indentation specific options. Download the source code, decompress the package, make, and generate the astyle executable file.
Astyle [options] <Original> Beautified
Astyle [options] Foo. cpp Bar. cpp [...]
Astyle -- style = ansi *. cpp
I tried to use it to format the PHP program, which is also very effective (of course, it is not a pure PHP code mixed with HTML code ). Jalopy is a powerful java code formatting tool. In addition to the standard interface, the command line tool can also be used as a plug-in for ant jbuilder eclipse jdeveloper and other tools. It also provides APIs for downloads.sourceforge.net/jalopy/download
For more information, see the corresponding installation document pydent python pythius, which contains two tools:
Pydent: Code indent Tool
Pystat: After the code statistics Tool downloads the source code and unpacks it:
Run "python setup. py build"
Run "python setup. py install "htmltidy html/xml Error Correction tool can help your HTML code better comply with W3C specifications. It is now called tidy because it is not only used in HTML, it also applies to the formatting of xhtml xml.
However, JSP is not suitable for the code beautification of embedded scripts such as asp php jsp.
After the source code is downloaded, make generates the tidy executable file:
Tidy file1 file2...
Note: Use the-raw option for pages with Chinese characters
Tidy.exe-raw-imuq-wrap 132-f % f. err % f
Option description:
-Raw: do not modify Chinese characters (output values above 127 without conversion to entities)
-I indend: by default, HTML is Indented by two spaces.
-M overwrites the original file
-U forces all HTML tags to be capitalized (this can be left blank)
-Wrap Page code with a width greater than 132 lines force line feed
-F % f. err: output the error to the "corresponding file name. err" file.
HTMLTIDY supports XML format beautification:
Tidy-xml-imq web. xml
Tidy-xml-imq build. xml
Other tools:
Php code beautification Tool
PhpCB: php code beautifier has the command line version and graphic interface code viewer.
Http://www.phpedit.net/products/phpCodeBeautifier/
Java code beautification tools
For JAVA code formatting, jacbe is also a good choice. By default, it contains a configuration file that is fully formatted according to SUN's code specifications. There are even Commercial Code Organization tools such as JIndent to achieve better results.
GNU Coding Standards
Http://www.gnu.org/prep/standards_toc.html
Code Conventions for the Java (TM) Programming Language
Http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
PHP coding standard
Http://alltasks.net/code/php_coding_standard.html
Perl Style
Http://www.perldoc.com/perl5.6.1/pod/perlstyle.html
Pb: PERL/JavaScript beautifier
Http://www.arachnoid.com/lutusp/ftp/cgi/pb.txt
Html xml xhtml css...
Http://www.w3c.org
C-C + + beautifier how-:
Http://www.tldp.org/HOWTO/C-C++Beautifier-HOWTO/
VBScript code specification
Http://msdn.microsoft.com/library/en-us/script56/html/vbsCodingConventions.asp
Vbsbeaut code sorting Tool
Http://www.daansystems.com/vbsbeaut/
Dependency analysis between Java components
Http://www.clarkware.com/software/JDepend.html
Code check
Http://www.thecortex.net/clover/index.html
More XP tools
Http://directory.google.com/Top/Computers/Programming/Languages/Java/Coding_Standards/
Http://www.xprogramming.com/software.htm
Http://www.qsm.com/CodeCounters.html