octocat/linguist hiện có 757 sao trên GitHub, viết chủ yếu bằng Ruby. Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This library is used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.
See Troubleshooting and CONTRIBUTING.md before filing an issue or creating a pull request.
Troubleshooting
My repository is detected as the wrong language
The Language stats bar displays languages percentages for the files in the repository. The percentages are calculated based on the bytes of code for each language as reported by the List Languages API. If the bar is reporting a language that you don't expect:
Click on the name of the language in the stats bar to see a list of the files that are identified as that language.
If you see files that you didn't write, consider moving the files into one of the paths for vendored code, or use the manual overrides feature to ignore them.
If the files are being misclassified, search for open issues to see if anyone else has already reported the issue. Any information you can add, especially links to public repositories, is helpful.
If there are no reported issues of this misclassification, open an issue and include a link to the repository or a sample of the code that is being misclassified.
Overrides
Linguist supports a number of different custom overrides strategies for language definitions and vendored paths.
Using gitattributes
Add a .gitattributes file to your project and use standard git-style path matchers for the files you want to override to set linguist-documentation, linguist-language, and linguist-vendored. .gitattributes will be used to determine language statistics, but will not be used to syntax highlight files. To manually set syntax highlighting, use Vim or Emacs modelines.
$ cat .gitattributes
*.rb linguist-language=Java
Checking code you didn't write, such as JavaScript libraries, into your git repo is a common practice, but this often inflates your project's language stats and may even cause your project to be labeled as another language. By default, Linguist treats all of the paths defined in lib/linguist/vendor.yml as vendored and therefore doesn't include them in the language statistics for a repository.
Use the linguist-vendored attribute to vendor or un-vendor paths.
Just like vendored files, Linguist excludes documentation files from your project's language stats. lib/linguist/documentation.yml lists common documentation paths and excludes them from the language statistics for your repository.
Use the linguist-documentation attribute to mark or unmark paths as documentation.
Not all plain text files are true source files. Generated files like minified js and compiled CoffeeScript can be detected and excluded from language stats. As an added bonus, unlike vendored and documentation files, these files are suppressed in diffs.
Alternatively, you can use Vim or Emacs style modelines to set the language for a single file. Modelines can be placed anywhere within a file and are respected when determining how to syntax-highlight a file on GitHub.com
Vim
# Some examples of various styles:
vim: syntax=java
vim: set syntax=ruby:
vim: set filetype=prolog:
vim: set ft=cpp:
These stats are also printed out by the linguist executable. You can use the
--breakdown flag, and the binary will also output the breakdown of files by language.
You can try running linguist on the root directory in this repository itself:
The language grammars included in this gem are covered by their repositories'
respective licenses. grammars.yml specifies the repository for each grammar.
All other files are covered by the MIT license, see LICENSE.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/octocat/linguist là nguồn chính thức.
octocat/linguist có phải mã nguồn mở không?
Có — octocat/linguist phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/octocat/linguist.
octocat/linguist có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho octocat/linguist. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
octocat/linguist có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho octocat/linguist. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
octocat/linguist còn đang phát triển không?
Commit gần nhất trên octocat/linguist là 2.0 năm trước (theo timestamp GitHub). Repo có 278 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
octocat/linguist dùng license gì?
octocat/linguist phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc linguist có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về linguist.