Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial IDE setup #1326

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Add initial IDE setup #1326

merged 4 commits into from
Nov 14, 2023

Conversation

uweseimet
Copy link
Contributor

No description provided.

@uweseimet uweseimet linked an issue Nov 9, 2023 that may be closed by this pull request
3 tasks
@uweseimet uweseimet marked this pull request as ready for review November 11, 2023 15:45
@rdmark
Copy link
Member

rdmark commented Nov 13, 2023

So your argument for removing .vscode is that they have no reuse value to anyone else, and are strictly for the author's local environment?

I don't know enough about VSCode configurations to say for sure, but it looks like they're attempting to set up a debugging environment.

For those who are using VSCode, I can see two additional actions we want to take here:

  1. Document the debug env setup as an example somewhere, either in a subdir here in the repo, or in wiki.

  2. Add .vscode to .gitignore so that VSCode users won't be inundated with noisy uncommitted files.

Thoughts?

@uweseimet
Copy link
Contributor Author

uweseimet commented Nov 13, 2023

It's the same with all of these IDE/environment-specific files: They are specific to your personal setup. If you check them in, you destroy/overwrite the environment of somebody else. If somebody else modifies these files, the changes are forced upon your environment. Very annoying!
Regarding .gitignore, this is how this has to be done: Add any files/folders of this kind to your local .gitignore, not to the one checked in, because the file checked in should not contain anything specific to your local environment. This way git will ignore them, and everybody is happy because there are no conflicts.
Regarding debug setups: Those can also differ, depending on taste. Anybody who wants to debug knows how to set up her/his environment of choice and how to launch gdb. Often a shell alias is sufficient. I have tons of them ;-). If somebody does not know how to do that she/he will not be able to debug anything anyway.

@uweseimet
Copy link
Contributor Author

uweseimet commented Nov 13, 2023

I just noticed that the .gitignore files checked in contain several items that may not belong there. Also items added by me, e.g. ".settings", ".cproject", used by Eclipse.
When looking at cpp/.gitignore, "generated" is a good example of something that belongs into this file, because this folder is created automatically when building piscsi. This means that each developer has to prevent this folder from being checked in, and this is not related to the IDE you use or your personal preferences. Similar with "obj" and "bin".
I just committed a change and removed the Eclipse files. I added them to my $HOME/.gitignore instead. This also has the benefit that these files are ignored for any project now, not just for piscsi. That's just what you would usually want.

Copy link

sonarcloud bot commented Nov 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rdmark
Copy link
Member

rdmark commented Nov 14, 2023

I had to read up on how to do local machine only .gitignore rules. What I learned is that the git manual recommends using .git/info/exclude

https://git-scm.com/docs/gitignore#_description

I agree that this is better than trying to anticipate every single IDE behavior.

@uweseimet
Copy link
Contributor Author

There is yet one more argument not to have IDE configurations checked in: Their format depends on the IDE version.
All in all, that's why IDE usually offer explicit export functionality for certain settings. This is also what I used for the Eclipse formatter configuration, which is exported as XML.

@uweseimet uweseimet merged commit f7bc77d into develop Nov 14, 2023
16 checks passed
@uweseimet uweseimet deleted the issue_1325 branch November 14, 2023 14:13
uweseimet added a commit that referenced this pull request Nov 14, 2023
uweseimet added a commit that referenced this pull request Nov 14, 2023
uweseimet added a commit that referenced this pull request Nov 14, 2023
uweseimet added a commit that referenced this pull request Nov 14, 2023
uweseimet added a commit that referenced this pull request Nov 14, 2023
uweseimet added a commit that referenced this pull request Nov 15, 2023
rdmark pushed a commit that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a new sub-folder for IDE setup files of general interest
2 participants