1 //  crfl_check header  --------------------------------------------------------//
2 
3 //  Copyright Beman Dawes 2002.
4 //  Copyright Rene Rivera 2004.
5 //  Distributed under the Boost Software License, Version 1.0.
6 //  (See accompanying file LICENSE_1_0.txt or copy at
7 //  http://www.boost.org/LICENSE_1_0.txt)
8 
9 //  Contributed by Joerg Walter
10 
11 #ifndef BOOST_CRLF_CHECK_HPP
12 #define BOOST_CRLF_CHECK_HPP
13 
14 #include "inspector.hpp"
15 
16 namespace boost
17 {
18   namespace inspect
19   {
20     class crlf_check : public source_inspector
21     {
22       long m_files_with_errors;
23     public:
24 
25       crlf_check();
name() const26       virtual const char * name() const { return "*EOL*"; }
desc() const27       virtual const char * desc() const { return "invalid (cr only) line-ending"; }
28 
29       virtual void inspect(
30         const std::string & library_name,
31         const path & full_path,
32         const std::string & contents );
33 
~crlf_check()34       virtual ~crlf_check()
35         { std::cout << "  " << m_files_with_errors << " files with invalid line endings" << line_break(); }
36     };
37   }
38 }
39 
40 #endif // BOOST_CRLF_CHECK_HPP
41