Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 2 KB

README.rst

File metadata and controls

58 lines (43 loc) · 2 KB
Root.Smell Parent Index
Sibling aspects Metadata Redundancy Security Spelling

Smell

This aspect detects code smells or bad smells in your code.

Smells are certain structures in a code that indicate violation of fundamental design principles. They are usually not bugs; they are not technically incorrect and do not currently prevent the program from functioning.

Subaspects

Example

* Feature envy
* Data clump
* Too large class
* Too long parameter list
etc...

Importance

Even though they are not necessarily bugs, code smells increase the risk of bugs or failure in the future and may slow down development.

How to fix this

There are several refactoring techniques that can be used to deal with code smells including:

  • Composing methods
  • Moving features between objects
  • Organizing data
  • Simplifying conditional expressions
  • Simplifying method calls
  • Dealing with generalisation

See <https://sourcemaking.com/refactoring/refactorings> for more information.