cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Coding style
Date Wed, 10 Aug 2016 11:38:51 GMT
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/JoseJwtProducer.java:[56]
> (sizes) LineLength: Line is longer than 80 characters (found 90).
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[58]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[62]
> (regexp) RegexpSingleline: Line has trailing spaces.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[66]
> (sizes) LineLength: Line is longer than 80 characters (found 83).
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.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/JoseJwtProducer.java:[75,5]
> (javadoc) JavadocMethod: Missing a Javadoc comment.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.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/JoseJwtProducer.java:[79,5]
> (javadoc) JavadocMethod: Missing a Javadoc comment.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[79,32]
> (misc) FinalParameters: Parameter jwsRequired should be final.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[79,40]
> (coding) HiddenField: 'jwsRequired' hides a field.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.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/JoseJwtProducer.java:[83,5]
> (javadoc) JavadocMethod: Missing a Javadoc comment.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.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/JoseJwtProducer.java:[87,5]
> (javadoc) JavadocMethod: Missing a Javadoc comment.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[87,32]
> (misc) FinalParameters: Parameter jweRequired should be final.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.java:[87,40]
> (coding) HiddenField: 'jweRequired' hides a field.
> [ERROR]
> src/main/java/org/apache/cxf/rs/security/jose/jwt/JoseJwtProducer.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/

Mime
View raw message