1 //  character_length_check header  ------------------------------------------//
2 
3 //  Copyright (c) 2015 Brandon Cordes
4 //  Based on the apple_macro_check checker by Marshall Clow
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 #ifndef BOOST_EIGHTY_CHECK_HPP
10 #define BOOST_EIGHTY_CHECK_HPP
11 
12 #include "inspector.hpp"
13 #include <cstddef>
14 
15 namespace boost
16 {
17     namespace inspect
18     {
19         class length_check : public inspector
20         {
21             long m_files_with_errors;
22             std::size_t limit;
23 
24         public:
25 
26             length_check(std::size_t setting);
27 
28             std::string a = "*Line length limit*";
29             std::string b = "The line is longer than allowed by the character limit";
name() const30             virtual const char * name() const { return a.c_str(); }
desc() const31             virtual const char * desc() const { return b.c_str(); }
32 
33             virtual void inspect(
34                 const std::string & library_name,
35                 const path & full_path,
36                 const std::string & contents);
37 
print_summary(std::ostream & out)38             virtual void print_summary(std::ostream& out)
39             {
40                 string c = " files with lines exceeding the character limit";
41                 out << "  " << m_files_with_errors << c << line_break();
42             }
43 
~length_check()44             virtual ~length_check() {}
45         };
46     }
47 }
48 
49 #endif // BOOST_EXTRA_WHITESPACE_CHECK_HPP
50