-
Notifications
You must be signed in to change notification settings - Fork 69
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
Running custom_lint on a single file #80
Comments
There's no such thing yet. It could be added though |
Thanks for clarifying @rrousselGit . If I submit a PR that adds this features, will it be merged ? |
If it's tested, sure |
Cool |
@rrousselGit I looked at the codebase a bit and realized that It is tightly made to work only on whole packages. I also tried running Dart's official linter and the main difference is that the latter runs the linter on a single file basis unlike For now, I propose a solution that doesn't break this plugin's architecture, while allowing the user to take only as much information as they need.
What do you think ? Please make suggestions so that I can improve on my idea. Thanks. |
I don't think this belongs in the options object. I don't it makes sense either to analyze everything but only show the output of a few files To implement this there's probably two sides:
|
Hmm. Correct. I did find |
Search for |
Thanks. I figured it out and implemented this feature. The changes are -
If this looked good to you @rrousselGit , I will open the respective PR. Below are the attached images of working of this feature - Without With |
Rather than |
Make sure folders are supported too :) |
Also, how about I open a PR with the work done till now, and if you find it workable, I'll add the directory function too. I was just thinking if I change a lot of stuff and you find something problematic, then I'll have to change everything again :) |
I don't agree. I don't think having a -f/-d makes sense here. |
Yes But it shouldn't need a specific flag for this. |
Okay @rrousselGit . I'll modify the PR real quick :) |
Use You can do You can mix and match them too: |
@rrousselGit please look at #82 now. |
@rrousselGit can we discuss its implementation once again please? |
Oh, sorry for the delay. Sure! |
In the meantime as you might've seen, I made a bunch of refactoring to better handle project parsing. There's now a This should take care of half the job (anything inside |
@rrousselGit my earlier implementation was to just return out of the file analysis function, if the file path does not exist in the list of paths we are expecting. Does this solution still look good to you ? |
Yes that's fine |
That's great :) |
* Replace DCM with custom lints * Bring back comment on prefer_match_file_name --------- Co-authored-by: Yurii Prykhodko <yurii.prykhodko@solid.software>
May I ask which version of this submission is supported? My Dart version is 2.19 and currently cannot be upgraded to 3.0. Is this ability unavailable? |
Thanks for this awesome plugin. I recently integrated in my org's project and the custom lint is working like charm. Uses quite some memory but that's a different issue.
I wanted to ask is there any way to lint a single file ? Like from command line ?
Describe what scenario you think is uncovered by the existing examples/articles
Currently, following the documentation, I am able to run
flutter pub run custom_lint
in the project root and it scans all the files of the project. I couldn't find any documentation which states how to lint a single file from command line.Additional context
We are working on a team project in an org and want to add Documentation compliance for new files. As all the existing files can't be documented at once, we want that any new PR should include complete documentation for the changed files.
If it was possible to run
custom_lint
on a single file, then this task could easily be integrated to GitHub workflow of our project.The text was updated successfully, but these errors were encountered: