mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-25 01:01:58 -05:00
Add Linguist language override for include files (#1079)
Add a `linguist-language` Git attribute that matches the files at `include/gsl` and sets their language to C++. Without this override, these files are not detected as C++ code by [GitHub's Linguist](https://github.com/github/linguist) (likely due to lacking any file extensions). This will cause GitHub.com to count these files correctly as C++ code and do syntax highlighting when browsing the repo. **Linguist breakdown results** Before: <details> ``` $ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t linguist github-linguist --breakdown 91.57% 152148 C++ 8.43% 14011 CMake CMake: CMakeLists.txt cmake/gsl_functions.cmake cmake/gsl_install.cmake include/CMakeLists.txt tests/CMakeLists.txt C++: tests/algorithm_tests.cpp tests/assertion_tests.cpp tests/at_tests.cpp tests/byte_tests.cpp tests/deathTestCommon.h tests/no_exception_ensure_tests.cpp tests/notnull_tests.cpp tests/owner_tests.cpp tests/span_compatibility_tests.cpp tests/span_ext_tests.cpp tests/span_tests.cpp tests/strict_notnull_tests.cpp tests/utils_tests.cpp ``` </details> After: <details> ``` $ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t linguist github-linguist --breakdown 94.16% 225699 C++ 5.84% 14011 CMake CMake: CMakeLists.txt cmake/gsl_functions.cmake cmake/gsl_install.cmake include/CMakeLists.txt tests/CMakeLists.txt C++: include/gsl/algorithm include/gsl/assert include/gsl/byte include/gsl/gsl include/gsl/gsl_algorithm include/gsl/gsl_assert include/gsl/gsl_byte include/gsl/gsl_narrow include/gsl/gsl_util include/gsl/narrow include/gsl/pointers include/gsl/span include/gsl/span_ext include/gsl/string_span include/gsl/util tests/algorithm_tests.cpp tests/assertion_tests.cpp tests/at_tests.cpp tests/byte_tests.cpp tests/deathTestCommon.h tests/no_exception_ensure_tests.cpp tests/notnull_tests.cpp tests/owner_tests.cpp tests/span_compatibility_tests.cpp tests/span_ext_tests.cpp tests/span_tests.cpp tests/strict_notnull_tests.cpp tests/utils_tests.cpp ``` </details>
This commit is contained in:
parent
f94c1f6f2b
commit
0822838a7c
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
include/gsl/* linguist-language=C++
|
Loading…
Reference in New Issue
Block a user