Skip to content

Commit

Permalink
GH-44805: [Dev] Add .editorconfig file (#44870)
Browse files Browse the repository at this point in the history
Add EditorConfig files for automatic text editor configuration. Only the most basic properties such as indent width are set.

Also remove `.dir-locals.el` files.

* GitHub Issue: #44805

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
pitrou authored Dec 2, 2024
1 parent 88c704e commit 1838d0a
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 42 deletions.
23 changes: 0 additions & 23 deletions .dir-locals.el

This file was deleted.

88 changes: 88 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This is an EditorConfig file: https://editorconfig.org/

# This is the top-most config for this project
root = true

# General settings

[*]
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
spelling_language = en

# Language-specific settings, in approximate alphabetical order

[*.{c,cc,cpp,h,hh,hpp}]
indent_size = 2
indent_style = space

[*.cmake]
indent_size = 2
indent_style = space

[CMakeLists.txt]
indent_size = 2
indent_style = space

[*.cs]
indent_size = 4
indent_style = space

[*.{fbs,proto,thrift}]
indent_size = 2
indent_style = space

[*.go]
indent_size = 8
indent_style = tab
tab_width = 8

[*.{js,ts}]
indent_size = 4
indent_style = space

[*.{py,pyx,pxd,pxi}]
indent_size = 4
indent_style = space

[*.r]
indent_size = 2
indent_style = space

[*.rb]
indent_size = 2
indent_style = space

[*.rst]
indent_size = 3
indent_style = space

[*.sh]
indent_size = 2
indent_style = space

[*.vala]
indent_size = 4
indent_style = space

[*.{yml,yaml}]
indent_size = 2
indent_style = space
19 changes: 0 additions & 19 deletions .github/.dir-locals.el

This file was deleted.

24 changes: 24 additions & 0 deletions matlab/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This is an EditorConfig file: https://editorconfig.org/

# See ../.editorconfig for inherited values

[*.m]
indent_size = 4
indent_style = space
28 changes: 28 additions & 0 deletions swift/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# This is an EditorConfig file: https://editorconfig.org/

# See ../.editorconfig for inherited values

[*.{c,cc,cpp,h,hh,hpp}]
indent_size = 4
indent_style = space

[*.swift]
indent_size = 4
indent_style = space

0 comments on commit 1838d0a

Please sign in to comment.