Is there any tool can format source code according to kernel coding rule?
Hi all, I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc. Thanks very much in advance! Best Regards Nan Xiao
On Mon, Aug 3, 2015 at 9:05 AM, Nan Xiao <xiaonan830818@gmail.com> wrote:
Hi all,
I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc.
Thanks very much in advance!
Bit of googleing give you the lots of suggestion, One such script is present inside linux tree 'scripts/Lindent'
Best Regards
Nan Xiao
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
~ Chetan Nanda
Hi all,
I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc.
Thanks very much in advance!
Best Regards Nan Xiao
If your using vi(m) in command mode type gg=G this will indent your code . if your want kernel coding rules compatibility run your code through scripts/Lindent. There is a vim plugi-in http://www.vim.org/scripts/script.php?script_id=4369 will do the same.
On Mon, Aug 3, 2015 at 6:35 AM, Nan Xiao <xiaonan830818@gmail.com> wrote:
Hi all,
I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc.
Try scripts/Lindent from the kernel source tree. Daniel.
Hi Chetan, Aruna, Rameshbabu, Daniel, Thanks very much for all your time and kind advices! Best Regards Nan Xiao On Mon, Aug 3, 2015 at 6:27 PM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
On Mon, Aug 3, 2015 at 6:35 AM, Nan Xiao <xiaonan830818@gmail.com> wrote:
Hi all,
I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc.
Try scripts/Lindent from the kernel source tree.
Daniel.
participants (4)
-
Aruna Hewapathirane -
Chetan Nanda -
Daniel Baluta -
Nan Xiao