From 8cbea8513dfbaa409fea6af407c7cc459820b44f Mon Sep 17 00:00:00 2001 From: AsnelChristian Date: Wed, 7 Jun 2017 14:06:39 +0100 Subject: [PATCH] Redundancy: Add docs missing fields Relates to https://gitlab.com/coala/GSoC-2017/issues/249 --- coalib/bearlib/aspects/Redundancy.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/coalib/bearlib/aspects/Redundancy.py b/coalib/bearlib/aspects/Redundancy.py index f0f76aea26..fff401daad 100644 --- a/coalib/bearlib/aspects/Redundancy.py +++ b/coalib/bearlib/aspects/Redundancy.py @@ -8,6 +8,15 @@ class Redundancy: This aspect describes redundancy in your source code. """ class docs: + example = """ + int foo(int iX) + { + int iY = iX*2; + + return iX*2; + } + """ + example_language = 'C++' importance_reason = """ Redundant code makes your code harder to read and understand. """ @@ -160,6 +169,10 @@ def func(): print (id(a)) """ example_language = 'python' + importance_reason = """ + We should always keep our codebase clean, having dead code uselessly + makes the code longer and ambiguous. + """ fix_suggestions = """ These statement can be remove without harming the code. """