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. """