Skip to content

Commit

Permalink
Add support for checksum lists (#5138)
Browse files Browse the repository at this point in the history
* Add support for checksum list files

* Deduplicate filenames for Checksums

* Remove `.crc` and `CRC` from proposed filetypes

These names are too ubiquitous across GitHub, and code-searches yield no
actually valid files containing a CRC32 sum.

See http://github.com/github/linguist/pull/5138/files/09c642Ω#r559949817
for the original discussion justifying their removal.

* Update filenames and extensions for Checksums

* Delete single_hash.rmd160.digest

* Remove .digest

Co-authored-by: Alhadis <gardnerjohng@gmail.com>
Co-authored-by: Colin Seymour <colin@github.com>
  • Loading branch information
3 people authored Jun 8, 2022
1 parent 3ccee19 commit 9703d62
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,39 @@ Charity:
tm_scope: none
ace_mode: text
language_id: 56
Checksums:
type: data
tm_scope: text.checksums
aliases:
- checksum
- hash
- hashes
- sum
- sums
filenames:
- MD5SUMS
- SHA1SUMS
- SHA256SUMS
- SHA256SUMS.txt
- SHA512SUMS
- checksums.txt
- cksums
- md5sum.txt
extensions:
- ".crc32"
- ".md2"
- ".md4"
- ".md5"
- ".sha1"
- ".sha2"
- ".sha224"
- ".sha256"
- ".sha256sum"
- ".sha3"
- ".sha384"
- ".sha512"
ace_mode: text
language_id: 372063053
ChucK:
type: programming
color: "#3f8000"
Expand Down
3 changes: 3 additions & 0 deletions samples/Checksums/bsd-style.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SHA256 (empty) = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
SHA256 (file0) = 0000000000000000000000000000000000000000000000000000000000000000
SHA256 (file1) = 0000000000000000000000000000000000000000000000000000000000000001
3 changes: 3 additions & 0 deletions samples/Checksums/filenames/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 *empty_binary_file
0000000000000000000000000000000000000000000000000000000000000000 *file0
0000000000000000000000000000000000000000000000000000000000000001 *file1
3 changes: 3 additions & 0 deletions samples/Checksums/filenames/SHA256SUMS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SHA256 (empty) = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
SHA256 (file0) = 0000000000000000000000000000000000000000000000000000000000000000
SHA256 (file1) = 0000000000000000000000000000000000000000000000000000000000000001
1 change: 1 addition & 0 deletions samples/Checksums/gnu-style-text.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 empty_text_file
3 changes: 3 additions & 0 deletions samples/Checksums/gnu-style.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 *empty_binary_file
0000000000000000000000000000000000000000000000000000000000000000 *file0
0000000000000000000000000000000000000000000000000000000000000001 *file1
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.crc32
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffffffff
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.md2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8350e5a3e24c153df2275c9f80692773
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.md4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
31d6cfe0d16ae931b73c59d7e0c089c0
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d41d8cd98f00b204e9800998ecf8427e
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
da39a3ee5e6b4b0d3255bfef95601890afd80709
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.sha224
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.sha384
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b
1 change: 1 addition & 0 deletions samples/Checksums/single_hash.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
1 change: 1 addition & 0 deletions samples/Checksums/single_hash_dec.crc32
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4294967295
1 change: 1 addition & 0 deletions samples/Checksums/single_hash_no_trailing_newline.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
1 change: 1 addition & 0 deletions samples/Checksums/zero.sha2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0000000000000000000000000000000000000000000000000000000000000000
1 change: 1 addition & 0 deletions samples/Checksums/zero.sha3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
00000000000000000000000000000000000000000000000000000000
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **CartoCSS:** [yohanboniface/carto-atom](https://github.com/yohanboniface/carto-atom)
- **Ceylon:** [jeancharles-roger/ceylon-sublimetext](https://github.com/jeancharles-roger/ceylon-sublimetext)
- **Chapel:** [chapel-lang/chapel-tmbundle](https://github.com/chapel-lang/chapel-tmbundle)
- **Checksums:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
- **ChucK:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle)
- **Cirru:** [Cirru/sublime-cirru](https://github.com/Cirru/sublime-cirru)
- **Clarion:** [fushnisoft/SublimeClarion](https://github.com/fushnisoft/SublimeClarion)
Expand Down

0 comments on commit 9703d62

Please sign in to comment.