skuba
skuba copied to clipboard
Add extension recommendations
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
.
🦋 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
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?
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
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 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?
I think so - struggling to see a huge downside, though open to opinions of course
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.
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
Simplified implementation at #1556