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

modulegen: generate code-workspace with json marshal #1551

Merged
merged 1 commit into from
Aug 30, 2023
Merged

modulegen: generate code-workspace with json marshal #1551

merged 1 commit into from
Aug 30, 2023

Conversation

mmorel-35
Copy link
Contributor

What does this PR do?

Replaces the template with the marshalling of a Config Object.
The path can be relative so it is relative to the .vs-code folder. As it is platform independant, it can be shared in the project.

Why is it important?

This allows to define multi-root-workspaces in VSCode.

Related issues

I tried it on windows plateform. @mdelapenya if you do have another platform, can you confirm, this works ?

@mmorel-35 mmorel-35 requested a review from a team as a code owner August 29, 2023 23:22
@netlify
Copy link

netlify bot commented Aug 29, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 26f6b7e
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/64eef27710563a00079d8ef1
😎 Deploy Preview https://deploy-preview-1551--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

mdelapenya
mdelapenya previously approved these changes Aug 30, 2023
Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mmorel-35 I went ahead and pushed a commit simply adding the new file to the module docs: 6e4d7f7

I think this PR LGTM! Thanks again!

@mdelapenya
Copy link
Collaborator

mdelapenya commented Aug 30, 2023

I still need to get used to seeing the core module at the bottom, but I like the improvement. I guess you forced the commit of the workspace file, right?

Oh wait, it could be my own setup, which ignores the .vscode dir at my $HOME dir

@mmorel-35
Copy link
Contributor Author

Probably something like that as the .gitignore doesn’t say anything about .vscode.
For the ordering, it could be changed to follow the path order if you prefer ?

mdelapenya
mdelapenya previously approved these changes Aug 30, 2023
Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super tiny change in a name and we are done

.vscode/.testcontainers-go.code-workspace Outdated Show resolved Hide resolved
modulegen/internal/vscode/types.go Outdated Show resolved Hide resolved
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-Authored-By: Manuel de la Peña <social.mdelapenya@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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
30.1% 30.1% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks! LGTM

@mdelapenya mdelapenya self-assigned this Aug 30, 2023
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Aug 30, 2023
@mdelapenya mdelapenya merged commit 5e3ff6d into testcontainers:main Aug 30, 2023
120 of 121 checks passed
@mmorel-35 mmorel-35 deleted the fix-code-workspace branch August 30, 2023 08:31
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Aug 30, 2023
* main: (32 commits)
  fix: remove wrong example from workspace (testcontainers#1556)
  chore(deps): bump the all group in /modules/localstack with 1 update (testcontainers#1552)
  modulegen: generate code-workspace with json marshal (testcontainers#1551)
  chore(deps): bump the all group in /modules/compose with 2 updates (testcontainers#1553)
  feat: add mariadb module (testcontainers#1548)
  feat(modulegen): print out VSCode workspace file if needed (testcontainers#1549)
  modulegen: generate md file inside internal/mkdocs (testcontainers#1543)
  modulegen: create internal/module and internal/modfile (testcontainers#1539)
  [Enhancement]: add ability to set repo:tag for ContainerRequest FromDockerfile (testcontainers#1508)
  Fix module generator for examples (testcontainers#1545)
  Update pulsar.md (testcontainers#1542)
  modulegen: create internal/make (testcontainers#1537)
  chore: fix workflow (testcontainers#1538)
  chore(deps): bump the all group in /examples/cockroachdb with 1 update (testcontainers#1522)
  chore(deps): bump the all group in /examples/bigtable with 1 update (testcontainers#1534)
  chore(deps): bump the all group in /modules/localstack with 4 updates (testcontainers#1535)
  chore(deps): bump the all group in /modules/k3s with 2 updates (testcontainers#1526)
  chore(deps): bump the all group in /examples/spanner with 2 updates (testcontainers#1532)
  chore(deps): bump the all group in /examples/firestore with 1 update (testcontainers#1523)
  chore(deps): bump the all group in /modules/redis with 1 update (testcontainers#1524)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants