Skip to content

Commit 49d7294

Browse files
authored
Update .editorconfig (#969)
This makes a couple of corrections to `.editorconfig` and reformats the comments at the top to be less superflous and more in line with the style in other TFQ files. * Add a missing entry for Bazel `WORKSPACE` files * Correct the indentation for shell scripts to be 2 instead of 4 (so that it matches what TensorFlow uses * Add missing curly braces in the entry for YAML files
1 parent 73e09cf commit 49d7294

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.editorconfig

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,15 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# 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-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14+
# ============================================================================
2315

2416
root = true
2517

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.
18+
# We follow the TensorFlow coding style
19+
# https://www.tensorflow.org/community/contribute/code_style
2920

21+
# IMPORTANT: some of the other config files (.clang-format, etc.) also have
22+
# the same settings and need to be updated if changes are made to this file.
3023
[*]
3124
charset = utf-8
3225
indent_style = space
@@ -35,7 +28,7 @@ spelling_language = en-US
3528
trim_trailing_whitespace = true
3629
max_line_length = 80
3730

38-
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc}]
31+
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc,WORKSPACE}]
3932
indent_size = 4
4033

4134
[{*.cc,*.h}]
@@ -48,7 +41,7 @@ indent_size = 2
4841
indent_size = 4
4942

5043
[*.sh]
51-
indent_size = 4
44+
indent_size = 2
5245

53-
[*.yml,*.yaml]
46+
[{*.yml,*.yaml}]
5447
indent_size = 2

0 commit comments

Comments
 (0)