Skip to content

vscode sample settings.json #243

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaovilai
Copy link
Member

Signed-off-by: Tiger Kaovilai tkaovila@redhat.com

Why the changes were made

How to test the changes made

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Copy link

openshift-ci bot commented Feb 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

Choose a reason for hiding this comment

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

this is IDE specific

I would not add this to the repo

whoever wants to work on this project does not need to use VSCode

Copy link
Member Author

Choose a reason for hiding this comment

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

what about

# https://EditorConfig.org
root = true
[*]
indent_size = 4
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{*.go,go.mod,Makefile}]
indent_style = unset
[{*.{yaml,yml},PROJECT,OWNERS}]
indent_size = 2
[{*.md,LICENSE}]
indent_size = unset

Copy link
Member Author

Choose a reason for hiding this comment

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

or readme? would that work better for you?

Copy link
Member Author

Choose a reason for hiding this comment

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

otherwise my IDE is throwing non matching linter errors due to newer golangci-lint picked up by IDE. I would still like to use IDE automatic linting integration with golangci-lint

Copy link
Contributor

Choose a reason for hiding this comment

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

.editorconfig is not IDE specific, is the config file for ec executable

oadp-non-admin/Makefile

Lines 261 to 263 in 47e640d

.PHONY: ec
ec: editorconfig ## Run file formatter checks against all project's files.
$(EC)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it's unreasonable to add .vscode/settings.json file to the project repository with some sensible defaults and at the same time ensure .gitignore contains this, so developers won't be adding their generated by the IDE changes. What I am wondering if it's possible to add it in a way it won't be pinning to a particular version (e.g. via the hack/) and use it in all the places, so we don't have to remember to bump the golangci binary every time. Here are few examples that already are within OpenShift org:

https://github.com/openshift/api/blob/635291d6fdf1c4f4cb2b94b460f8d4f9cc377571/.vscode/settings.json#L4

https://github.com/openshift/console/blob/e9d6ead6852600993cffef3d50cb9b122d64c068/frontend/.vscode/settings.json#L4

https://github.com/openshift/cluster-network-operator/blob/d09028dfda8c632e4c4730319b9f07f0ac92d82a/.vscode/settings.json#L3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants