mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 11:26:11 +00:00
Added contributing information
This commit is contained in:
parent
925eb15c9b
commit
9c7b8a7c70
@ -1,4 +1,35 @@
|
|||||||
## Code formatting
|
# Contributing to Cutter
|
||||||
|
|
||||||
|
There are many ways you can contribute to cutter.
|
||||||
|
The easy one is to open issues with bugs you found on the application.
|
||||||
|
The second one is to fix issues found in the GitHub issues tracker.
|
||||||
|
|
||||||
|
## Opening an issue
|
||||||
|
|
||||||
|
Make a clear description of the bug/feature, use screenshots, send binaries, etc.
|
||||||
|
|
||||||
|
## Contributing to the code
|
||||||
|
|
||||||
|
Note that cutter is still under development and many parts of the code are to be improved.
|
||||||
|
|
||||||
|
### Calling a radare2 command
|
||||||
|
|
||||||
|
There are two ways to do it:
|
||||||
|
* `CutterCore::cmd()` *(Discouraged)* Only use it for commands which yells no output
|
||||||
|
* `CutterCore::cmdj()` To be used with json commands like `cmdj("agj")` or `cmdj("aflj")`. It is way easier to parse a json output.
|
||||||
|
|
||||||
|
### Seek the current file
|
||||||
|
|
||||||
|
To modify radare2 seek use `MainWindow::seek(const RVA offset)`. This is important because it will emit a `MainWindow::seekChanged(RVA offset)` signal.
|
||||||
|
Never ever call cmd("s offset");
|
||||||
|
|
||||||
|
### Creating a widget
|
||||||
|
|
||||||
|
Make sure to connect the `MainWindow::seekChanged(RVA offset)` signal so your widget refreshes its output when radare2 seek is modified (switching to another function, etc.).
|
||||||
|
|
||||||
|
## General coding guidelines
|
||||||
|
|
||||||
|
### Code formatting
|
||||||
|
|
||||||
We use [AStyle 2.06](https://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/) to format the code. The command line for formatting the code according to the style is:
|
We use [AStyle 2.06](https://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/) to format the code. The command line for formatting the code according to the style is:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user