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 a .editorconfig file #6998

Open
mhucka opened this issue Jan 29, 2025 · 1 comment
Open

Add a .editorconfig file #6998

mhucka opened this issue Jan 29, 2025 · 1 comment
Labels
area/formatting kind/feature-request Describes new functionality kind/task A task that's part of a larger effort triage/discuss Needs decision / discussion, bring these up during Cirq Cynque

Comments

@mhucka
Copy link
Contributor

mhucka commented Jan 29, 2025

Is your feature request related to a use case or problem? Please describe.

To help developers more easily write code that fits the project coding style, and to reduce time spent correcting formatting discrepancies that get flagged by code checkers, we should probably add a .editorconfig file.

Describe the solution you'd like

Create a .editorconfig file at the project top level, and set it up to match what is required by check/all.

[optional] Describe alternatives/workarounds you've considered

We could point people to a style guideline document and let them take care of setting things up themselves. This is more flexible but less efficient and effective than providing a configuration file.

What is the urgency from your perspective for this issue? Is it blocking important work?

P2 - we should do it in the next couple of quarters

We are already having cases of discrepancies between people's editors and what the Black-based formatting checks in Cirq complain about, so this is a real need.

@mhucka mhucka added kind/feature-request Describes new functionality kind/task A task that's part of a larger effort area/formatting triage/discuss Needs decision / discussion, bring these up during Cirq Cynque labels Jan 29, 2025
@mhucka
Copy link
Contributor Author

mhucka commented Feb 6, 2025

I found this .editorconfig in qh-lab. Perhaps this can be a starting point?

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
indent_size = 4
indent_style = space
max_line_length = 100

[*.sh]
indent_size = 4
indent_style = space
max_line_length = 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/formatting kind/feature-request Describes new functionality kind/task A task that's part of a larger effort triage/discuss Needs decision / discussion, bring these up during Cirq Cynque
Projects
None yet
Development

No branches or pull requests

1 participant