1 // end_check header ---------------------------------------------------------// 2 3 // Copyright Beman Dawes 2002. 4 // Copyright Rene Rivera 2004. 5 // Copyright Daniel James 2009. 6 // 7 // Distributed under the Boost Software License, Version 1.0. 8 // (See accompanying file LICENSE_1_0.txt or copy at 9 // http://www.boost.org/LICENSE_1_0.txt) 10 11 #ifndef BOOST_END_CHECK_HPP 12 #define BOOST_END_CHECK_HPP 13 14 #include "inspector.hpp" 15 16 namespace boost 17 { 18 namespace inspect 19 { 20 class end_check : public inspector 21 { 22 long m_files_with_errors; 23 public: 24 25 end_check(); name() const26 virtual const char * name() const { return "*END*"; } desc() const27 virtual const char * desc() const { return "file doesn't end with a newline"; } 28 29 virtual void inspect( 30 const std::string & library_name, 31 const path & full_path, 32 const std::string & contents ); 33 ~end_check()34 virtual ~end_check() 35 { std::cout << " " << m_files_with_errors << " files that don't end with a newline" << line_break(); } 36 }; 37 } 38 } 39 40 #endif // BOOST_END_CHECK_HPP 41