Example #1
0
    include_check::include_check()
      : m_errors(0)
    {
      // C/C++ source code...
      register_signature( ".c" );
      register_signature( ".cpp" );
      register_signature( ".cxx" );
      register_signature( ".h" );
      register_signature( ".hpp" );
      register_signature( ".hxx" );
      register_signature( ".inc" );
      register_signature( ".ipp" );

      for (names_includes const* names_it = &names[0];
           names_it->name_regex != nullptr;
           ++names_it)
      {
        std::string rx(names_it->name_regex);
        rx +=
          "|"                   // or (ignored)
          "("
          "//[^\\n]*"           // single line comments (//)
          "|"
          "/\\*.*?\\*/"         // multi line comments (/**/)
          "|"
          "\"([^\"\\\\]|\\\\.)*\"" // string literals
          ")";
        regex_data.push_back(names_regex_data(names_it, rx));
      }
    }
    deprecated_include_check::deprecated_include_check()
      : m_errors(0)
    {
      // C/C++ source code...
      register_signature( ".c" );
      register_signature( ".cpp" );
      register_signature( ".cxx" );
      register_signature( ".h" );
      register_signature( ".hpp" );
      register_signature( ".hxx" );
      register_signature( ".inc" );
      register_signature( ".ipp" );

      for (deprecated_includes const* includes_it = &names[0];
           includes_it->include_regex != nullptr;
           ++includes_it)
      {
        std::string rx =
            std::string("^\\s*#\\s*include\\s*<(")
          +   includes_it->include_regex
          + ")>\\s*$"
          + "|"
          + "^\\s*#\\s*include\\s*\"("
          +   includes_it->include_regex
          + ")\"\\s*$";

        regex_data.push_back(deprecated_includes_regex_data(includes_it, rx));
      }
    }
Example #3
0
        whitespace_check::whitespace_check()
            : m_files_with_errors(0)

        {
            register_signature(".c");
            register_signature(".cpp");
            register_signature(".css");
            register_signature(".cxx");
            register_signature(".h");
            register_signature(".hpp");
            register_signature(".hxx");
            register_signature(".inc");
            register_signature(".ipp");
            register_signature(".txt");
        }
Example #4
0
 tab_check::tab_check() : m_files_with_errors(0)
 {
   register_signature( ".c" );
   register_signature( ".cpp" );
   register_signature( ".cxx" );
   register_signature( ".h" );
   register_signature( ".hpp" );
   register_signature( ".hxx" );
   register_signature( ".ipp" );
   register_signature( "Jamfile" );
   register_signature( ".py" );
 }
Example #5
0
length_check::length_check(size_t setting)
    : m_files_with_errors(0)

{
    register_signature(".c");
    register_signature(".cpp");
    register_signature(".css");
    register_signature(".cxx");
    register_signature(".h");
    register_signature(".hpp");
    register_signature(".hxx");
    register_signature(".inc");
    register_signature(".ipp");
    register_signature(".txt");

    limit = setting;
}
Example #6
0
 link_check::link_check()
   : m_broken_errors(0), m_unlinked_errors(0), m_invalid_errors(0),
     m_bookmark_errors(0), m_duplicate_bookmark_errors(0)
 {
     // HTML signatures are already registered by the base class,
     // 'hypertext_inspector' 
     register_signature(".css");
 }
Example #7
0
 copyright_check::copyright_check() : m_files_with_errors(0)
 {
   register_signature( ".c" );
   register_signature( ".cpp" );
   register_signature( ".cxx" );
   register_signature( ".h" );
   register_signature( ".hpp" );
   register_signature( ".hxx" );
   register_signature( "Jamfile" );
   register_signature( ".jam" );
 }
Example #8
0
minmax_check::minmax_check()
    : m_errors(0)
{
    // C/C++ source code...
    register_signature( ".c" );
    register_signature( ".cpp" );
    register_signature( ".cxx" );
    register_signature( ".h" );
    register_signature( ".hpp" );
    register_signature( ".hxx" );
    register_signature( ".inc" );
    register_signature( ".ipp" );
}
 unnamed_namespace_check::unnamed_namespace_check() : m_errors(0)
 {
   register_signature( ".h" );
   register_signature( ".hh" ); // just in case
   register_signature( ".hpp" );
   register_signature( ".hxx" ); // just in case
   register_signature( ".inc" );
   register_signature( ".ipp" );
   register_signature( ".inl" );
 }
Example #10
0
 apple_macro_check::apple_macro_check() : m_files_with_errors(0)
 {
   register_signature( ".c" );
   register_signature( ".cpp" );
   register_signature( ".cxx" );
   register_signature( ".h" );
   register_signature( ".hpp" );
   register_signature( ".hxx" );
   register_signature( ".ipp" );
 }
Example #11
0
deprecated_macro_check::deprecated_macro_check()
    : m_files_with_errors(0)
    , m_from_boost_root(
          fs::exists(search_root_path() / "boost") &&
          fs::exists(search_root_path() / "libs"))
{
    register_signature( ".c" );
    register_signature( ".cpp" );
    register_signature( ".cxx" );
    register_signature( ".h" );
    register_signature( ".hpp" );
    register_signature( ".hxx" );
    register_signature( ".ipp" );
}
Example #12
0
 assert_macro_check::assert_macro_check()
   : m_files_with_errors(0)
   , m_from_boost_root(
       fs::exists(fs::initial_path() / "boost") &&
       fs::exists(fs::initial_path() / "libs"))
 {
   register_signature( ".c" );
   register_signature( ".cpp" );
   register_signature( ".cxx" );
   register_signature( ".h" );
   register_signature( ".hpp" );
   register_signature( ".hxx" );
   register_signature( ".ipp" );
 }
Example #13
0
 hypertext_inspector::hypertext_inspector()
 {
   register_signature( ".htm" );
   register_signature( ".html" );
   register_signature( ".shtml" );
 }
Example #14
0
    source_inspector::source_inspector()
    {
      // C/C++ source code...
      register_signature( ".c" );
      register_signature( ".cpp" );
      register_signature( ".css" );
      register_signature( ".cxx" );
      register_signature( ".h" );
      register_signature( ".hpp" );
      register_signature( ".hxx" );
      register_signature( ".inc" );
      register_signature( ".ipp" );

      // Boost.Build BJam source code...
//       register_signature( "Jamfile" );
//       register_signature( ".jam" );
//       register_signature( ".v2" );

      // Other scripts; Python, shell, autoconfig, etc.
//       register_signature( "configure.in" );
//       register_signature( "GNUmakefile" );
//       register_signature( "Makefile" );
      register_signature( ".bat" );
      register_signature( ".mak" );
      register_signature( ".pl" );
      register_signature( ".py" );
      register_signature( ".sh" );
      register_signature( "CMakeText.txt" );
      register_signature( ".cmake" );
      register_signature( ".yml" );

      register_signature( ".editorconfig" );
      register_signature( ".gitattributes" );
      register_signature( ".gitignore" );

      // Hypertext, Boost.Book, and other text...
      register_signature( "news" );
      register_signature( "readme" );
      register_signature( "todo" );
      register_signature( "NEWS" );
      register_signature( "README" );
      register_signature( "TODO" );
      register_signature( ".boostbook" );
      register_signature( ".htm" );
      register_signature( ".html" );
      register_signature( ".rst" );
      register_signature( ".md" );
      register_signature( ".sgml" );
      register_signature( ".shtml" );
      register_signature( ".txt" );
      register_signature( ".xml" );
      register_signature( ".xsd" );
      register_signature( ".xsl" );
      register_signature( ".qbk" );
    }