mirror of
https://github.com/nmap/nmap.git
synced 2025-12-17 13:09:02 +00:00
Update style guidance in HACKING file
This commit is contained in:
19
HACKING
19
HACKING
@@ -84,23 +84,18 @@ patches if you can.
|
|||||||
Style
|
Style
|
||||||
-----
|
-----
|
||||||
|
|
||||||
When contributing new code, we suggest using two-space indents with no
|
Code style guidelines and quality checking tools are documented at
|
||||||
tabs. This is generally the default in emacs, and Vim users can
|
https://secwiki.org/w/Nmap/Code_Standards . The short version is:
|
||||||
achieve it by adding rules such as the following to .vimrc:
|
|
||||||
|
|
||||||
if getcwd() =~ '/nmap'
|
|
||||||
set nocindent
|
|
||||||
set expandtab
|
|
||||||
set softtabstop=2
|
|
||||||
set shiftwidth=2
|
|
||||||
set copyindent
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
* Indent with 2 spaces, not tabs
|
||||||
|
* No trailing whitespace
|
||||||
|
* Be consistent
|
||||||
|
* Use comments
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
I got the idea for this HACKING file from GNet
|
I got the idea for this HACKING file from GNet
|
||||||
(http://www.gnetlibrary.org/) and followed the
|
(http://www.gnetlibrary.org/) and followed the
|
||||||
general structure of their HACKING file.
|
general structure of their HACKING file.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user