|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54409 - in branches/release: . tools/inspect tools/inspect/build
From: daniel_james_at_[hidden]
Date: 2009-06-27 06:41:34
Author: danieljames
Date: 2009-06-27 06:41:33 EDT (Sat, 27 Jun 2009)
New Revision: 54409
URL: http://svn.boost.org/trac/boost/changeset/54409
Log:
Merge inspect check that all C and C++ files end with a newline.
Merged revisions 53923,53925 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53923 | danieljames | 2009-06-15 08:32:43 +0100 (Mon, 15 Jun 2009) | 1 line
Use wrong line ends in wrong_line_ends_test.cpp.
........
r53925 | danieljames | 2009-06-15 08:37:59 +0100 (Mon, 15 Jun 2009) | 1 line
Check that all C and C++ files end with a newline. Fixes #3174
........
Added:
branches/release/tools/inspect/end_check.cpp
- copied unchanged from r53925, /trunk/tools/inspect/end_check.cpp
branches/release/tools/inspect/end_check.hpp
- copied unchanged from r53925, /trunk/tools/inspect/end_check.hpp
Properties modified:
branches/release/ (props changed)
branches/release/tools/inspect/wrong_line_ends_test.cpp (contents, props changed)
Text files modified:
branches/release/tools/inspect/build/Jamfile.v2 | 2 +-
branches/release/tools/inspect/inspect.cpp | 8 ++++++++
branches/release/tools/inspect/run_inspect.sh | 1 +
branches/release/tools/inspect/wrong_line_ends_test.cpp | 10 +---------
4 files changed, 11 insertions(+), 10 deletions(-)
Modified: branches/release/tools/inspect/build/Jamfile.v2
==============================================================================
--- branches/release/tools/inspect/build/Jamfile.v2 (original)
+++ branches/release/tools/inspect/build/Jamfile.v2 2009-06-27 06:41:33 EDT (Sat, 27 Jun 2009)
@@ -14,7 +14,7 @@
exe inspect
:
- inspect.cpp license_check.cpp link_check.cpp path_name_check.cpp tab_check.cpp crlf_check.cpp unnamed_namespace_check.cpp ascii_check.cpp
+ inspect.cpp license_check.cpp link_check.cpp path_name_check.cpp tab_check.cpp crlf_check.cpp end_check.cpp unnamed_namespace_check.cpp ascii_check.cpp
copyright_check.cpp minmax_check.cpp
/boost//filesystem/<link>static
/boost//regex/<link>static
Modified: branches/release/tools/inspect/inspect.cpp
==============================================================================
--- branches/release/tools/inspect/inspect.cpp (original)
+++ branches/release/tools/inspect/inspect.cpp 2009-06-27 06:41:33 EDT (Sat, 27 Jun 2009)
@@ -32,6 +32,7 @@
// the inspectors
#include "copyright_check.hpp"
#include "crlf_check.hpp"
+#include "end_check.hpp"
#include "license_check.hpp"
#include "link_check.hpp"
#include "path_name_check.hpp"
@@ -523,6 +524,7 @@
" -license\n"
" -copyright\n"
" -crlf\n"
+ " -end\n"
" -link\n"
" -path_name\n"
" -tab\n"
@@ -692,6 +694,7 @@
bool license_ck = true;
bool copyright_ck = true;
bool crlf_ck = true;
+ bool end_ck = true;
bool link_ck = true;
bool path_name_ck = true;
bool tab_ck = true;
@@ -723,6 +726,7 @@
license_ck = false;
copyright_ck = false;
crlf_ck = false;
+ end_ck = false;
link_ck = false;
path_name_ck = false;
tab_ck = false;
@@ -740,6 +744,8 @@
copyright_ck = true;
else if ( std::strcmp( argv[1], "-crlf" ) == 0 )
crlf_ck = true;
+ else if ( std::strcmp( argv[1], "-end" ) == 0 )
+ end_ck = true;
else if ( std::strcmp( argv[1], "-link" ) == 0 )
link_ck = true;
else if ( std::strcmp( argv[1], "-path_name" ) == 0 )
@@ -781,6 +787,8 @@
inspectors.push_back( inspector_element( new boost::inspect::copyright_check ) );
if ( crlf_ck )
inspectors.push_back( inspector_element( new boost::inspect::crlf_check ) );
+ if ( end_ck )
+ inspectors.push_back( inspector_element( new boost::inspect::end_check ) );
if ( link_ck )
inspectors.push_back( inspector_element( new boost::inspect::link_check ) );
if ( path_name_ck )
Modified: branches/release/tools/inspect/run_inspect.sh
==============================================================================
--- branches/release/tools/inspect/run_inspect.sh (original)
+++ branches/release/tools/inspect/run_inspect.sh 2009-06-27 06:41:33 EDT (Sat, 27 Jun 2009)
@@ -34,6 +34,7 @@
cd boost_${cvs_branch}
opt=""
opt="${opt} -crlf"
+opt="${opt} -end"
opt="${opt} -link"
opt="${opt} -long_name"
opt="${opt} -tab"
Modified: branches/release/tools/inspect/wrong_line_ends_test.cpp
==============================================================================
--- branches/release/tools/inspect/wrong_line_ends_test.cpp (original)
+++ branches/release/tools/inspect/wrong_line_ends_test.cpp 2009-06-27 06:41:33 EDT (Sat, 27 Jun 2009)
@@ -1,9 +1 @@
-// this is a test file; it isn't supposed to have correct line endings
-
-// Copyright Beman Dawes, 2003.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-line ending with cr
-line ending without any cr or nl
\ No newline at end of file
+// this is a test file; it isn't supposed to have correct line endings
// Copyright Beman Dawes, 2003.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
line ending with cr
line ending without any cr or nl
\ No newline at end of file
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk