diff --git a/doc/conf.py b/doc/conf.py index 954aaf626a..da618cf252 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -62,6 +62,7 @@ "messages/messages_list": "../user_guide/messages/messages_overview.html", "user_guide/message-control": "messages/message_control.html", "technical_reference/c_extensions": "../user_guide/messages/error/no-member.html", + "user_guide/configuration/naming-styles": "../user_guide/messages/convention/invalid-name.html", "development/testing": "tests/index.html", } diff --git a/doc/data/messages/i/invalid-name/bad.py b/doc/data/messages/i/invalid-name/bad.py new file mode 100644 index 0000000000..fac9b49472 --- /dev/null +++ b/doc/data/messages/i/invalid-name/bad.py @@ -0,0 +1,8 @@ +class cat: # [invalid-name] + + def Meow(self, NUMBER_OF_MEOW): # [invalid-name, invalid-name] + print("Meow" * NUMBER_OF_MEOW) + return NUMBER_OF_MEOW + + +Cat = cat().Meow(42) # [invalid-name] diff --git a/doc/user_guide/configuration/naming-styles.rst b/doc/data/messages/i/invalid-name/details.rst similarity index 98% rename from doc/user_guide/configuration/naming-styles.rst rename to doc/data/messages/i/invalid-name/details.rst index b27e736768..0a612101ef 100644 --- a/doc/user_guide/configuration/naming-styles.rst +++ b/doc/data/messages/i/invalid-name/details.rst @@ -1,12 +1,3 @@ -.. -*- coding: utf-8 -*- - -=============== - Naming styles -=============== - -Introduction -~~~~~~~~~~~~ - Pylint recognizes a number of different name types internally. With a few exceptions, the type of the name is governed by the location the assignment to a name is found in, and not the type of object assigned. diff --git a/doc/data/messages/i/invalid-name/good.py b/doc/data/messages/i/invalid-name/good.py new file mode 100644 index 0000000000..3decdb3e4a --- /dev/null +++ b/doc/data/messages/i/invalid-name/good.py @@ -0,0 +1,8 @@ +class Cat: + + def meow(self, number_of_meow): + print("Meow" * number_of_meow) + return number_of_meow + + +CAT = Cat().meow(42) diff --git a/doc/user_guide/configuration/.gitkeep b/doc/user_guide/configuration/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/doc/user_guide/options.rst b/doc/user_guide/options.rst index 6ba27ef1b8..135034df9d 100644 --- a/doc/user_guide/options.rst +++ b/doc/user_guide/options.rst @@ -7,4 +7,3 @@ Configuration :titlesonly: configuration/all-options - configuration/naming-styles