cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Coding style
Date Thu, 11 Aug 2016 15:30:00 GMT
The CXF rules do have a specific idea about order. It's in the rules,
you can read it.

Personally, FWLIW, I don't have a problem with 'extends Assert' for
tests that need a lot of different methods from Assert. It's not
ancient, ancient is 'extends TestCase'.


On Wed, Aug 10, 2016 at 7:40 AM, Colm O hEigeartaigh
<coheigea@apache.org> wrote:
> Checkstyle is integrated into the build process (e.g. mvn clean install),
> there is no need to call mvn checkstyle:check, which bypasses the
> CXF-specific checkstyle rules.
>
> Colm.
>
> On Wed, Aug 10, 2016 at 12:38 PM, Sergey Beryozkin <sberyozkin@gmail.com>
> wrote:
>
>> Hi
>>
>> No, I'm not seeing these ones
>>
>> Sergey
>> On 10/08/16 11:53, Behrang Saeedzadeh wrote:
>>
>>> Hi,
>>>
>>> I just cloned CXF from Github (master branch, commit:
>>> 395acbd2f16b03314f34ee0b6a212b708b375873) and running mvn
>>> checkstyle:check
>>> inside $PROJECT_ROOT/rt/rs/security/jose-parent generates 5955 errors for
>>> me: http://imgur.com/9VSrQvL
>>>
>>> Do you guys also get the same errors? Some examples:
>>>
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[56]
>>> (sizes) LineLength: Line is longer than 80 characters (found 90).
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[58]
>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[62]
>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[66]
>>> (sizes) LineLength: Line is longer than 80 characters (found 83).
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[75,5]
>>> (design) DesignForExtension: Method 'isJwsRequired' is not designed for
>>> extension - needs to be abstract, final or empty.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[75,5]
>>> (javadoc) JavadocMethod: Missing a Javadoc comment.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[79,5]
>>> (design) DesignForExtension: Method 'setJwsRequired' is not designed for
>>> extension - needs to be abstract, final or empty.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[79,5]
>>> (javadoc) JavadocMethod: Missing a Javadoc comment.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[79,32]
>>> (misc) FinalParameters: Parameter jwsRequired should be final.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[79,40]
>>> (coding) HiddenField: 'jwsRequired' hides a field.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[83,5]
>>> (design) DesignForExtension: Method 'isJweRequired' is not designed for
>>> extension - needs to be abstract, final or empty.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[83,5]
>>> (javadoc) JavadocMethod: Missing a Javadoc comment.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[87,5]
>>> (design) DesignForExtension: Method 'setJweRequired' is not designed for
>>> extension - needs to be abstract, final or empty.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[87,5]
>>> (javadoc) JavadocMethod: Missing a Javadoc comment.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[87,32]
>>> (misc) FinalParameters: Parameter jweRequired should be final.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[87,40]
>>> (coding) HiddenField: 'jweRequired' hides a field.
>>> [ERROR]
>>> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtPro
>>> ducer.java:[90]
>>> (regexp) RegexpSingleline: Line has trailing spaces.
>>>
>>>
>>> @Sergey and @Christian: I can give it a go. It might be possible to
>>> refactor all tests using grep/awk/sed and friends.
>>>
>>> In the meantime, let me go and read some doco about contribution
>>> guidelines
>>> and the project structure. :)
>>>
>>> Best regards,
>>> Behrang Saeedzadeh
>>>
>>> On 10 August 2016 at 20:20, Christian Schneider <chris@die-schneider.net>
>>> wrote:
>>>
>>> CXF Checkstyle seems to have a strange preference for import ordering. I
>>>> am also often hit by this.
>>>> I think this is defined in etc/eclipse/CXF.importorder.
>>>> Not sure how to get eclipse to use it though.
>>>>
>>>> Christian
>>>>
>>>>
>>>> On 10.08.2016 12:17, Sergey Beryozkin wrote:
>>>>
>>>> Hi
>>>>>
>>>>> Having static imports always has Checkstyle complaining for me.
>>>>> I'm fine with the new tests contributed which have the static imports
>>>>> that pass the command line builds :-).
>>>>> Refactoring the existing tests - are you referring to all of CXF unit
>>>>> tests ?
>>>>> Sergey
>>>>>
>>>>> On 10/08/16 11:09, Behrang Saeedzadeh wrote:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> I have noticed some test cases extend Assert (e.g. JwkUtilsTest
>>>>>> <https://github.com/apache/cxf/blob/e6ce20a8fb434abb5ff34f76
>>>>>> 9e63ac1c71f919b0/rt/rs/security/jose-parent/jose/src/
>>>>>> test/java/org/apache/cxf/rs/security/jose/jwk/JwkUtilsTest.java>)
>>>>>> while some test cases don't.
>>>>>>
>>>>>> I assume the extending Assert is a pre Java-5 style as back then
we
>>>>>> didn't
>>>>>> have static imports.
>>>>>>
>>>>>> Any objections to refactor these test cases and make them extend
>>>>>> nothing
>>>>>> (well, Object) and instead use static imports?
>>>>>>
>>>>>> Best regards,
>>>>>> Behrang Saeedzadeh
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>>
>>>>
>>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com

Mime
View raw message