|
1 | | -# Summary: coding style configuration for editors that read .editorconfig. |
| 1 | +# Copyright 2025 The TensorFlow Quantum Authors |
2 | 2 | # |
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 | +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
6 | 23 |
|
7 | 24 | root = true |
8 | 25 |
|
| 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 | + |
9 | 30 | [*] |
10 | 31 | charset = utf-8 |
11 | | -end_of_line = lf |
| 32 | +indent_style = space |
12 | 33 | insert_final_newline = true |
13 | 34 | spelling_language = en-US |
14 | 35 | 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 |
15 | 46 |
|
16 | 47 | [*.py] |
17 | 48 | indent_size = 4 |
18 | | -indent_style = space |
19 | | -max_line_length = 80 |
20 | 49 |
|
21 | 50 | [*.sh] |
22 | 51 | indent_size = 4 |
23 | | -indent_style = space |
24 | | -max_line_length = 80 |
25 | 52 |
|
26 | 53 | [*.yml,*.yaml] |
27 | 54 | indent_size = 2 |
0 commit comments