Skip to content

Commit

Permalink
config: amended git ignores and added editor config as well as git at…
Browse files Browse the repository at this point in the history
…tributes

- added editor config for ease of collaboration
- added git attributes file for cross platform ease
- amended git ignores by typical needed artifacts that should stay local

Signed-off-by: Stefan Hagen <[email protected]>
  • Loading branch information
sthagen committed Aug 13, 2023
1 parent 4c07c78 commit 6343455
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.editorconfig # Editor config
# http://EditorConfig.org

# This EditorConfig overrides any parent EditorConfigs
root = true

# Default rules applied to all file types
[*]

# Trim trailing spaces, newline at EOF
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

# 2 space indentation
indent_style = space
indent_size = 2

# Makefiles require tabs
[Makefile]
indent_style = tab
indent_size = 4
max_line_length = 256

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4
max_line_length = 120

# 2 space indentation
[*.{json,y{a,}ml,html,cwl}]
indent_style = space
indent_size = 2

[*.{md,Rmd,rst}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

# JavaScript-specific settings
[*.{js,ts}]
quote_type = single
indent_style = space
indent_size = 2
continuation_indent_size = 2
curly_bracket_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = none
max_line_length = 150

[*.rs]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
max_line_length = 120
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@

# Original ignores (before csaf_2.1 branch off)
meeting_minutes/.DS_Store
.DS_Store
*_strict_schema.json
official-cpe-dictionary_v2.3.*
official-cpe-dictionary_v2.2.*

# pyenv
.python-version

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Other local development artifacts
*~
.idea
local*
.vscode/
build/

0 comments on commit 6343455

Please sign in to comment.