diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-02 20:35:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-02 20:35:57 +0300 |
commit | 1bc6a5a9601d953a914563d7782764b02607aa35 (patch) | |
tree | abbb416ffd55b578f2004896c3a45d0286d98869 | |
parent | adb266f686427fd5d0d5018fb7e859e3d8ef1ad9 (diff) | |
download | mplint-1bc6a5a9601d953a914563d7782764b02607aa35.tar.gz mplint-1bc6a5a9601d953a914563d7782764b02607aa35.tar.bz2 mplint-1bc6a5a9601d953a914563d7782764b02607aa35.tar.xz mplint-1bc6a5a9601d953a914563d7782764b02607aa35.zip |
Fix final detection.
-rw-r--r-- | src/rules/final.cpp | 2 | ||||
-rw-r--r-- | tests/testsrc/good/final1.cpp | 4 | ||||
-rw-r--r-- | tests/testsrc/good/final1.h | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/rules/final.cpp b/src/rules/final.cpp index 9ff82da..7e4d661 100644 --- a/src/rules/final.cpp +++ b/src/rules/final.cpp @@ -32,7 +32,7 @@ endRule(finalCheck) parseLineRule(finalCheck) { - if (isMatch(data, "(.*)(class|struct) ([a-zA-Z_0123456789]+)" + if (isMatch(data, "([ ]*)(class|struct) ([a-zA-Z_0123456789]+)" "($|( [:])([^;]+)(.*))")) { print("Need add final or notfinal into class declaration"); diff --git a/tests/testsrc/good/final1.cpp b/tests/testsrc/good/final1.cpp index e3d0b4d..cdb6a1b 100644 --- a/tests/testsrc/good/final1.cpp +++ b/tests/testsrc/good/final1.cpp @@ -31,3 +31,7 @@ class Test2 notfinal : public Test1 { Test2(); } + +/* + * Sets the widget being dragged. Used by the Gui class to +*/ diff --git a/tests/testsrc/good/final1.h b/tests/testsrc/good/final1.h index 1b4da20..c66c08a 100644 --- a/tests/testsrc/good/final1.h +++ b/tests/testsrc/good/final1.h @@ -27,3 +27,8 @@ class Test1 notfinal class Test2 final : public Test1 { } + + +/* + * Sets the widget being dragged. Used by the Gui class to +*/
\ No newline at end of file |