| Line | |
|---|
| 1 | // tab_check implementation ------------------------------------------------// |
|---|
| 2 | |
|---|
| 3 | // Copyright Beman Dawes 2002. |
|---|
| 4 | // Distributed under the Boost Software License, Version 1.0. |
|---|
| 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
|---|
| 6 | // http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 7 | |
|---|
| 8 | #include "tab_check.hpp" |
|---|
| 9 | |
|---|
| 10 | namespace boost |
|---|
| 11 | { |
|---|
| 12 | namespace inspect |
|---|
| 13 | { |
|---|
| 14 | tab_check::tab_check() : m_files_with_errors(0) |
|---|
| 15 | { |
|---|
| 16 | register_signature( ".c" ); |
|---|
| 17 | register_signature( ".cpp" ); |
|---|
| 18 | register_signature( ".cxx" ); |
|---|
| 19 | register_signature( ".h" ); |
|---|
| 20 | register_signature( ".hpp" ); |
|---|
| 21 | register_signature( ".hxx" ); |
|---|
| 22 | register_signature( ".ipp" ); |
|---|
| 23 | register_signature( "Jamfile" ); |
|---|
| 24 | register_signature( ".py" ); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | void tab_check::inspect( |
|---|
| 28 | const string & library_name, |
|---|
| 29 | const path & full_path, // example: c:/foo/boost/filesystem/path.hpp |
|---|
| 30 | const string & contents ) // contents of file to be inspected |
|---|
| 31 | { |
|---|
| 32 | if ( contents.find( '\t' ) != string::npos && |
|---|
| 33 | contents.find( "boostinspect:notab" ) == string::npos) |
|---|
| 34 | { |
|---|
| 35 | ++m_files_with_errors; |
|---|
| 36 | error( library_name, full_path, desc() ); |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
| 39 | } // namespace inspect |
|---|
| 40 | } // namespace boost |
|---|
| 41 | |
|---|
| 42 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.