New issue
Advanced search Search tips

Issue 680627 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

autotest: lint some of that crud

Project Member Reported by pprabhu@chromium.org, Jan 12 2017

Issue description

I wrote a quick script to summarize the lint violations we have in autotest with the tiny set of lint checks that we do have turned on.
The script is up at https://chromium-review.googlesource.com/#/c/427411/

Here is a summary of the types of errors:

################################################                                     
Number of modules in which a certain type of error is seen:                          
       missing-class-docstring: 386                                                  
                 unused-import: 259                                                  
      missing-method-docstring: 247                                                  
    missing-function-docstring: 238                                                  
       missing-param-docstring: 215                                                  
informational-locally-disabled: 134                                                  
              logging-not-lazy: 103                                                  
informational-deprecated-pragma: 74                                                  
            undefined-variable: 26                                                   
     global-variable-undefined: 2                                                    
         empty-class-docstring: 1                                                    
################################################                                     
Total number of times a certain kind of error is seen:                               
Total number of warnings: 4966                                                       
      missing-method-docstring: 1437 (28.94 %) (Cumulative: 28.94 %)                 
       missing-param-docstring: 1268 (25.53 %) (Cumulative: 54.47 %)                 
       missing-class-docstring: 631 (12.71 %) (Cumulative: 67.18 %)                  
    missing-function-docstring: 591 (11.90 %) (Cumulative: 79.08 %)                  
                 unused-import: 453 (9.12 %) (Cumulative: 88.20 %)                   
              logging-not-lazy: 286 (5.76 %) (Cumulative: 93.96 %)                   
informational-locally-disabled: 143 (2.88 %) (Cumulative: 96.84 %)                   
informational-deprecated-pragma: 90 (1.81 %) (Cumulative: 98.65 %)                   
            undefined-variable: 63 (1.27 %) (Cumulative: 99.92 %)                    
     global-variable-undefined: 3 (0.06 %) (Cumulative: 99.98 %)                     
         empty-class-docstring: 1 (0.02 %) (Cumulative: 100.00 %) 



My recommendation is to not bother with the docstring violations en masse, but go after unused-import, undefined-variable and global-variable-undefined errors. These can lead to subtle bugs.

If we _really_ want, we can also fix the logging-not-lazy ones.

A more detailed breakdown of the pylint errors attached.
 
pylint.summary.2
164 KB Download
Status: Archived (was: Untriaged)
This bug has not been touched in over a year.  It is probably no longer relevant.

Sign in to add a comment