# Hacking the Framework This file contains some brief instructions on contributing to Arachni. ## Code Style In order to maintain consistency and keep the code pretty you should adhere to the following guidelines: - 4 spaces, no tabs. - Maximum line length 75-80 columns, try not to exceed that limit. - For single-line blocks, use: ```ruby arr.each { |item| stuff( item ) } ``` - For multi-line blocks which expect parameters use: ```ruby arr.each do |item| stuff( item ) end ``` - Use space before, between, and after method parameters: ```ruby my_method( param1, param2 ) ``` - Use the new syntax when defining hashes, i.e. ':' instead of '=>'. - Use '?' at the end of methods which are expected to return a boolean result. - Use '!' at the end of methods only for ones which perform a similar operation but requiring extra attention from the ones without. Do not use it to just signify destructive action. In general, take a look at the existing code and try to follow that style **but** keep in mind that these guidelines should be given higher priority. ## Code No-Nos **1. Don't print to standard output.**
The interface in use won't be able to see your output and route it accordingly. Arachni provides you with wrappers that you can use, take a look in {Arachni::UI::Output}.
All UIs will provide these methods to handle your output, use them. **2. Don't use "sleep".**
It is unlikely that you will need it, but if you do, use `select(nil, nil, nil,