Skip to content

Commit 1a8eda4

Browse files
mhuckapavoljuhas
andauthored
Minor updates to top-level dot files (#463)
* Make .gitignore more thorough This expands the files that are ignored to include more common temporary and editor files. * Add makefile & .rst rules to .editorconfig & streamline * Apply suggestion from @pavoljuhas Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com> * Apply suggestion from @pavoljuhas Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com> * Remove pattern for executables As Pavol pointed out, this repo doesn't have such files. * Apply suggestion from @pavoljuhas Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com> * Remove indent_size = 4 for makefiles. * Remove rest of C/C++ patterns --------- Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
1 parent bfb7503 commit 1a8eda4

File tree

2 files changed

+67
-43
lines changed

2 files changed

+67
-43
lines changed

.editorconfig

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

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-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23-
2415
root = true
2516

17+
# We mostly follow Google style guides (https://google.github.io/styleguide/)
18+
# with only a few deviations for line length and indentation in some files.
19+
20+
# IMPORTANT: some of the other config files (.clang-format, etc.) also have
21+
# the same settings and need to be updated if changes are made to this file.
2622
[*]
2723
charset = utf-8
2824
indent_style = space
@@ -31,18 +27,20 @@ spelling_language = en-US
3127
trim_trailing_whitespace = true
3228
max_line_length = 100
3329

30+
[{Makefile,makefile}]
31+
indent_style = tab
32+
3433
[*.json]
35-
# Not stated explicitly in Google's guidelines, but the examples use 2.
3634
indent_size = 2
3735

3836
[*.py]
39-
# Google style guidelines use 4.
4037
indent_size = 4
4138

39+
[*.rst]
40+
indent_size = 3
41+
4242
[*.sh]
43-
# Google style guidelines use 2.
4443
indent_size = 4
4544

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

.gitignore

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 Google LLC
1+
# Copyright 2026 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -12,47 +12,73 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# ignore compiled python files
16-
__pycache__
17-
*.pyc
15+
# Summary: specifies files & dirs that git shouldn't track.
1816

19-
# ignore idea SDK
20-
.idea/*
17+
# Bazel files.
18+
/bazel-*
2119

22-
# ignore cache
23-
.cache/*
24-
.mypy_cache/*
25-
.pytest_cache/*
20+
# Jupyter-specific items.
21+
.ipynb_checkpoints
22+
ipython_config.py
23+
jupyter_kernel.lock
2624

27-
# ignore coverage files
28-
*.py,cover
25+
# Python-related items.
26+
*$py.class
27+
*.cover
2928
*.coverage
3029
*.coverage.*
31-
32-
# packaging
30+
*.egg
3331
*.egg-info/
32+
*.py,cover
33+
*.py[cod]
34+
*.whl
35+
.cache/
36+
.dmypy.json
37+
.mypy_cache/
38+
.nox/
39+
.pytest_cache/
40+
.python-version
41+
.pytype/
42+
.ruff_cache/
43+
.tox/
44+
__pycache__/
45+
build/
46+
coverage.xml
47+
dist/
48+
dmypy.json
49+
poetry.lock
50+
sdist/
51+
venv/
52+
wheelhouse/
3453

35-
# Sphinx
36-
_build
37-
docs/generated
38-
39-
# swap files
40-
*.swp
41-
42-
# Mac only
43-
.DS_Store
54+
# Don't commit local PyPI config files.
55+
.pypirc
4456

45-
# From pytest-benchmark
57+
# From pytest-benchmark.
4658
*.benchmarks/
4759

48-
# Ignore generated Jupyter files
49-
*.ipynb_checkpoints/
60+
# Default pycharm virtual env.
61+
.venv/
5062

51-
# Ignore Bazel files
52-
/bazel-*
63+
# macOS directory metadata files.
64+
*.DS_Store
5365

54-
# Default pycharm virtual env
55-
.venv/
66+
# Common editor backup files and temp files.
67+
**/*.iml
68+
*.bak
69+
*.log
70+
*.swp
71+
*.tmp
72+
*~
73+
.\#*
74+
.idea/
75+
.vs
76+
.vscode/
77+
\#*\#
78+
79+
# Sphinx.
80+
_build
81+
docs/generated
5682

5783
# Ignore file generated by dev_tools/write-ci-requirements.py
5884
ci-requirements.txt

0 commit comments

Comments
 (0)