2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Add descrption of how to install tidy; fix two minor issues

This commit is contained in:
wangxiaopeng 2016-01-07 04:11:01 -05:00
parent 14aeb23a05
commit d877778013

View File

@ -7,11 +7,28 @@ This document does not give the coding rules one by one, but give a piece of exa
This standard referred to the Perl code style from perldoc: http://perldoc.perl.org/perlstyle.html
Tidy Your Code
--------------
Meanwhile, you are recommended to use following command line to tidy your code: ::
perltidy -w -syn -g -opt -i=4 -nt -io -nbbc -kbl=2 -pscf=-c -aws -pt=2 -bbc -nolc <orig_code> -o <formatted_code>
perltidy -w -syn -g -opt -i=4 -nt -io -nbbc -kbl=2 -pscf=-c -aws \
-pt=2 -bbc -nolc <orig_code> -o <formatted_code>
How to install ``perltidy`` tool:
* **[RHEL]** ::
yum install perltidy.noarch
Code Standard Example: ::
* **[UBUNTU]** ::
apt-get install perltidy
Code Standard Example:
----------------------
::
#! /usr/bin/perl
@ -45,7 +62,7 @@ Code Standard Example: ::
}
# Declar variables
# Declare variables
my $a_local_scale;
my @a_local_array;
my %a_local_hash;