You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run the analyze and custom-lint tasks only on staged files, is there a way I could achieve that?
I have some changes on some files that I'm not trying to commit yet, therefore, I'm not able to commit one file that would actually pass the dart analyzer.
the tool should not prevent me from committing a file because other unstaged files have some issues with the analyze task.
thank you.
The text was updated successfully, but these errors were encountered:
In theory, this could be archived by running the analyzer on every single file instead of the whole repository. I have not done this so far, as this would slow down the tool quite a bit. It would also mean that you will not see analysis results for the unstaged files.
Another option would be to scan all files and output all results, but only fail if a staged file is in the output. This a more complex solution, as the analyzer das not support machine readable output, but it is theoretically possible.
Would the first solution be enough for you, or would you prefer the second?
In theory, this could be archived by running the analyzer on every single file instead of the whole repository. I have not done this so far, as this would slow down the tool quite a bit. It would also mean that you will not see analysis results for the unstaged files.
Another option would be to scan all files and output all results, but only fail if a staged file is in the output. This a more complex solution, as the analyzer das not support machine readable output, but it is theoretically possible.
Would the first solution be enough for you, or would you prefer the second?
both works, the second is more "optimal", I will try to find a way to do it and open a pull request.
I would like to run the
analyze
andcustom-lint
tasks only on staged files, is there a way I could achieve that?I have some changes on some files that I'm not trying to commit yet, therefore, I'm not able to commit one file that would actually pass the dart analyzer.
the tool should not prevent me from committing a file because other unstaged files have some issues with the
analyze
task.thank you.
The text was updated successfully, but these errors were encountered: