Hi,

I'm new to PyLint. I'm writing a python script to calculate the Coding Convention Error by changing the formula in .pylintrc file:

10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)

When I run the script I get the following response. 

Using config file /private/var/root/.pylintrc

************* Module shortQuestion

W:  5, 0: Found indentation with tabs instead of spaces (mixed-indentation)

W:  6, 0: Found indentation with tabs instead of spaces (mixed-indentation)

W:  7, 0: Found indentation with tabs instead of spaces (mixed-indentation)

W:  8, 0: Found indentation with tabs instead of spaces (mixed-indentation)

C:  1, 0: Module name "shortQuestion" doesn't conform to snake_case naming style (invalid-name)

C:  1, 0: Missing module docstring (missing-docstring)

C:  4, 0: Function name "isContained" doesn't conform to snake_case naming style (invalid-name)

C:  4, 0: Missing function docstring (missing-docstring)

R:  5, 1: Unnecessary "else" after "return" (no-else-return)

W:  4,16: Unused argument 'cls' (unused-argument)


----------------------------------------------------------------------

Your code has been rated at -15.00/10 (previous run: 10.00/10, -25.00)


Is the -15.00/10 the required error? If yes, how can I get the formatted response? Secondly I'm redirecting output of 

pylint.lint.Run() using StringIO() but still get the following on the console.


Using config file ~/.pylintrc

Using config file ~/.pylintrc

Using config file ~/.pylintrc


How can I avoid this?


Following is the code snippet for calculating cyclomatic complexity:


 my_output = StringIO()

 reporter = TextReporter(output=my_output)

 pylint_opts = ['file.py','--load-plugins=pylint.extensions.mccabe', '--max-complexity=0','--rcfile=~/.pylintrc','--msg-template= {msg_id},{symbol},{msg}']

 pylint.lint.Run(pylint_opts,reporter=reporter, exit=False)

 output_str = my_output.getvalue()



Thanks