VeryGoodOpenSource / very_good_analysis

Lint rules for Dart and Flutter used internally at Very Good Ventures 🦄
https://pub.dev/packages/very_good_analysis
MIT License
369 stars 38 forks source link

feat: Integrate with Github Copilot #119

Open alexxgarci opened 2 weeks ago

alexxgarci commented 2 weeks ago

Description

Today, a new version of VSCode has been released and enhaced a new feature allowing Github Copilot to follow specific rules for reviewing code, rewriting, etc.

It would be nice if we let Copilot to rewrite code following the Very Good Analysis rules. The specific setting is: "github.copilot.chat.reviewSelection.instructions".

Requirements

Additional Context

No response

tomarra commented 4 days ago

Hi @alexxgarci 👋 Thanks for opening this issue. I did a bit of research on this and it looks interesting. Dumping some links and notes in this issue for further reading by others on the team as well.

From the reading I'm doing I don't know if there is anything we can do within Very Good Analysis as a package to be able to automatically apply these into a project when you add the dependency. We could create the file and that would allow you to at least copy and paste into the .vscode directory in the project so it's applied to the workspace overall.

As far as content I see two paths that could be pretty easy to at least test this out with.

  1. Use the descriptions of the lint's that we currently have enabled. Something like the details listed on the lint pages (example: https://dart.dev/tools/linter-rules/avoid_final_parameters) could be an easy copy and paste to see if this is worth it.
  2. Distilling the practices we have in [Very Good Engineering (https://engineering.verygood.ventures/) into bite size sentences to be included here.

Ill have to talk to the team a bit more about this to determine how we think we can tackle that. Until we have that going to put this as a P2.

tomarra commented 4 days ago

So actually am going to downgrade this to a P3 as right now GitHub Copilot doesn't have support for Dart across the board.

CleanShot 2024-11-08 at 15 57 48

We should keep an eye on the documentation page as when it gets added to the list of "Review Changes" that would bump the priority up I think.

alexxgarci commented 2 days ago

Hi @tomarra , thanks for your time! Let's wait until Dart is officialy supported