edaniszewski / pylint-quotes

Pylint plugin for checking the consistency of string quotes
MIT License
41 stars 12 forks source link

Couldn't load plugin with pylintrc.ini #12

Closed md1023 closed 6 years ago

md1023 commented 6 years ago
load-plugins=pylint_quotes

has no effect when put into pylintrc.ini, instead I have to call load-plugins every time:

pylint --rcfile=pylintrc.ini --load-plugins pylint_quotes api
edaniszewski commented 6 years ago

This doesn't sound like an issue w/ pylint-quotes per-se, but an issue with your environment. I pushed a branch that has an example package and a pylintrc.ini file that specifies pylint_quotes under the load-plugins option. From that branch:

edaniszewski ~/dev/edaniszewski/pylint-quotes/example (pylintrc *) ➜ cat pylintrc.ini 
[MASTER]
load-plugins=pylint_quotes
edaniszewski ~/dev/edaniszewski/pylint-quotes/example (pylintrc *) ➜ pylint --rcfile=pylintrc.ini package/
Using config file /Users/edaniszewski/dev/edaniszewski/pylint-quotes/example/pylintrc.ini
************* Module package.example
C:  4, 0: Invalid string quote ", should be ' (invalid-string-quote)
C: 11, 0: Invalid string quote ", should be ' (invalid-string-quote)
C:  5, 0: Invalid docstring quote ''', should be """ (invalid-docstring-quote)

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

edaniszewski ~/dev/edaniszewski/pylint-quotes/example (pylintrc *) ➜ # remove pylint_quotes from pylintrc
edaniszewski ~/dev/edaniszewski/pylint-quotes/example (pylintrc *) ➜ cat pylintrc.ini 
[MASTER]
load-plugins=
edaniszewski ~/dev/edaniszewski/pylint-quotes/example (pylintrc *) ➜ pylint --rcfile=pylintrc.ini package/
Using config file /Users/edaniszewski/dev/edaniszewski/pylint-quotes/example/pylintrc.ini

-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 2.50/10, +7.50)
md1023 commented 6 years ago

Right, it was not under [MASTER] section. Sorry and thanks!

edaniszewski commented 6 years ago

No problem! Thanks for testing it out and verifying!