Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 18 additions & 27 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,44 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Common editor configurations for this project.
#
# EditorConfig is a file format for specifying some common style parameters.
# Many IDEs & editors read .editorconfig files, either natively or via plugins.
# We mostly follow Google's style guides (https://google.github.io/styleguide/)
# with only a few deviations for line length and indentation in some files.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

root = true

# We mostly follow Google's style guides (https://google.github.io/styleguide/)
# but prefer using 100 columns and 4-space indentation for most file types.

# IMPORTANT: some of the other config files & entries in pyproject.toml have
# the same settings and need to be updated if changes are made to this file.
[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
spelling_language = en-US
trim_trailing_whitespace = true
max_line_length = 100

[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc}]
# Google doesn't have a style guideline for Bazel files. Most people use 4.
indent_size = 4
[{COMMIT_EDITMSG,MERGE_MSG,SQUASH_MSG,TAG_EDITMSG}]
max_line_length = 72

[{Makefile,makefile,*.mk}]
indent_style = tab
indent_size = 8
tab_width = 8
Comment thread
mhucka marked this conversation as resolved.

[{*.cc,*.h}]
# Google style guidelines use 2.
[{*.cc,*.h,*.inc}]
indent_size = 2

[{*.js,*.ts}]
# Google style guidelines use 2.
indent_size = 2

[*.json]
# Not stated explicitly in Google's guidelines, but the examples use 2.
indent_size = 2

[*.py]
# Google style guidelines use 4.
indent_size = 4
[*.patch]
trim_trailing_whitespace = false
Comment thread
mhucka marked this conversation as resolved.

[*.rst]
# Google doesn't have a style guideline for reStructuredText. Many people use 3.
indent_size = 3

[*.sh]
# Google style guidelines use 2.
indent_size = 4

[{*.yaml,*.yml}]
# Google doesn't have style guidelines for YAML. Most people use indent = 2.
[{*.yaml,*.yml,*.cff}]
indent_size = 2
Loading