Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 20:32 +0200, Miguel Ojeda wrote: > On Wed, Oct 14, 2020 at 8:05 PM Joe Perches wrote: > > Any 'formatting off/on' marker should be tool agnostic. > > Agreed, they should have used a compiler-agnostic name for the marker. It means to me that linux has to invent one and any c

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Miguel Ojeda
On Wed, Oct 14, 2020 at 8:05 PM Joe Perches wrote: > > Any 'formatting off/on' marker should be tool agnostic. Agreed, they should have used a compiler-agnostic name for the marker. Cheers, Miguel

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 19:45 +0200, Miguel Ojeda wrote: > - Code that should be specially-formatted should be in a > clang-format-off section to begin with, so it doesn't count. clang-format is not the end-all tool. Any 'formatting off/on' marker should be tool agnostic.

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Miguel Ojeda
On Wed, Oct 14, 2020 at 10:40 AM Joe Perches wrote: > > Eek no. > > Mindless use of either tool isn't a great thing. That is up to opinion. I (and others) definitely want to get to the point the kernel sources are automatically formatted, because it has significant advantages. The biggest is that

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Ujjwal Kumar
On 14/10/20 11:16 am, Lukas Bulwahn wrote: > > > On Tue, 13 Oct 2020, Ujjwal Kumar wrote: > >> checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source >> files. The script leverages filename extensions and its path in >> the repository to decide whether to allow execute permissions on >>

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Lukas Bulwahn
On Tue, 13 Oct 2020, Joe Perches wrote: > On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > > > On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > > > > What does checkpatch.pl warn about and what does clang-format still > >

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Lukas Bulwahn
On Tue, 13 Oct 2020, Joe Perches wrote: > On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > > What does checkpatch.pl warn about and what does clang-format still warn > > about, which is generally accepted okay as style in the kernel? > > clang-format doesn't warn at all, it just refo

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Lukas Bulwahn
On Tue, 13 Oct 2020, Joe Perches wrote: > On Wed, 2020-10-14 at 07:46 +0200, Lukas Bulwahn wrote: > > Just one bigger project example: Comparing clang-format suggestions on > > patches against checkpatch.pl suggestions are fine-tuning both of them to > > fit to > > the actual kernel style. >

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Lukas Bulwahn
On Tue, 13 Oct 2020, Joe Perches wrote: > On Wed, 2020-10-14 at 08:47 +0200, Lukas Bulwahn wrote: > > > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > > > On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > > > > > > > On Wed, 2020-1

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Lukas Bulwahn
On Tue, 13 Oct 2020, Ujjwal Kumar wrote: > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > files. The script leverages filename extensions and its path in > the repository to decide whether to allow execute permissions on > the file or not. > > Based on current check condition

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Joe Perches
On Wed, 2020-10-14 at 09:17 +0200, Lukas Bulwahn wrote: > $ clang-format-10 --version > Ubuntu clang-format version > 10.0.1-++20200928083909+ef32c611aa2-1~exp1~20200928185400.194 > > $ clang-format-10 --help | grep 'dry-run' > --dry-run - If set, do not actually make the forma

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Wed, 2020-10-14 at 08:47 +0200, Lukas Bulwahn wrote: > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > > > > > On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > > > > > What doe

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Wed, 2020-10-14 at 08:36 +0200, Lukas Bulwahn wrote: > > On Tue, 13 Oct 2020, Joe Perches wrote: > > > On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > > > What does checkpatch.pl warn about and what does clang-format still warn > > > about, which is generally accepted okay as style

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Wed, 2020-10-14 at 08:21 +0200, Lukas Bulwahn wrote: > What does checkpatch.pl warn about and what does clang-format still warn > about, which is generally accepted okay as style in the kernel? clang-format doesn't warn at all, it just reformats. checkpatch using the --in-place can reformat a

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Wed, 2020-10-14 at 07:46 +0200, Lukas Bulwahn wrote: > Just one bigger project example: Comparing clang-format suggestions on > patches against checkpatch.pl suggestions are fine-tuning both of them to fit > to > the actual kernel style. Eek no. Mindless use of either tool isn't a great thi

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Joe Perches
On Tue, 2020-10-13 at 17:43 +0530, Ujjwal Kumar wrote: > Consider the following case: > a python script file with '.py' filename extension but without > a shebang line. Would it be meaningful to allow execute permission > on such a file? More the question I think is for a patch to that file, how d

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Ujjwal Kumar
On 13/10/20 5:31 pm, Ujjwal Kumar wrote: > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > files. The script leverages filename extensions and its path in > the repository to decide whether to allow execute permissions on > the file or not. > > Based on current check conditions, a