Nmap Development mailing list archives

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


From: James Rogers <jamesmrogers () gmail com>
Date: Wed, 18 Jul 2012 09:44:32 -0400

If we did indent every file then you can use gnu diff and ignore
whitespace instead of using svn diff to generate patches.

http://www.akatombo.com/en/comments/ignore_whitespace_in_a_subversion_diff/

On Wed, Jul 18, 2012 at 6:58 AM, Henri Doreau <henri.doreau () gmail com> wrote:
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/
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: