Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Complete collection of syntax highlighting test files #1213
Comments
|
Can I submit a python file for this issue? |
yes |
|
I will submit a elixir file soon :) |
adgai19
mentioned this issue
uduDudu
mentioned this issue
parksb
mentioned this issue
iamquang95
mentioned this issue
This was referenced
iamquang95
mentioned this issue
mdevlamynck
mentioned this issue
Liberatys
mentioned this issue
This was referenced
|
i am not able to run |
|
@AkshatGadhwal @sharkdp I was also thinking about it. I think the script should first try to run a locally built binary from |
Celeo
mentioned this issue
|
I'm also getting an error
|
|
@CCreativeCND The solution is to add the |
This was referenced
See step 1 of the instructions above: "Make sure that you are running the latest version of bat (preferably master, but the latest release should also work) and that bat is available on the path." We could probably improve the error message in the Python script. |
This was referenced
senden9
mentioned this issue
senden9
mentioned this issue
senden9
mentioned this issue
R1tschY
mentioned this issue
This is to contribute to issue sharkdp#1213. I took some of the more complicated servers I am running as examples. Everything looks to be correctly highlighted compared to vim's syntax highlighting.
bentglasstube
mentioned this issue
This is to contribute to issue #1213. I took some of the more complicated servers I am running as examples. Everything looks to be correctly highlighted compared to vim's syntax highlighting.
sharkdp
mentioned this issue
Part of the work for issue sharkdp#1213. A short PowerShell script and the corresponding syntax-highlighted output has been added. The script exhibits many of the peculiarities of the PowerShell syntax.
dp304
mentioned this issue
Part of the work for issue #1213. A short PowerShell script and the corresponding syntax-highlighted output has been added. The script exhibits many of the peculiarities of the PowerShell syntax.
Horki
mentioned this issue
This was referenced
This was referenced
henil
mentioned this issue
stdedos
mentioned this issue


With all the recent news about Hacktoberfest I thought it would be a good idea to point out good beginner issues that would be actually helpful for
bat. In the past years, I have actually experienced Hacktoberfest as a really great event - both as a contributor as well as a maintainer.As of recently,
bathas a set of syntax highlighting regression tests (see #1124 for more details). The main idea is that we have a large collection of test files for each and every language thatbatcan highlight. This way, we can make sure that we do not run into issues we had in the past where either (1) syntax highlighting for some language is suddenly not working anymore or (2)batsuddenly crashes/panics for some input (due to incompatibilities in theregexflavors insyntectand Sublime Text).In order to add a new test file, you can follow these steps (let's take "Ruby" as an example):
bat(masterorbat0.16) and thatbatis available on the path.tests/syntax-tests/source/Ruby(adapt for your language). The file name could betest.rb(adapt extension) but can also be adapted if that is necessary in order forbatto highlight it correctly (e.g.Makefile).bats license. If it requires attribution, please add aLICENSE.mdin the same folder with a text like this:tests/syntax-testsand run theupdate.shBash script. A new file should be generated in thehighlightedfolder (e.g.highlighted/Ruby/test.rb).catorbat --language=txtto display the content of this file and make sure that the syntax highlighting looks correct.git addthe new files in thesourcefolder as well as the autogenerated files in thehighlightedfolder.List of languages / syntaxes:
/proc/cpuinfo)/etc/group--show-all)/etc/hosts/proc/meminfo)/etc/passwdrequirements.txt/etc/resolv.conf)It would be great if we could focus on the syntaxes in
sublimehq/Packagesfirst (marked in bold) as this would allow us to merge #1174 without having to worry (too much) about syntax highlighting regressions. Also, most of these are really popular languages, so it makes sense to have them in the test suite.