victor-gp / cmd-help-sublime-syntax

Sublime Syntax definition for sharkdp/bat to colorize command --help messages.
MIT License
21 stars 5 forks source link

Fix #2: codespell-2.2.1 #4

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 1 year ago

Screenshot from 2022-10-04 15-46-36

victor-gp commented 1 year ago

Thank you for the PR, @Freed-Wu !

Do you think you can update the tests?

You can find instructions for running them here. The required tools are documented here. It should be pretty doable if you're on Linux/MacOS.

To fix the broken syntax test, you just need to do something like this (remove the #todo comment too, please!)

Highlight tests will update by just running the script. Theme tests don't seem to change.

Freed-Wu commented 1 year ago
❯ tests/syntax.py
Docker image not available, building syntest from source...
[+] Building 139.4s (11/11) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                           0.1s
 => => transferring dockerfile: 644B                                                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                                                              0.1s
 => => transferring context: 2B                                                                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:bullseye-slim                                                                                                                       19.7s
 => [internal] load metadata for docker.io/library/rust:1.59                                                                                                                                  19.9s
 => [stage-1 1/2] FROM docker.io/library/debian:bullseye-slim@sha256:b46fc4e6813f6cbd9f3f6322c72ab974cc0e75a72ca02730a8861e98999875c7                                                          5.8s
 => => resolve docker.io/library/debian:bullseye-slim@sha256:b46fc4e6813f6cbd9f3f6322c72ab974cc0e75a72ca02730a8861e98999875c7                                                                  0.0s
 => => sha256:8b702518a671c926b5ece4efe386a476eb4777646a36d996d4bd50944f2f11a2 529B / 529B                                                                                                     0.0s
 => => sha256:e7bb3280b4c7e77c698313f4e57b8f6119e3b238e551122f8f9966695fb95b59 1.46kB / 1.46kB                                                                                                 0.0s
 => => sha256:b46fc4e6813f6cbd9f3f6322c72ab974cc0e75a72ca02730a8861e98999875c7 1.85kB / 1.85kB                                                                                                 0.0s
 => => sha256:bd159e379b3b1bc0134341e4ffdeab5f966ec422ae04818bb69ecef08a823b05 31.42MB / 31.42MB                                                                                               4.9s
 => => extracting sha256:bd159e379b3b1bc0134341e4ffdeab5f966ec422ae04818bb69ecef08a823b05                                                                                                      0.8s
 => [build 1/4] FROM docker.io/library/rust:1.59@sha256:7c0ea3ee40fc4f12a43de1b9967bc5df1337bf469253c322a98952079493448b                                                                      22.8s
 => => resolve docker.io/library/rust:1.59@sha256:7c0ea3ee40fc4f12a43de1b9967bc5df1337bf469253c322a98952079493448b                                                                             0.0s
 => => sha256:7c0ea3ee40fc4f12a43de1b9967bc5df1337bf469253c322a98952079493448b 988B / 988B                                                                                                     0.0s
 => => sha256:d6c4db7b25305e7cd7e57909a7952eff3ef19c488989a44433228bcb09fd676a 6.42kB / 6.42kB                                                                                                 0.0s
 => => sha256:9baf437a1badb6aad2dae5f2cd4a7b53a6c7ab6c14cba1ed1ecb42b4822b0e87 5.16MB / 5.16MB                                                                                                 1.6s
 => => sha256:6ade5c59e324bd7cf369c72ad781c23d37e8fb48c9bbb4abbecafafd9be4cc35 10.87MB / 10.87MB                                                                                               1.9s
 => => sha256:b33af7ffbb3bf98940f8326d9563ca403e315a33d9434303df76bdc325b0f5c4 1.59kB / 1.59kB                                                                                                 0.0s
 => => sha256:dbba69284b2786013fe94fefe0c2e66a7d3cecbb20f6d691d71dac891ee37be5 54.94MB / 54.94MB                                                                                               1.9s
 => => sha256:b19a994f6d4cdbb620339bd2e4ad47b229f14276b542060622ae447649294e5d 54.58MB / 54.58MB                                                                                               3.4s
 => => extracting sha256:dbba69284b2786013fe94fefe0c2e66a7d3cecbb20f6d691d71dac891ee37be5                                                                                                      1.2s
 => => sha256:5cc226cd46cdb8784c5aa2e1fd6c37a5ba6e1b17c4f71a1847d9ac937c882028 145.65MB / 145.65MB                                                                                            14.4s
 => => sha256:8fc2294f89de5e20d0ae12149d6136444bcb8c775ea745f06f2eb775ab4504cd 196.55MB / 196.55MB                                                                                            14.0s
 => => extracting sha256:9baf437a1badb6aad2dae5f2cd4a7b53a6c7ab6c14cba1ed1ecb42b4822b0e87                                                                                                      0.1s
 => => extracting sha256:6ade5c59e324bd7cf369c72ad781c23d37e8fb48c9bbb4abbecafafd9be4cc35                                                                                                      0.2s
 => => extracting sha256:b19a994f6d4cdbb620339bd2e4ad47b229f14276b542060622ae447649294e5d                                                                                                      1.4s
 => => extracting sha256:8fc2294f89de5e20d0ae12149d6136444bcb8c775ea745f06f2eb775ab4504cd                                                                                                      4.2s
 => => extracting sha256:5cc226cd46cdb8784c5aa2e1fd6c37a5ba6e1b17c4f71a1847d9ac937c882028                                                                                                      3.2s
 => [build 2/4] RUN git clone --depth=1 --branch=v5.0.0     https://github.com/trishume/syntect.git     /usr/src/syntect                                                                      17.8s
 => [build 3/4] WORKDIR /usr/src/syntect                                                                                                                                                       0.1s
 => [build 4/4] RUN cargo build --release --example syntest                                                                                                                                   78.1s
 => [stage-1 2/2] COPY --from=build /usr/src/syntect/target/release/examples/syntest     /usr/local/bin/syntest                                                                                0.1s
 => exporting to image                                                                                                                                                                         0.5s
 => => exporting layers                                                                                                                                                                        0.5s
 => => writing image sha256:d0b0cd531ff1534017957ee5b7d694a9967dc2416cbdc77c951de7daa157b17b                                                                                                   0.0s
 => => naming to docker.io/library/syntest                                                                                                                                                     0.0s
Docker build ends here.
Manpage syntax is missing, downloading it...
loading syntax definitions from /syntaxes
Testing file /tests/syntax/syntax_test_adb.txt
Ok(Success(36))
Testing file /tests/syntax/syntax_test_apt.txt
Ok(Success(4))
Testing file /tests/syntax/syntax_test_bash.txt
Ok(Success(39))
Testing file /tests/syntax/syntax_test_bat.txt
Ok(Success(89))
Testing file /tests/syntax/syntax_test_cabal.txt
Ok(Success(102))
Testing file /tests/syntax/syntax_test_cargo.txt
Ok(Success(6))
Testing file /tests/syntax/syntax_test_chown.txt
Ok(Success(27))
Testing file /tests/syntax/syntax_test_codespell.txt
Ok(Success(12))
Testing file /tests/syntax/syntax_test_cp.txt
Ok(Success(47))
Testing file /tests/syntax/syntax_test_curl.txt
Ok(Success(55))
Testing file /tests/syntax/syntax_test_dd.txt
Ok(Success(9))
Testing file /tests/syntax/syntax_test_delta.txt
Ok(Success(1))
Testing file /tests/syntax/syntax_test_diff.txt
Ok(Success(10))
Testing file /tests/syntax/syntax_test_docker.txt
Ok(Success(19))
Testing file /tests/syntax/syntax_test_dpkg.txt
Ok(Success(20))
Testing file /tests/syntax/syntax_test_emacs.txt
Ok(Success(28))
Testing file /tests/syntax/syntax_test_gcc.txt
Ok(Success(47))
Testing file /tests/syntax/syntax_test_ghc.txt
Ok(Success(38))
Testing file /tests/syntax/syntax_test_git-commit.txt
Ok(Success(2))
Testing file /tests/syntax/syntax_test_head.txt
Ok(Success(6))
Testing file /tests/syntax/syntax_test_htop.txt
Ok(Success(21))
Testing file /tests/syntax/syntax_test_irb.txt
Ok(Success(45))
Testing file /tests/syntax/syntax_test_java.txt
Ok(Success(82))
Testing file /tests/syntax/syntax_test_jq.txt
Ok(Success(2))
Testing file /tests/syntax/syntax_test_less.txt
Ok(Success(49))
Testing file /tests/syntax/syntax_test_man.txt
Ok(Success(48))
Testing file /tests/syntax/syntax_test_nano.txt
Ok(Success(19))
Testing file /tests/syntax/syntax_test_python.txt
Ok(Success(39))
Testing file /tests/syntax/syntax_test_rails.txt
Ok(Success(18))
Testing file /tests/syntax/syntax_test_rubocop.txt
Ok(Success(41))
Testing file /tests/syntax/syntax_test_ruby.txt
Ok(Success(196))
Testing file /tests/syntax/syntax_test_sbt.txt
Ok(Success(55))
Testing file /tests/syntax/syntax_test_solaar.txt
Ok(Success(32))
Testing file /tests/syntax/syntax_test_tee.txt
Ok(Success(6))
Testing file /tests/syntax/syntax_test_vim.txt
Ok(Success(24))
Testing file /tests/syntax/syntax_test_xsel.txt
Ok(Success(163))
exiting with code 0
victor-gp commented 1 year ago

I also saw the issues you opened. I'll look into them later today and I'll answer them by tomorrow. Thank you for your help!