skuba icon indicating copy to clipboard operation
skuba copied to clipboard

Add extension recommendations

Open GeordieEK opened this issue 10 months ago • 8 comments

Addresses issue #1093

skuba init now creates a .vscode folder and inserts extension recommendations. Implementation written here will overwrite recommendations if they exist already however as it's part of init I think that's ok.

I have opted for a patch changeset as per contribution guidelines of minor change involving init.

GeordieEK avatar Apr 23 '24 11:04 GeordieEK

🦋 Changeset detected

Latest commit: 51910b23ed61dc45c54a3faedf0d84b920b41721

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 23 '24 11:04 changeset-bot[bot]

Hey! Thanks for the PR! I love the attempt

I think a slightly simpler option may be just to create the files under our base folder section. I think that should work.

eg. https://github.com/seek-oss/skuba/blob/main/template/base/.github/CODEOWNERS

Could we also add it to the base of our repo?

samchungy avatar Apr 23 '24 13:04 samchungy

Thanks!

That's definitely a simpler idea.

The issue I'm running into at the moment is the inclusion filter is excluding .vscode/* as it's in the .gitignore

Some possible solutions I've identified:

  • Don't use the .gitignore in the filter but filter based on an exclusionFilter file or similar for more granular control
    • Less code change but feels more hacky
  • Modify the inclusion filter function itself to allow exceptions (i.e files in gitignore that we do actually want to copy)
    • This is potentially too big of a change for a small feature, but may come in handy later?
    • I also don't think this would classify as a patch anymore

I have done the latter in commit 97b487c87b7691778a8519d42490aaab964b19c4

GeordieEK avatar Apr 24 '24 01:04 GeordieEK

Hey @GeordieEK - I'm liking the direction!

I wonder if rather than modifying the code - could we get away with explicitly allowing this file?

For example, adding !.vscode/extensions.json after the .vscode/ignore* in the _.gitignore template?

AaronMoat avatar Apr 25 '24 05:04 AaronMoat

@AaronMoat Yeah totally! I thought about this, but then it would mean the extensions.json gets included in git right? Is that a preferred trade-off?

GeordieEK avatar Apr 25 '24 06:04 GeordieEK

I think so - struggling to see a huge downside, though open to opinions of course

AaronMoat avatar Apr 25 '24 06:04 AaronMoat

Yeah I think it's unlikely anyone will really be bothered by that inclusion.

I would say the level of change to the codebase fits the utility of the improvement better.

Changing a utility function for this small of a benefit is a bit extreme... fun first issue though!

Will leave it for a bit to see if any objections before implementing.

GeordieEK avatar Apr 25 '24 07:04 GeordieEK

I think including extensions.json in the git makes sense. The main reason the vscode folder is ignored is mostly to stop user settings from constantly being committed, however, this isn't really one of those files

samchungy avatar May 01 '24 23:05 samchungy

Simplified implementation at #1556

GeordieEK avatar May 06 '24 23:05 GeordieEK