this post was submitted on 28 Jan 2025
1725 points (99.7% liked)

Programmer Humor

20851 readers
1774 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] JackbyDev@programming.dev 9 points 1 month ago (15 children)

Use this so that the things you need to share do get shared.

.idea/*
!.idea/codeStyles
!.idea/runConfigurations

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

Note: I haven't checked the vs code ones in depth, the list might not be perfect.

[–] eager_eagle@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (5 children)

.vscode doesn't store cache or any trash like that, so if you're including all settings, tasks, etc, you can probably just include everything.

The only thing to keep in mind is to only add settings, extension recommendations, etc that apply to all your collaborators and aren't just personal preferences. A few good examples are formatting rules, task definitions to run the project, and linting rules that can't be defined somewhere else.

[–] kora@sh.itjust.works 6 points 1 month ago* (last edited 1 month ago) (4 children)

Linting rules and scripts should never live in an IDE-specific directory. I should not need to know your IDE configuration to run scripts and lint my files.

I have yet to come across a language that requires configuration to be stored that way. All modern languages have separate configuration and metadata files for use cases you have defined.

As for workspace defaults, whatever IDE configuration works for you is not guaranteed to work for others. Shoving extension suggestions down their throat each time IDE is booted should not be a part of your source code, as IDE extensions should not be needed to run your code.

[–] dev_null@lemmy.ml 1 points 1 month ago

Linting rules and scripts should never live in an IDE-specific directory.

Of course they should. Obviously it shouldn't be the only place they are, but committing IDE code styles settings that match the externally-enforced project styles is absolutely helpful.

Or, in our project we have a bunch of scripts that you can run manually, but we also have commited IntelliJ run configurations that make running them a convenient in-IDE action.

load more comments (3 replies)
load more comments (3 replies)
load more comments (12 replies)