-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add missing license headers & do minor updates to top-level dot files #7161
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
dd79f0c
Add missing license headers
mhucka ac8535f
chore: merge branch
mhucka 8ca8b8e
Revise to address comments in review
mhucka e0f3fd8
Change copyright to refer to Cirq Developers
mhucka 06899b2
Add back max_line_length setting
mhucka 56f336a
Change copyright to refer to Cirq Developers
pavoljuhas a0c3596
Merge branch 'main' into mh-add-license-headers
pavoljuhas 7e85774
Add temp max_line_length value for TS linter
mhucka 782c814
Shorten the file header
mhucka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,94 @@ | ||
| # Summary: coding style configuration for editors that read .editorconfig. | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| # Common editor configurations for this project. | ||
| # | ||
| # EditorConfig defines a file format for specifying some common coding style | ||
| # parameters. Many editors recognize .editorconfig files automatically, and | ||
| # there exist plugins for other editors. See https://spec.editorconfig.org/. | ||
| # parameters. Many IDEs and editors read .editorconfig files, either natively | ||
| # or via plugins. A few formatters also read .editorconfig; shfmt and Prettier | ||
| # are two examples (as of early 2025). | ||
| # | ||
| # We mostly follow Google's style guides (https://google.github.io/styleguide/) | ||
| # with very few deviations. | ||
| # | ||
| # Miscellaneous notes: | ||
| # | ||
| # - The EditorConfig property `max_line_length` is not set here because its | ||
| # intended behavior is poorly specified. (See the discussion in the comments | ||
| # at https://github.com/editorconfig/editorconfig/issues/387) It *would* have | ||
| # been desirable to define a project convention for the line width here, but | ||
| # we must instead use editor-specific configuration files to do that. | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
| # | ||
| # - With few exceptions (e.g., shfmt), `.editorconfig` files are not read by | ||
| # linters or formatters, which means the project needs separate config files | ||
| # for those tools. This includes markdownlint, yamllint, and others. | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_style = space | ||
| insert_final_newline = true | ||
| spelling_language = en-US | ||
| # It would be preferable not to set tab_width, but some EditorConfig plugins | ||
| # (e.g., Emacs's) set it equal to indent_size if it's not set otherwise. | ||
| tab_width = 8 | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
| # Trailing whitespace on lines is almost always noise. An exception is in | ||
| # Markdown, where two spaces = line break; however, that's such a foot-gun in | ||
| # practice that we avoid it. So, it's okay to set this next value globally. | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
| trim_trailing_whitespace = true | ||
|
|
||
| [{BUILD,*.BUILD,*.bzl,*.bazel}] | ||
| # Google doesn't have a style guideline for Bazel files. Most people use 4. | ||
| indent_size = 4 | ||
|
|
||
| [{*.cc,*.h}] | ||
| # This matches Google style guidelines. | ||
| indent_size = 2 | ||
|
|
||
|
mhucka marked this conversation as resolved.
Outdated
|
||
| [{*.ts,*.js}] | ||
| # This matches Google style guidelines. | ||
| indent_size = 2 | ||
|
|
||
| [*.json] | ||
| # Not stated explicitly in Google's guidelines, but the examples use 2. | ||
| indent_size = 2 | ||
|
|
||
| [*.py] | ||
| # This matches Google style guidelines. | ||
| indent_size = 4 | ||
| indent_style = space | ||
| max_line_length = 100 | ||
|
|
||
| [*.rst] | ||
| # Google doesn't have a style guideline for reStructuredText. Many people use 3. | ||
| indent_size = 3 | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
|
|
||
| [*.sh] | ||
| # This matches Google style guidelines. | ||
| indent_size = 4 | ||
| indent_style = space | ||
| max_line_length = 100 | ||
| # The following are used by shfmt. These bring it closer to Google's style. | ||
| binary_next_line = true | ||
| shell_variant = bash | ||
| space_redirects = true | ||
| switch_case_indent = true | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
|
|
||
| # If this repository has a "third_party" directory, ignore it entirely. | ||
| # Note: shfmt also respects this if you run it with --appply-ignore. | ||
| [third_party/**] | ||
| ignore = true | ||
|
mhucka marked this conversation as resolved.
Outdated
|
||
|
|
||
| [*.yml,*.yaml] | ||
| [{*.yaml,*.yml}] | ||
| # Google doesn't have style guidelines for YAML. Most people use indent = 2. | ||
| indent_size = 2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.