Nmap Development mailing list archives

Indentation and coding style of imported files (was: [nmap-svn] r29240)


From: Henri Doreau <henri.doreau () gmail com>
Date: Wed, 18 Jul 2012 12:58:31 +0200

2012/7/17  <commit-mailer () insecure org>:
Author: perdo
Date: Tue Jul 17 11:07:28 2012
New Revision: 29240

Log:
Add parts of LuaFileSystem to NSE (support for mkdir, rmdir, link).

Added:
   nmap/nselib/lfs.luadoc
Modified:
   nmap/nse_fs.cc
   nmap/nse_fs.h
   nmap/nse_main.cc
   nmap/nse_main.lua
[...]

Hello,

I noticed that indentation and bracket style of nse_fs.cc lacks
consistency. It seems that it was originally using tabs, and some
modifications were made with two-spaces indented lines. I think we'd
all agree that indentation and coding style should be unified, but
given that this file was imported from another project (if I
understood correctly) I don't know what's the best way to do it.

Is there already a policy? Should we establish one? A couple other nse
files would benefit this.

At the moment, most C and C++ files use something like:
$ indent -nut -i2 -kr -br -brs -brf -l0 -bad -npcs -nprs -ncs <file>

Obviously, enforcing this project wise code convention would be
interesting (my favorite option actually) but OTOH not changing the
indentation of imported files also makes sense as it eases tracking
and porting upstream changes.

Any thought?

-- 
Henri
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: