-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use double quotes in error messages for more consistent colors #7445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Some more examples:
|
Also #5072 is kind of related because type representations can be unnecessary long. |
@JukkaL Can I work on this issue? Also, Can you explain where I have to make the changes? |
@Patil2099 Sure! Here are some hints:
|
I would like to work on this issue. So please can you guide me what to do and where to start my work? |
@Sechan-tkd you can look for places where we currently emit single-quoted strings, perhaps by reading through |
Should I need to update every single-quoted strings to double-quoted strings? Or else what should I do? |
You can update one kind of message (or several messages) at a time, and fix any test failures that result from this. Even a single updated message is good enough for a PR -- no need to do everything at once. However, it's important to also update tests. |
I dont know how to do . Can you please guide me with this? Like where to get the code ? What changes to make ? |
@Sechan-tkd You start by reading the readme at the root of the repo and the docs linked to from it. They explain the basics. |
This is not taken right, I want to do this, seems doable even for a noob like me ! |
Im getting an Invalid Ouput Assertion error during the automatic testing
From what I gather this is the intended output we want i.e. error messages with double quotes but the tests that ran in my pull request are failing because of it. If anybody would give a feedback it will be helpful |
@PrasanthChettri you'll have to update the test cases. They live in the test-data/ directory. (That, along with finding the code to change, is likely the biggest chunk of work for fixing this issue.) |
@JelleZijlstra So do I have to change these test cases for my branch or are those test cases running from the main branch. |
You'll have to change them on your branch. |
Do I have to manually change all the occurences of |
I'd recommend learning to use https://github.com/facebook/codemod . Once you get the PR ready and passing tests, I'm happy to review and merge quickly to avoid merge conflicts, since @JukkaL already approved the idea. |
@JelleZijlstra Hey could you review the branch. I guess the tests are passing. |
@JelleZijlstra @JukkaL I did the requested changes |
@PrasanthChettri Are you working on other error messages as well? Can I make changes for object is not iterable error message? |
reopening since this isn't fully done yet |
Part of #7445 Co-authored-by: [email protected] <[email protected]>
I'll get PR created for |
@JelleZijlstra @JukkaL @hauntsaninja |
Grepping for single quotes in test-data/unit/ still shows some instances in error messages. Some examples:
One even uses backticks:
|
Another interesting one is |
Thank you @JelleZijlstra for the pointer. I'll get these corrected. |
@JelleZijlstra My last PR covered all remaining messages. I have not updated below 4 messages becasue they are created in AST module
So this issue can be closed. If you find any other error that needs update, please let me know. |
Thanks for all your work here! Let's close this issue once your most recent PR is merged. |
Some messages use double quotes for quoting while other use single quotes. Maybe we should move to double quotes since the colored output only highlights double quoted strings.
Examples where this happens:
The text was updated successfully, but these errors were encountered: