Re: [Discuss] Lint rules should be kept or removed

2019-07-18 Thread 王仁敏
Thanks for your advice.

York Shen  于2019年7月19日周五 上午11:52写道:

> I’d like the idea of code lint(C++/OC/Java/etc…) in Travis CI. What’s
> more, you could improve your PR [1] in the following aspect:
>
> Fix the lint issues especially lint errors in before enabling the Lint in
> Travis
> Output the code lint result in Danger and make the Danger failed if there
> is an error lint. I think people rarely read the log of Travis if the build
> successes.
>
> I think the default Android lint is good enough, as for OCLint, maybe
> someone with iOS experienced could give some suggestion.
>
> [1] https://github.com/apache/incubator-weex/pull/2731 <
> https://github.com/apache/incubator-weex/pull/2731>
>
> Best Regards,
> York Shen
>
> 申远
>
> > 在 2019年7月19日,10:11,王仁敏  写道:
> >
> > I think in OCLint, the following rules should be disabled.
> >
> >
> >   - Size 
> >  - HighCyclomaticComplexity
> >  <
> http://docs.oclint.org/en/stable/rules/size.html#highcyclomaticcomplexity>
> >  - LongClass
> >  
> >  - LongLine <
> http://docs.oclint.org/en/stable/rules/size.html#longline>
> >  - LongMethod
> >  
> >  - HighNcssMethod
> >  
> >  - DeepNestedBlock
> >  
> >  - HighNPathComplexity
> >  <
> http://docs.oclint.org/en/stable/rules/size.html#highnpathcomplexity>
> >  - TooManyFields
> >  
> >  - TooManyMethods
> >  
> >  - TooManyParameters
> >   >
> >   - Naming 
> >  - LongVariableName
> >  <
> http://docs.oclint.org/en/stable/rules/naming.html#longvariablename>
> >  - ShortVariableName
> >  <
> http://docs.oclint.org/en/stable/rules/naming.html#shortvariablename>
> >
> >
> > 王仁敏  于2019年7月19日周五 上午9:50写道:
> >
> >> Hi there,
> >>
> >>
> >> I'm trying to add some static lint checks to CI, now OCLint(for c, c++
> >> and objective-c) and AndroidLint already get ready in CI.
> >>
> >> But OCLint and AndroidLint have too many rules, many of which have
> little
> >> impact. so maybe should we discuss about which rules to keep or which
> rules
> >> to remove.
> >>
> >>
> >> OCLint Rule List: http://docs.oclint.org/en/stable/rules/index.html
> >>
> >> AndroidLint Rule List: http://tools.android.com/tips/lint-checks
> >>
> >> AndroidLint Help: http://www.androiddocs.com/tools/help/lint.html
> >>
> >>
> >> The below is the doctest
> >>  reference
> for
> >> OCLint:
> >>
> >> ```
> >>
> >> -disable-rule=ShortVariableName \
> >>
> >>  -disable-rule=LongLine \
> >>
> >>  -disable-rule=LongMethod \
> >>
> >>  -disable-rule=HighNcssMethod \
> >>
> >>  -disable-rule=LongVariableName \
> >>
> >>  -disable-rule=HighCyclomaticComplexity \
> >>
> >>  -disable-rule=HighNPathComplexity \
> >>
> >>  -disable-rule=UnusedLocalVariable \
> >>
> >>  -disable-rule=DoubleNegative \
> >>
> >>  -disable-rule=MultipleUnaryOperator \
> >>
> >>  -disable-rule=DeepNestedBlock \
> >>
> >> ```
> >>
> >>
> >> Best Wishes.
> >>
> >> RenMin Wang
> >>
> >>
> >>
>
>


Re: [Discuss] Lint rules should be kept or removed

2019-07-18 Thread York Shen
I’d like the idea of code lint(C++/OC/Java/etc…) in Travis CI. What’s more, you 
could improve your PR [1] in the following aspect:

Fix the lint issues especially lint errors in before enabling the Lint in Travis
Output the code lint result in Danger and make the Danger failed if there is an 
error lint. I think people rarely read the log of Travis if the build successes.

I think the default Android lint is good enough, as for OCLint, maybe someone 
with iOS experienced could give some suggestion.

[1] https://github.com/apache/incubator-weex/pull/2731 


Best Regards,
York Shen

申远

> 在 2019年7月19日,10:11,王仁敏  写道:
> 
> I think in OCLint, the following rules should be disabled.
> 
> 
>   - Size 
>  - HighCyclomaticComplexity
>  
> 
>  - LongClass
>  
>  - LongLine 
>  - LongMethod
>  
>  - HighNcssMethod
>  
>  - DeepNestedBlock
>  
>  - HighNPathComplexity
>  
>  - TooManyFields
>  
>  - TooManyMethods
>  
>  - TooManyParameters
>  
>   - Naming 
>  - LongVariableName
>  
>  - ShortVariableName
>  
> 
> 
> 王仁敏  于2019年7月19日周五 上午9:50写道:
> 
>> Hi there,
>> 
>> 
>> I'm trying to add some static lint checks to CI, now OCLint(for c, c++
>> and objective-c) and AndroidLint already get ready in CI.
>> 
>> But OCLint and AndroidLint have too many rules, many of which have little
>> impact. so maybe should we discuss about which rules to keep or which rules
>> to remove.
>> 
>> 
>> OCLint Rule List: http://docs.oclint.org/en/stable/rules/index.html
>> 
>> AndroidLint Rule List: http://tools.android.com/tips/lint-checks
>> 
>> AndroidLint Help: http://www.androiddocs.com/tools/help/lint.html
>> 
>> 
>> The below is the doctest
>>  reference for
>> OCLint:
>> 
>> ```
>> 
>> -disable-rule=ShortVariableName \
>> 
>>  -disable-rule=LongLine \
>> 
>>  -disable-rule=LongMethod \
>> 
>>  -disable-rule=HighNcssMethod \
>> 
>>  -disable-rule=LongVariableName \
>> 
>>  -disable-rule=HighCyclomaticComplexity \
>> 
>>  -disable-rule=HighNPathComplexity \
>> 
>>  -disable-rule=UnusedLocalVariable \
>> 
>>  -disable-rule=DoubleNegative \
>> 
>>  -disable-rule=MultipleUnaryOperator \
>> 
>>  -disable-rule=DeepNestedBlock \
>> 
>> ```
>> 
>> 
>> Best Wishes.
>> 
>> RenMin Wang
>> 
>> 
>> 



Re: [Discuss] Lint rules should be kept or removed

2019-07-18 Thread 王仁敏
I think in OCLint, the following rules should be disabled.


   - Size 
  - HighCyclomaticComplexity
  

  - LongClass
  
  - LongLine 
  - LongMethod
  
  - HighNcssMethod
  
  - DeepNestedBlock
  
  - HighNPathComplexity
  
  - TooManyFields
  
  - TooManyMethods
  
  - TooManyParameters
  
   - Naming 
  - LongVariableName
  
  - ShortVariableName
  


王仁敏  于2019年7月19日周五 上午9:50写道:

> Hi there,
>
>
> I'm trying to add some static lint checks to CI, now OCLint(for c, c++
> and objective-c) and AndroidLint already get ready in CI.
>
> But OCLint and AndroidLint have too many rules, many of which have little
> impact. so maybe should we discuss about which rules to keep or which rules
> to remove.
>
>
> OCLint Rule List: http://docs.oclint.org/en/stable/rules/index.html
>
> AndroidLint Rule List: http://tools.android.com/tips/lint-checks
>
> AndroidLint Help: http://www.androiddocs.com/tools/help/lint.html
>
>
> The below is the doctest
>  reference for
> OCLint:
>
> ```
>
> -disable-rule=ShortVariableName \
>
>   -disable-rule=LongLine \
>
>   -disable-rule=LongMethod \
>
>   -disable-rule=HighNcssMethod \
>
>   -disable-rule=LongVariableName \
>
>   -disable-rule=HighCyclomaticComplexity \
>
>   -disable-rule=HighNPathComplexity \
>
>   -disable-rule=UnusedLocalVariable \
>
>   -disable-rule=DoubleNegative \
>
>   -disable-rule=MultipleUnaryOperator \
>
>   -disable-rule=DeepNestedBlock \
>
> ```
>
>
> Best Wishes.
>
> RenMin Wang
>
>
>


[Discuss] Lint rules should be kept or removed

2019-07-18 Thread 王仁敏
Hi there,


I'm trying to add some static lint checks to CI, now OCLint(for c, c++ and
objective-c) and AndroidLint already get ready in CI.

But OCLint and AndroidLint have too many rules, many of which have little
impact. so maybe should we discuss about which rules to keep or which rules
to remove.


OCLint Rule List: http://docs.oclint.org/en/stable/rules/index.html

AndroidLint Rule List: http://tools.android.com/tips/lint-checks

AndroidLint Help: http://www.androiddocs.com/tools/help/lint.html


The below is the doctest
 reference for
OCLint:

```

-disable-rule=ShortVariableName \

  -disable-rule=LongLine \

  -disable-rule=LongMethod \

  -disable-rule=HighNcssMethod \

  -disable-rule=LongVariableName \

  -disable-rule=HighCyclomaticComplexity \

  -disable-rule=HighNPathComplexity \

  -disable-rule=UnusedLocalVariable \

  -disable-rule=DoubleNegative \

  -disable-rule=MultipleUnaryOperator \

  -disable-rule=DeepNestedBlock \

```


Best Wishes.

RenMin Wang