Skip to content

Commit 6480d10

Browse files
committed
Add copyright statement + settings for BUILD & .cc files
1 parent ce068a2 commit 6480d10

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

.editorconfig

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,54 @@
1-
# Summary: coding style configuration for editors that read .editorconfig.
1+
# Copyright 2025 The TensorFlow Quantum Authors
22
#
3-
# EditorConfig defines a file format for specifying some common coding style
4-
# parameters. Many editors recognize .editorconfig files automatically, and
5-
# there exist plugins for other editors. See https://spec.editorconfig.org/.
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
# Common editor configurations for this project.
17+
#
18+
# EditorConfig is a file format for specifying some common style parameters.
19+
# Many IDEs & editors read .editorconfig files, either natively or via plugins.
20+
# We mostly follow Google's style guides (https://google.github.io/styleguide/)
21+
# with only a few deviations for line length and indentation in some files.
22+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
623

724
root = true
825

26+
# IMPORTANT: some of the other config files (.markdownlintrc, .jsonlintrc.yaml,
27+
# etc.) also have settings for indent and line length. When making changes to
28+
# this file, make sure to update the other files to match.
29+
930
[*]
1031
charset = utf-8
11-
end_of_line = lf
32+
indent_style = space
1233
insert_final_newline = true
1334
spelling_language = en-US
1435
trim_trailing_whitespace = true
36+
max_line_length = 80
37+
38+
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc}]
39+
indent_size = 4
40+
41+
[{*.cc,*.h}]
42+
indent_size = 2
43+
44+
[*.json]
45+
indent_size = 2
1546

1647
[*.py]
1748
indent_size = 4
18-
indent_style = space
19-
max_line_length = 80
2049

2150
[*.sh]
2251
indent_size = 4
23-
indent_style = space
24-
max_line_length = 80
2552

2653
[*.yml,*.yaml]
2754
indent_size = 2

0 commit comments

Comments
 (0)