-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Further enhancing talawa_lint
#1646
Comments
@palisadoes please confirm that this is an issue so that I can start working on it. |
@palisadoes I am excluding whole test folder from our custom lint. Let me explain:
/// This is main function.
void main() {} /// This returns MyWidget for testing.
///
/// params:
/// None
///
/// returns:
/// * `MyWidget`: MyWidget
MyWidget getMyWidget() {
return MyWidget();
} |
Please confirm so that I can open the corresponding PR. Thanks. |
OK |
This issue did not get any activity in the past 10 days and will be closed in 365 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
@literalEval Is there any more work that needs to be done on this? |
yeah @palisadoes . Was busy writing proposal. Will do this by this weekend. Sorry for the delay. |
@palisadoes if a function has no parameters and no return value (void return type), should we make the |
That would mean that no one would document the code if this were optional. |
Contributors will still NEED to write documentation for it. That part is mandatory. The only optional part will be the params and returns blocks, that too when the function has both a void foo() {
....stuff...
} In this case the doc looks like /// Function that does stuff.
///
/// **params**:
/// None
///
/// **returns**:
/// None
void foo() {
....stuff...
} As you can see, the params and returns blocks are taking unnecessary space and adding nothing to the documentation. After the changes that I am proposing, it will look like /// Function that does stuff.
void foo() {
....stuff...
} |
The issue is that because it's optional people will just put a single line for everything. So the overall quality of the documentation is now suffering because of a minority of functions and methods that require a little extra text. This is not a good development. |
All the work you have put in to fix the documentation via the linter will be circumvented by others when they realize they don't have to do this work. |
@palisadoes understood. Moreover, the original tasks of this issue are completed, but more will follow. So instead of closing this issue, let's keep it opened and add new tasks to it as they come. This will save us from opening unnecessary issues of the same kind. If you don't agree with this point, please feel free to close this :) |
@palisadoes when was the |
It's used in push.yml to update the Talawa-Docs repo. |
That I understand. But we don't need to store these docs in our Talawa Codebase for us to update Talawa-Docs 👀 |
Open an issue to fix this |
Sure. |
@palisadoes can you think of anything extra that we can add to our lint system? Or should I halt it's further development for now and work on something else? :) |
@literalEval did you fix all the wrong error handling ? |
@Ayush0Chaudhary see the PR just above. I have updated the error message. Please advise if it needs more updation, |
What's happening with fixing the original linter package? |
@palisadoes I am having discussions with the plugin maintainer on Discord. The main issue at that time was writing tests for the changes. I think we can do that by collaborating with each other. Maybe I can write the changes and @Ayush0Chaudhary can write the tests? The thing is that here in Talawa I can write code and if something goes wrong unexpectedly, I can simply write a patch fastly. But the said plugin is already in production and they need everything to be perfect in a single PR. The feature I am proposing there modifies their architecture to the core and thus needs very precise code. |
That's a possibility, but you'll need to ask @Ayush0Chaudhary about his availability and willingness to do this. Why hasn't there an update here? The tests he's suggesting don't look time consuming. |
@palisadoes @literalEval @noman2002 I would need 4 Days to fix that issue |
@palisadoes the original PR was easy enough to write tests for. But then the author advised me to rewrite the implementation and then write tests accordingly. I am discussing the new implementation with him and will start working on it soon. @Ayush0Chaudhary please let me know when you are free. Thanks. |
This issue did not get any activity in the past 10 days and will be closed in 365 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed. |
@palisadoes please keep this opened. Though no bug has been found in our custom linter as of now, it will be good if this issue exists as a parent issue for any further enhancement in our linter. Thanks. |
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
Are you still working on this? |
This was the reason for keeping this issue open. |
Is your feature request related to a problem? Please describe.
Talawa Lint is working great and contributors are getting hold of the new lint rules, but some things can be changed.
test_helpers.dart
,test_helper_mocks.dart
etc, which are causing issues to contributors as no one wants to document such huge files and neither does it make sense. Alternatively, we can make another issue for documenting these file to a certain level.main
,test
etc.params:
andreturns:
blocks should have at least one blank line between them, for them to be shown correctly when user hovers over the corresponding field in the IDE. Although this is an issue related to the IDE itself, still we can fix this on our side. Having a blank line also improves readability.talawa_good_doc_comments
seems to have trouble withimplicit return types
. We need to fix that.Chores
params:
andreturns:
blocks.params:
andreturns:
directives bold.talawa_good_doc_comments
to support implicit ones.None
inparams:
block (currently the tab isn't enforced)02/04/2023
quick_fix
template that will insert a doc template automatically.02/04/2023
Talawa Docs
in the error itself.07/04/2023
Bugs/Enhancements reported
Reported by @Ayush0Chaudhary , 07/04/23
The text was updated successfully, but these errors were encountered: