GSL/.gitattributes

2 lines
36 B
Plaintext
Raw Normal View History

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>
2023-01-06 11:11:06 -05:00
include/gsl/* linguist-language=C++