-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Documentation 📗Enhancement ✨Improvement to a componentImprovement to a componentNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Current problem
In #5953, some messages do not follow the generic template with good code and bad code or can't be triggered easily. Among them:
internal errors
- astroid-error
configuration errors
- b/bad-plugin-value
Code that require multiple examples
There already are multiple example mixed in the existing files.
- missing-final-newline
- A <= symbol < D [doc] Use the new multiple file template for
A <= message-symbol < D#9006 - D < symbol < Z TODO
Messages that depend on multiple file or dependency to trigger
- import-error
- cyclic-import Add documentation for
cyclic-import#8322 - import-self
- d/duplicate-code
- n/non-ascii-file-name [doc] Add an example for 'non-ascii-file-name' #8340
other
- too-many-lines (Hard and meaningless to do parity behavior between bad/good, creating a new file is often the solution)
- b/bad-file-encoding (Need to be handled by the generating part)
- c/c-extension-no-member (This one is going to be hard to trigger, not for beginner)
- r/relative-beyond-top-level
Desired solution
We need to create templates for those message so we can generate the proper skeleton for them.
- For internal errors, probably only a message stating "You should never encounter this one, please open an issue if you do"
- For configuration errors a bad.toml and good.toml with some tests close to what we do for good.py / bad.py (maybe running on a dummy empty file)
- For code that require multiple examples, handle multiple example more gracefully than right now (we just add a longer example with multiple part)
Additional context
The Sphinx extension that generates these pages needs to be modified see #5953 (comment)
Metadata
Metadata
Assignees
Labels
Documentation 📗Enhancement ✨Improvement to a componentImprovement to a componentNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation