-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
8$: Improve error on 'await' on class method #930
Comments
Hi @strager , I want to contribute in open source, but I am not able to understand what is asked here to be done exactly? can you help me out ? |
I want to do this assignment, please assign it to me. |
Create a new diagnostic in quick-lint-js' parser. Docs: https://quick-lint-js.com/contribute/create-diagnostic/ I think this is the relevant code in the parser, but I didn't double-check: quick-lint-js/src/quick-lint-js/fe/parse-class.cpp Lines 816 to 821 in 8a27f8a
|
@Deep642 Do you need help with implementing this feature? |
@strager Hi there! This is my first attempt at trying out an open source contribution. Is this a good starter bug, and if so can I claim it? I'm most comfortable in C++, Java. I may need some help along the way. |
I think yes.
Sure!
I'm in the middle of a cross-country move so I might be unresponsive for a week or two. I'll try my best to answer your questions. |
@strager Thanks for getting back with me! I'll be working on this tonight. I'll probably have questions soon. |
@starger So if I may for clarity, I am writing a new diagnostic that will detect when to throw the error OR I am adjusting the diagnostic mentioned here? quick-lint-js/src/quick-lint-js/fe/parse-class.cpp Lines 816 to 821 in 8a27f8a
|
Yes, both. You will need to make a new diagnostic type (in diagnostic-types-2.h) and also code to report the diagnostic (probably in parse-class.cpp). I think that the code you linked is the right code to change for reporting your new diagnostic. Note that you linked an old version of the code. Here's the latest version for your convenience: quick-lint-js/src/quick-lint-js/fe/parse-class.cpp Lines 985 to 990 in 4e36b74
If you look a few lines up, you'll see a special case for |
@strager Ok thank you! I think I wrote the diagnostic correctly. I'm still figuring out how to link things, will be working this weekend or sooner to get that done. I was using the online chat to get some help, wasn't sure if there is a public discord for help? |
Yup! I saw your messages, but I wasn't available when you were chatting. I now have stable internet access, so I am more available.
No. The IRC channel you joined is the right place to discuss quick-lint-js live. |
Hey @strager ! I am still working on this issue. Got food poisoning last week so my whole schedule took a hit. I will be focusing on testing efforts and will get on the IRC if I hit any roadblockers. Thanks! |
@alyssaperkins Do you need any help? |
quick-lint-js currently reports:
but quick-lint-js should instead treat 'await' as if it was 'async' and report only:
Note: The following example is legal because of the line break (
await
is interpreted as a field declaration with no type or initializer) and should produce no diagnostics:Related: https://quick-lint-js.com/errors/E0178/
The text was updated successfully, but these errors were encountered: