diff mbox

[v3,1/2] scripts: odp_check: remove astyle

Message ID 1428427624-27075-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit a343f1f52fd7f5bf8ac2d0be501b5e9bbdb7717d
Headers show

Commit Message

Mike Holmes April 7, 2015, 5:27 p.m. UTC
ODP has not adopted a style that can be universally applied with a tool
such as astyle.
Remove astyle leaving only the cleanup for whitespace and checkpatch
elements for checking src files before a patch is created.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 scripts/odp_check | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Comments

Maxim Uvarov April 10, 2015, 3:51 p.m. UTC | #1
On 04/07/15 20:27, Mike Holmes wrote:
> ODP has not adopted a style that can be universally applied with a tool
> such as astyle.
> Remove astyle leaving only the cleanup for whitespace and checkpatch
> elements for checking src files before a patch is created.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   scripts/odp_check | 10 +---------
>   1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/scripts/odp_check b/scripts/odp_check
> index 09c859b..33809dc 100755
> --- a/scripts/odp_check
> +++ b/scripts/odp_check
> @@ -1,8 +1,6 @@
>   #!/bin/bash
>   #
> -# This script is an indenter, white space remover,
> -# formatter, and beautifier and general source file
> -# clean up for the  ODP project.
> +# This script is a clean up for the ODP project src files.
>   #
>   # Usage
>   # ./scripts/opd_check <path/filename>
That is better to make it 1 patch. Because line above needs to be 
changed also if you rename this file.

Maxim.
> @@ -10,11 +8,5 @@ set -e
>   
>   DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>   
> -if ! type "astyle" >/dev/null >/dev/null; then
> -   echo "Please install astyle from http://astyle.sourceforge.net/"
> -   exit -1
> -fi
> -
> -astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
>   $DIR/cleanfile $1
>   $DIR/checkpatch.pl -f $1
Bill Fischofer April 10, 2015, 4:01 p.m. UTC | #2
I still don't calling something that changes a file a "checker".  A checker
implies read-only access.  Something like odp_reformat or
odp_check_and_reformat would be better.

On Fri, Apr 10, 2015 at 10:51 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> On 04/07/15 20:27, Mike Holmes wrote:
>
>> ODP has not adopted a style that can be universally applied with a tool
>> such as astyle.
>> Remove astyle leaving only the cleanup for whitespace and checkpatch
>> elements for checking src files before a patch is created.
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>   scripts/odp_check | 10 +---------
>>   1 file changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/scripts/odp_check b/scripts/odp_check
>> index 09c859b..33809dc 100755
>> --- a/scripts/odp_check
>> +++ b/scripts/odp_check
>> @@ -1,8 +1,6 @@
>>   #!/bin/bash
>>   #
>> -# This script is an indenter, white space remover,
>> -# formatter, and beautifier and general source file
>> -# clean up for the  ODP project.
>> +# This script is a clean up for the ODP project src files.
>>   #
>>   # Usage
>>   # ./scripts/opd_check <path/filename>
>>
> That is better to make it 1 patch. Because line above needs to be changed
> also if you rename this file.
>
> Maxim.
>
>> @@ -10,11 +8,5 @@ set -e
>>     DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>>   -if ! type "astyle" >/dev/null >/dev/null; then
>> -   echo "Please install astyle from http://astyle.sourceforge.net/"
>> -   exit -1
>> -fi
>> -
>> -astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
>>   $DIR/cleanfile $1
>>   $DIR/checkpatch.pl -f $1
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov April 10, 2015, 4:03 p.m. UTC | #3
On 04/10/15 19:01, Bill Fischofer wrote:
> I still don't calling something that changes a file a "checker".  A 
> checker implies read-only access.  Something like odp_reformat or 
> odp_check_and_reformat would be better.
>

formatter should have checker not know how to format, checker word might 
be not needed here.

Maxim.


> On Fri, Apr 10, 2015 at 10:51 AM, Maxim Uvarov 
> <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     On 04/07/15 20:27, Mike Holmes wrote:
>
>         ODP has not adopted a style that can be universally applied
>         with a tool
>         such as astyle.
>         Remove astyle leaving only the cleanup for whitespace and
>         checkpatch
>         elements for checking src files before a patch is created.
>
>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>         <mailto:mike.holmes@linaro.org>>
>         ---
>           scripts/odp_check | 10 +---------
>           1 file changed, 1 insertion(+), 9 deletions(-)
>
>         diff --git a/scripts/odp_check b/scripts/odp_check
>         index 09c859b..33809dc 100755
>         --- a/scripts/odp_check
>         +++ b/scripts/odp_check
>         @@ -1,8 +1,6 @@
>           #!/bin/bash
>           #
>         -# This script is an indenter, white space remover,
>         -# formatter, and beautifier and general source file
>         -# clean up for the  ODP project.
>         +# This script is a clean up for the ODP project src files.
>           #
>           # Usage
>           # ./scripts/opd_check <path/filename>
>
>     That is better to make it 1 patch. Because line above needs to be
>     changed also if you rename this file.
>
>     Maxim.
>
>         @@ -10,11 +8,5 @@ set -e
>             DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>           -if ! type "astyle" >/dev/null >/dev/null; then
>         -   echo "Please install astyle from
>         http://astyle.sourceforge.net/"
>         -   exit -1
>         -fi
>         -
>         -astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
>           $DIR/cleanfile $1
>           $DIR/checkpatch.pl <http://checkpatch.pl> -f $1
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Mike Holmes April 10, 2015, 5:21 p.m. UTC | #4
On 10 April 2015 at 12:01, Bill Fischofer <bill.fischofer@linaro.org> wrote:

> I still don't calling something that changes a file a "checker".  A
> checker implies read-only access.  Something like odp_reformat or
> odp_check_and_reformat would be better.
>

Ok but you agreed to  "odp_clean_and_check"  on the original patch so I
just need to know what we wan to call it.

The purpose of this script is to expressly to do the clean up and give you
feed back on what you have to tidy up by hand in a file before you bother
to make a patch and run check patch, which takes a lot more effort to cycle
round.  With the name "odp_clean_and_check"   it really does do exactly
what it says on the tin.
 odp_clean_and_ch odp_clean_and_check


>
> On Fri, Apr 10, 2015 at 10:51 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
>
>> On 04/07/15 20:27, Mike Holmes wrote:
>>
>>> ODP has not adopted a style that can be universally applied with a tool
>>> such as astyle.
>>> Remove astyle leaving only the cleanup for whitespace and checkpatch
>>> elements for checking src files before a patch is created.
>>>
>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>>> ---
>>>   scripts/odp_check | 10 +---------
>>>   1 file changed, 1 insertion(+), 9 deletions(-)
>>>
>>> diff --git a/scripts/odp_check b/scripts/odp_check
>>> index 09c859b..33809dc 100755
>>> --- a/scripts/odp_check
>>> +++ b/scripts/odp_check
>>> @@ -1,8 +1,6 @@
>>>   #!/bin/bash
>>>   #
>>> -# This script is an indenter, white space remover,
>>> -# formatter, and beautifier and general source file
>>> -# clean up for the  ODP project.
>>> +# This script is a clean up for the ODP project src files.
>>>   #
>>>   # Usage
>>>   # ./scripts/opd_check <path/filename>
>>>
>> That is better to make it 1 patch. Because line above needs to be changed
>> also if you rename this file.
>>
>> Maxim.
>>
>>> @@ -10,11 +8,5 @@ set -e
>>>     DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>>>   -if ! type "astyle" >/dev/null >/dev/null; then
>>> -   echo "Please install astyle from http://astyle.sourceforge.net/"
>>> -   exit -1
>>> -fi
>>> -
>>> -astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
>>>   $DIR/cleanfile $1
>>>   $DIR/checkpatch.pl -f $1
>>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Maxim Uvarov April 14, 2015, 9:48 a.m. UTC | #5
applied patch 1, patch 2 needs fix name after rename in script body.

Maxim.

On 04/07/15 20:27, Mike Holmes wrote:
> ODP has not adopted a style that can be universally applied with a tool
> such as astyle.
> Remove astyle leaving only the cleanup for whitespace and checkpatch
> elements for checking src files before a patch is created.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   scripts/odp_check | 10 +---------
>   1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/scripts/odp_check b/scripts/odp_check
> index 09c859b..33809dc 100755
> --- a/scripts/odp_check
> +++ b/scripts/odp_check
> @@ -1,8 +1,6 @@
>   #!/bin/bash
>   #
> -# This script is an indenter, white space remover,
> -# formatter, and beautifier and general source file
> -# clean up for the  ODP project.
> +# This script is a clean up for the ODP project src files.
>   #
>   # Usage
>   # ./scripts/opd_check <path/filename>
> @@ -10,11 +8,5 @@ set -e
>   
>   DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>   
> -if ! type "astyle" >/dev/null >/dev/null; then
> -   echo "Please install astyle from http://astyle.sourceforge.net/"
> -   exit -1
> -fi
> -
> -astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
>   $DIR/cleanfile $1
>   $DIR/checkpatch.pl -f $1
diff mbox

Patch

diff --git a/scripts/odp_check b/scripts/odp_check
index 09c859b..33809dc 100755
--- a/scripts/odp_check
+++ b/scripts/odp_check
@@ -1,8 +1,6 @@ 
 #!/bin/bash
 #
-# This script is an indenter, white space remover,
-# formatter, and beautifier and general source file
-# clean up for the  ODP project.
+# This script is a clean up for the ODP project src files.
 #
 # Usage
 # ./scripts/opd_check <path/filename>
@@ -10,11 +8,5 @@  set -e
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
-if ! type "astyle" >/dev/null >/dev/null; then
-   echo "Please install astyle from http://astyle.sourceforge.net/" 
-   exit -1
-fi
-
-astyle --style=linux --indent=force-tab=8 --align-pointer=name $1
 $DIR/cleanfile $1
 $DIR/checkpatch.pl -f $1