summaryrefslogtreecommitdiff
path: root/tests/message
Commit message (Collapse)AuthorAgeFilesLines
* Changing flake8 to have max-line-length of 115 (#8362)Ollie2023-03-021-1/+2
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add `magic-number` checker for comparison with literals (#7526)orSolocate2022-10-221-1/+1
| | | Co-authored-by: Or Bahari <or.bahari@samsung.com>
* Use 'py-version' when accounting for max/min version of checker (#7580)Dani Alcala2022-10-131-5/+26
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Finish typing across the codebaseDaniël van Noord2022-09-091-1/+1
|
* Finish unfinished typing in non core directories (#7443)Daniël van Noord2022-09-091-1/+8
| | | | | | | | * Add typing to setup calls in documentation folder * Finish some incomplete typing signatures in script * Add typing to unfinished signatures in the tests directory
* [empty-comment] fix checker name in code and docs (#6996)Ville Skyttä2022-07-051-1/+1
|
* [pylint.message] Add a location attribute to 'pylint.Message'Pierre Sassoulas2022-06-291-0/+2
|
* Add support of sharing message in multiple checkers. Fix DeprecatedChecker ↵Matus Valo2022-06-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | example (#6693) * Move message definitions from DeprecatedMixin * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added typing and fixed unittests * Make DEPRECATED_MSGS and DEPRECATED_IMPORT_MSG class variables to make pylint happy * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Introduce shared messages * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Change Message codes in DeprecatedMixin to W49XX * Make mypy happy * Make pylint happy * Add support for building documentation for shared messages * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Make isort happy * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Circuvent isort * Move shared to extra message options and fix tests * Update deprecation_checker example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update doc/exts/pylint_messages.py Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> * Update doc/exts/pylint_messages.py Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> * Make messages static class attributes * Keep MessageDefinition backward compatible * Apply suggestions from code review Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* [deleted messages] Add an exception for deleted messages in MessageIdStorePierre Sassoulas2022-06-041-2/+2
|
* [deleted messages] Refactor the constant to be able to give a reasonPierre Sassoulas2022-06-041-5/+6
|
* Use main instead of master as main checker name (#6569)Daniël van Noord2022-05-101-1/+1
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix typo in test_exclusivity_of_msgidsJacob Walls2022-04-291-1/+1
|
* Use an empty pylintrc for tests using project's pylintrc implicitelyPierre Sassoulas2022-04-261-7/+3
| | | | | | | | | | We don't want to use the project's pylintrc during tests, because it means that a change in our config could break tests. But we want to see if the changes to the default break tests. Create a private '_Run' class in pylint.testutil._run Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Use ``python-typing-update`` on second half of the ``tests`` directoryDaniël van Noord2022-04-143-7/+12
|
* Make ``linter`` non-optional for ``BaseChecker`` (#6188)Daniël van Noord2022-04-113-0/+21
|
* Add a pre-commit hook to check the copyright noticePierre Sassoulas2022-03-247-6/+10
| | | | | Fix the existing file so they have a notice. No header for setup.py or examples or doc
* Simplify hard to maintain copyright noticePierre Sassoulas2022-03-246-0/+6
| | | | | | git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names.
* Add a test to check that no old msgid or symbol are used (#5839)Pierre Sassoulas2022-02-261-0/+17
| | | | | | | | | | * Add deleted msgid and symbol from the Python 3K+ checker and other deleted checks. See https://github.com/PyCQA/pylint/pull/4942 Closes #5729 Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Update ``pydocstringformatter`` to 0.4.0 (#5787)Daniël van Noord2022-02-101-1/+1
|
* Add test for exclusivity of id names (#5615)Daniël van Noord2022-01-061-0/+48
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix typos accross the whole codebase (#5575)Pierre Sassoulas2021-12-211-4/+4
| | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Add ``end_lineno`` and ``end_col_offset`` to ``MessageLocationTuple`` (#5343)Daniël van Noord2021-11-221-0/+4
|
* Create a framework of functional tests for configuration files (#5287)Pierre Sassoulas2021-11-121-1/+1
| | | | | | | | | | * Migrate old unittest to the new framework for testing. * Add a regression test for #4746 : This permits to introduce an example of configuration file with an error. * Proper import for pytest import of CaptureFixture Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Type `add_message` and add `MessageLocationTuple` (#5050)Daniël van Noord2021-09-211-27/+22
| | | | | | * Type `add_message` and add `MessageLocationTuple` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add typing with `PyAnnotate` to `./tests` (#4950)Daniël van Noord2021-09-045-40/+58
| | | | | | * Add mypy_extensions to requirement for ``NoReturn`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix copyright links (#4647)Marc Mueller2021-07-015-5/+5
| | | | * Fix link in license header * Update link to astroid bump_changelog
* Refactor register_message_definition to prevent circular importPierre Sassoulas2021-06-021-1/+5
|
* Changes after black updateMarc Mueller2021-04-261-1/+1
|
* Rename copying to license and upgrade the setup.cfg (#4338)Pierre Sassoulas2021-04-115-5/+5
|
* Refactor MessageId Store with a better error messagePierre Sassoulas2021-04-091-2/+2
|
* Move from format() to f-string where it makes sensePierre Sassoulas2021-02-161-4/+4
| | | | As we do not maintain python 3.5 it permit to simplify some code
* Remove import and rename file to use pytest's conftest.pyPierre Sassoulas2020-04-204-18/+5
| | | | Close #3493 see https://docs.pytest.org/en/2.7.3/plugins.html?highlight=re
* [tests lint] Fix all W0611 unused-import in pylint's own testsPierre Sassoulas2020-04-203-4/+6
|
* [tests lint] Fix all 'no-self-use' in pylint's own testsPierre Sassoulas2020-04-202-24/+30
|
* Get rid of a bunch of yoda conditions in tests (misplaced-comparison-constant)Pierre Sassoulas2020-04-201-2/+2
|
* [tests lint] Fix all W0612 unused-variable in pylint's own testsPierre Sassoulas2020-04-202-4/+4
|
* [tox] Extend the black check to the relevant parts in testsPierre Sassoulas2020-04-201-2/+2
| | | | Also apply the formatting.
* pyupgrade: automated removal of python2 constructsAnthony Sottile2020-03-245-12/+2
| | | | | | | | | | | | | using configuration: ```yaml - repo: https://github.com/asottile/pyupgrade rev: v2.1.0 hooks: - id: pyupgrade args: [--py3-plus, --keep-percent-format] exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/) ```
* Refactor file checking for a simpler parallel API (#3016)Janne Rönkkö2019-10-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prepares the code for enabling Prospector to take advantage of running PyLint parallel. Iterating files is moved into generator (_iterate_file_descrs) so that parallel checking can use the same implementation (_check_file) just by providing different kind of generator that reads the files from parent process. The refactoring removes code duplication that existed in PyLinter._do_check method; checking module content from stdin had identical implementation to checking content from a source file. Made PyLinter.expand_files a private method. The previous implementation of parallel linting created new PyLinter objects in the worker (child) process causing failure when running under Prospector because Prospector uses a custom PyLinter class (a class inherited from PyLinter) and PyLint naturally just creates PyLinter object. This caused linting to fail because there is options for Prospector's IndentChecker which was not created in the worker process. The new implementation passes the original PyLinter object into workers when the workers are created. See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods Note that as Windows uses spawn method by default, PyLinter object (and its) members need to be pickleable from now on with the exception being PyLinter.reporter which is not passed to child processes. The performance has remained about the same based on quick tests done with Django project containing about 30 000 lines of code; with the old implementation linting took 26-28 seconds with 8 jobs on quad core i7 and 24-27 seconds with the new implementation.
* [tests.message] Add a test for multiple messages with the same old namePierre Sassoulas2019-09-102-0/+53
|
* [pylint.message] Simplification with 1-1 link between symbol and msgidPierre Sassoulas2019-08-192-161/+190
| | | | Also add a lot of unit tests.
* [tests.message] Create a test for MessageDefinition __str__Pierre Sassoulas2019-08-191-0/+9
|
* [pylint.message] Create a MessageDefinition.check_msgid functionPierre Sassoulas2019-08-192-13/+19
|
* [pylint.message] Create a MessageIdStore classPierre Sassoulas2019-08-193-0/+149
|
* [pylint.message] Rename MessagesStore to MessageDefinitionStorePierre Sassoulas2019-08-092-5/+5
| | | | We anticipate to have a MessageIdStore.
* [pylint.message] Add unittests for MessageDefinitionPierre Sassoulas2019-08-061-0/+85
|
* [pylint.message] Remove MessageStore.add_renamed_messagePierre Sassoulas2019-08-061-17/+0
| | | | It was only used in tests never in code.
* Test - Handle the case where the msgid does not existPierre Sassoulas2019-06-201-1/+3
|
* Test - Add unittest for MessageStore format helpPierre Sassoulas2019-06-201-0/+25
|
* Stopped installing tests with packageAshley Whetter2019-06-202-0/+266