Skip to content
Open
Show file tree
Hide file tree
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
55 changes: 55 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
root = true

# Language indent/EOL/charset overlap with .vscode/settings.json.
# Rulers, renderWhitespace, detectIndentation, mergeEditor, and
# language-server settings cannot be expressed here — they stay in
# settings.json.

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

# [bat]
[*.{bat,cmd}]
end_of_line = crlf
indent_size = 4
indent_style = space

# [c]
[*.{c,h}]
indent_size = 4
indent_style = space

# [cmake]
[{CMakeLists.txt,*.cmake}]
indent_size = 4
indent_style = tab

# [cpp]
[*.{cpp,cxx,hpp,hxx}]
indent_size = 4
indent_style = space

# [json]
[*.json]
indent_size = 2
indent_style = space

# [markdown]
[*.md]
indent_size = 2
indent_style = space

# [shellscript]
[*.{bash,sh,zsh}]
indent_size = 2
indent_style = space

# [yaml]
[*.{yaml,yml}]
indent_size = 2
indent_style = space
138 changes: 121 additions & 17 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,22 +1,126 @@
*.c linguist-language=C
*.h linguist-language=C
# .gitattributes — C / C++ (GitHub-hosted)
#
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp),
# gitattributes/gitattributes C++.gitattributes + Common.gitattributes,
# github-linguist overrides.
#
# Linguist language-bar policy (Synesis): classify public C API headers as C
# and *.cmake as CMake scripts; keep helper scripts, IDE project files, and
# CMakeLists.txt config out of the advertised language mix. Prefer
# -linguist-detectable over linguist-detectable=false.

*.cpp linguist-language=C++
*.hpp linguist-language=C++
*.cxx linguist-language=C++
*.hxx linguist-language=C++
# Default: detect text, normalize to LF in the repository
* text=auto

*.cmake linguist-language=CMake
# --- Source ---
*.c text diff=cpp
*.c++ text diff=cpp
*.cc text diff=cpp
*.cpp text diff=cpp
*.cxx text diff=cpp
*.h text diff=cpp
*.h++ text diff=cpp
*.hh text diff=cpp
*.hpp text diff=cpp
*.hxx text diff=cpp
*.inc text
*.inl text
*.ipp text
*.tcc text
*.tpp text

# --- Build / config ---
*.am text
*.cmake text
*.m4 text
*.mak text
*.mk text
*akefile text
CMakeLists.txt text
configure text eol=lf
configure.ac text

# --- Scripts ---
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sh text eol=lf
*.zsh text eol=lf

# --- Docs / meta ---
*.adoc text
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
LICENSE text
NEWS text
README text
TODO text
.gitattributes text
.gitignore text

*.cmd linguist-detectable=false
*.html linguist-detectable=false
*.sh linguist-detectable=false
*.dsp linguist-detectable=false
*.dsw linguist-detectable=false
*.sln linguist-detectable=false
*.vimrc linguist-detectable=false
*.vcxproj linguist-detectable=false
# --- Serialisation ---
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

CMakeLists.txt linguist-language=CMake
makefile linguist-detectable=false
# --- Compiled / binary artefacts ---
*.a binary
*.dll binary
*.dylib binary
*.exe binary
*.gch binary
*.la binary
*.lai binary
*.lib binary
*.lo binary
*.o binary
*.obj binary
*.out binary
*.pch binary
*.slo binary
*.so binary

# --- Archives / images (common) ---
*.gif binary
*.gz binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.tar binary
*.zip binary

# --- GitHub Linguist ---
**/build/** linguist-generated
**/cmake-build-*/** linguist-generated

# Classification (C-primary / C API with C++ tests; *.cmake as CMake scripts)
*.c linguist-language=C
*.cmake linguist-language=CMake
*.cpp linguist-language=C++
*.cxx linguist-language=C++
*.h linguist-language=C
*.hpp linguist-language=C++
*.hxx linguist-language=C++

# Keep the bar on library languages (helpers / legacy IDE / docs /
# CMakeLists.txt config; leave *.cmake detectable as CMake)
*.cmd -linguist-detectable
*.dsp -linguist-detectable
*.dsw -linguist-detectable
*.html -linguist-detectable
*.sh -linguist-detectable
*.sln -linguist-detectable
*.vcxproj -linguist-detectable
*.vimrc -linguist-detectable
CMakeLists.txt -linguist-detectable
makefile -linguist-detectable
Loading