Mercurial > irccd
diff extern/vera/src/plugins/Exclusions.h @ 548:a7c0eb100760
CMake: import vera++ 1.3.0, closes #729
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 22 Nov 2017 20:10:03 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extern/vera/src/plugins/Exclusions.h Wed Nov 22 20:10:03 2017 +0100 @@ -0,0 +1,46 @@ +// +// Copyright (C) 2006-2007 Maciej Sobczak +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef EXCLUSIONS_H_INCLUDED +#define EXCLUSIONS_H_INCLUDED + +#include <string> +#include "../structures/SourceFiles.h" +#include "Rules.h" +#include <stdexcept> + + +namespace Vera +{ +namespace Plugins +{ + +class ExclusionError : public std::runtime_error +{ +public: + ExclusionError(const std::string & msg) : std::runtime_error(msg) {} +}; + +class Exclusions +{ +public: + typedef std::string ExclusionFileName; + + static void setExclusions(const ExclusionFileName & name); + static void setExclusionsTcl(const ExclusionFileName & name); + static void setExclusionsRegex(const ExclusionFileName & name); + + static bool isExcluded(const Structures::SourceFiles::FileName & name); + static bool isExcluded(const Structures::SourceFiles::FileName & name, + int lineNumber, const Rules::RuleName & currentRule, const std::string & msg); +}; + +} // namespace Plugins + +} // namespace Vera + +#endif // EXCLUSIONS_H_INCLUDED