From 70d884a705e5f116e9f3f04315cebebfefc96957 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 May 2014 17:10:01 +0300 Subject: Add test for final/notfinal keywords on classes. --- src/Makefile.am | 1 + src/rules/final.cpp | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/rules/final.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 3805f41..13592ca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,6 +20,7 @@ mplint_SOURCES = \ rules/constructor.cpp \ rules/debug.cpp \ rules/dump.cpp \ + rules/final.cpp \ rules/license.cpp # set the include path found by configure diff --git a/src/rules/final.cpp b/src/rules/final.cpp new file mode 100644 index 0000000..17134ed --- /dev/null +++ b/src/rules/final.cpp @@ -0,0 +1,37 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "template.hpp" + +registerRuleExt(finalCheck, "007", "(.+)[.](cpp|h)") + +startRule(finalCheck) +{ +} + +endRule(finalCheck) +{ +} + +parseLineRule(finalCheck) +{ + if (isMatch(data, "(.*)(class|struct) ([a-zA-Z_]+)([\\\\n]|( [:])([^;]+)(.*))")) + print(data); +} -- cgit v1.2.3-60-g2f50