aede-policy(1) aede-policy(1) NNAAMMEE aede-policy - check change set is ready for aede SSYYNNOOPPSSIISS aaeeddee--ppoolliiccyy [ _o_p_t_i_o_n... ][ _p_o_l_i_c_y... ] aaeeddee--ppoolliiccyy --HHeellpp aaeeddee--ppoolliiccyy --VVEERRSSiioonn aaeeddee--ppoolliiccyy --LLiisstt DDEESSCCRRIIPPTTIIOONN The _a_e_d_e_-_p_o_l_i_c_y command is used to verify that a change set is ready to end development. This is intended to be used by the _d_e_v_e_l_o_p___e_n_d___- _p_o_l_i_c_y___c_o_m_m_a_n_d field of the project configuration file. develop_end_policy_command = "aede-policy -p $project -c $change all"; If any of the policies should fail, the _a_e_d_e_-_p_o_l_i_c_y command will fail with an exit status of 1. This, in turn, will cause the _a_e_d_e(1) com- mand to leave the change in the _b_e_i_n_g _d_e_v_e_l_o_p_e_d state. Note that the _a_e_d_e(1) command sets the appropriate environment vari- ables, so the --PPrroojjeecctt and --CChhaannggee options are rarely necessary. If no policy names appear on the command line, the aede-policy project specific attribute will be checked (see the _p_r_o_j_e_c_t___s_p_e_c_i_f_i_c field in the _a_e_p_a(5) man page). If the attribute exists, it contains a comma separated list of policy names (for backwards compatibility, it can also be a space separated list). The _a_e_d_e_-_p_o_l_i_c_y(1) command expects to be invoked on changes in the being_developed state. If invoked for a change in the being_- integrated state (common if invoked as part of the build) it will silently do nothing. All other change states will result in a fatal error message. PPOOLLIICCIIEESS There are a range of policies that can be selected. all Check all of the _c_o_p_y_r_i_g_h_t, _c_r_l_f, _d_e_s_c_r_i_p_t_i_o_n and _p_r_i_n_t_a_b_l_e policies. comments This policy checks for C comments in C++ files, or C++ com- ments in C files. The forms of the comments give sublimial hints to the reader as to what language is being read. Mis- matched comments make the code subtly harder to read and thus harder to maintain. copyright This policy checks that each file in the change set contains a copyright notice of the form Copyright (C) yyeeaarr _s_o_m_e_t_h_i_n_g where yyeeaarr is the current year (you can have a range of years, too). Binary files are ignored. The _s_o_m_e_t_h_i_n_g part is either the project specific _c_o_p_y_r_i_g_h_t_-_o_w_n_e_r attribute, or the execut- ing users full name. foreign-copyright Change sets marked with a _f_o_r_e_i_g_n_-_c_o_p_y_r_i_g_h_t_=_t_r_u_e attribute are ignored, as are files similarly marked. crlf This policy checks that all files are using UNIX line termina- tion (NL), not DOS line termination (CRLF). Binary files are ignored. description This policy checks that the change set _b_r_i_e_f___d_e_s_c_r_i_p_t_i_o_n and _d_e_s_c_r_i_p_t_i_o_n attributes have been updated to something other than the defaults. escape-hyphen This policy checks that hypen in roff sources (such as _m_a_n(1) pages) that contain unescaped minus or hyphen characters. This is one of the more annoying warnings produced by _l_i_n_- _t_i_a_n(1) when building Debian packages. aede-policy-escape-hyphen This check is not applied to files carrying a _a_e_d_e_- _p_o_l_i_c_y_-_e_s_c_a_p_e_-_h_y_p_h_e_n_=_f_a_l_s_e attribute. fsf-address This policy checks that the FSF address, if present in source files, is up-to-date. This is useful for Free Software projects. gpl-version gpl-version=_n_n This policy checks files that cite the GNU GPL in their file headers, to be sure they contain the correct version of the GNU GPL. Defaults to version 3 if no version number speci- fied. line-length line-length=_n_n This policy checks that files have this maximum line length. Defaults to 80 if no width is specified. It understands _v_i_m(1) mode lines, particularly for the "tabsize" setting. aede-policy-line-length Can be overridden per file using the _a_e_d_e_-_p_o_l_i_c_y_-_l_i_n_e_-_l_e_n_g_t_h file attribute. man-pages This policy requires that each installable program be accompa- nied by a _m_a_n(1) manual page. merge-fhist This policy requires that there be no _f_m_e_r_g_e(1) conflict lines present in any source files. The name comes from the name of the package containing this tool: _f_h_i_s_t. merge-rcs This policy requires that there be no _m_e_r_g_e(1) conflict lines present in any source files. The name comes from the name of the package containing this tool: _r_c_s. no-tabs This policy checks that files have no tabs characters in them. This is useful when a team of developers all use different editors and different tab stops. By only using spaces, the code is presented to all developers the same way. foreign-copyright This check is not applied to change sets with a _f_o_r_- _e_i_g_n_-_c_o_p_y_r_i_g_h_t_=_t_r_u_e attribute, because you have little control over them (change the tabs in a later change set, if at all). aede-policy-tabs-allowed This check is not applied to files which are called Makefile or similar, and it is not applied to files carrying a _a_e_d_e_-_p_o_l_i_c_y_-_t_a_b_s_-_a_l_l_o_w_e_d_=_t_r_u_e attribute. printable This policy checks that each file in the change set contains only printable text characters and white space. content-type The _c_o_n_t_e_n_t_-_t_y_p_e file attribute is taken into account; if there is no _c_o_n_t_e_n_t_-_t_y_p_e file attribute, or there is no charset specified by the _c_o_n_t_e_n_t_-_t_y_p_e file attribute, plain 7-bit ASCII text is assumed. reserved This policy checks that C and C++ identifiers reserved by the ANSI C and C++ Standards are used. See section 2.10 of both standards. Only C and C++ source files are checked. text This policy checks that each file in the change set contains only text, although international character sets are accept- able. This is basically a test for NUL characters, because everything else could be part of a valid character encoding of some international character set. version-info This policy checks the version-info rules for shared libraries, as laid out by the _l_i_b_t_o_o_l(1) manual, and required by the Debian Policy Manual. This is done by examining the actual shared libraries, the one being built, and the one in the ancestor baseline (_i_._e_. the one to be replaced) to confirm that the version-info strings conform. By examining the actual shared libraries, an objective view of what has been added, modified and removed can be obtained. The shared library to examine is obtained from a project_spe- cific attribute: aede-policy:version-info:library This is set to the baseline-relative name of the shared library file. You don't have to add the secret _l_i_b_t_o_o_l(1) ".libs" directory, this policy can work that out for itself. aemakegen:version-info This is the string which _a_e_m_a_k_e_g_e_n(1) would use if it were invoked. This is also checked. If you aren't using _a_e_m_a_k_e_g_e_n(1), it is a good idea to set this attribute anyway and access it via _a_e_s_u_b(1) from within your build system. This policy requires _n_m(1)'s ----ddyynnaammiicc option to work cor- rectly on the .so file (it is part of the GNU binutils pack- age). vim-mode This policy checks that each file in the change set contains contains a _v_i_m(1) mode line. Binary files are ignored. aede-policy-vim-mode-required Set this attribute to false on files for which this is not to be checked. white-space This policy checks that there is no white space on the ends of lines, that there are no blank lines at the ends of files. If no policy is specified, only the _d_e_s_c_r_i_p_t_i_o_n policy will be checked. OOPPTTIIOONNSS The following options are understood: --CChhaannggee _n_u_m_b_e_r This option may be used to specify a particular change within a project. See _a_e_g_i_s(1) for a complete description of this option. --HHeellpp This option may be used to obtain more information about how to use the _a_e_d_e_-_p_o_l_i_c_y program. --LLiisstt List all of the available validations. --PPrroojjeecctt _n_a_m_e This option may be used to select the project of interest. When no --PPrroojjeecctt option is specified, the _A_E_G_I_S___P_R_O_J_E_C_T envi- ronment variable is consulted. If that does not exist, the user's _$_H_O_M_E_/_._a_e_g_i_s_r_c file is examined for a default project field (see _a_e_u_c_o_n_f(5) for more information). If that does not exist, when the user is only working on changes within a sin- gle project, the project name defaults to that project. Oth- erwise, it is an error. See also _a_e_g_i_s(1) for options common to all aegis commands. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-project", "-PROJ" and "-p" are all inter- preted to mean the --PPrroojjeecctt option. The argument "-prj" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line, after the function selectors. The GNU long option names are understood. Since all option names for _a_e_d_e_-_p_o_l_i_c_y are long, this means ignoring the extra leading '-'. The "----_o_p_t_i_o_n==_v_a_l_u_e" convention is also understood. EEXXIITT SSTTAATTUUSS The _a_e_d_e_-_p_o_l_i_c_y command will exit with a status of 1 on any error. The _a_e_d_e_-_p_o_l_i_c_y command will only exit with a status of 0 if there are no errors. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS See _a_e_g_i_s(1) for a list of environment variables which may affect this command. See _a_e_p_c_o_n_f(5) for the project configuration file's _p_r_o_j_e_c_t___s_p_e_c_i_f_i_c field for how to set environment variables for all commands executed by Aegis. SSEEEE AALLSSOO _a_e_d_e(1) end development of a change _a_e_p_c_o_n_f(5) project configuration file CCOOPPYYRRIIGGHHTT aede-policy version 4.25.D611 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller The aede-policy program comes with ABSOLUTELY NO WARRANTY; for details use the '_a_e_d_e_-_p_o_l_i_c_y _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the '_a_e_d_e_-_p_o_l_i_c_y _-_V_E_R_S_i_o_n _L_i_c_e_n_s_e' command. AAUUTTHHOORR Peter Miller E-Mail: pmiller@opensource.org.au /\/\* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Aegis aede-policy(1)