Upvote Upvoted 10 Downvote Downvoted
kvlint - KeyValues checker
posted in Projects
1
#1
0 Frags +

https://github.com/sheybey/kvlint

README.mdkvlint is a small program designed to lint KeyValues files, such as those used in TF2 huds and as flat file storage for sourcemod plugins.

Yesterday, I decided that I should write a program in C rather than my usual polyglot of scripting languages. This is the result.

When run on a KeyValues file, kvlint checks it for syntax correctness and outputs a list of possible problems it finds. Although a tad clunky to use, it works pretty much as advertised. To test it, I have been running it on the hud I use:

$ find custom/hud -name '*.res' -exec kvlint -m '{}' ';' > huderrors.txt

Sample output: http://puu.sh/iySB8/5ace25eb0d.txt (I've submitted a pull request to budhud to fix these issues)
Windows binary: https://github.com/sheybey/kvlint/releases/download/v0.4/kvlint-win32.zip

https://github.com/sheybey/kvlint

[quote=README.md]kvlint is a small program designed to lint KeyValues files, such as those used in TF2 huds and as flat file storage for sourcemod plugins.[/quote]

Yesterday, I decided that I should write a program in C rather than my usual polyglot of scripting languages. This is the result.

When run on a KeyValues file, kvlint checks it for syntax correctness and outputs a list of possible problems it finds. Although a tad clunky to use, it works pretty much as advertised. To test it, I have been running it on the hud I use:

[code]$ find custom/hud -name '*.res' -exec kvlint -m '{}' ';' > huderrors.txt[/code]

Sample output: http://puu.sh/iySB8/5ace25eb0d.txt (I've submitted a pull request to budhud to fix these issues)
Windows binary: https://github.com/sheybey/kvlint/releases/download/v0.4/kvlint-win32.zip
2
#2
24 Frags +

I understood under 5% of these words

I understood under 5% of these words
3
#3
17 Frags +
saamI understood under 5% of these words

It tells you if your hud files have problems with formatting

[quote=saam]I understood under 5% of these words[/quote]

It tells you if your hud files have problems with formatting
4
#4
0 Frags +

I'd love to run this (without doing one file at a time) but I keep getting issues with the find command.

I'd love to run this (without doing one file at a time) but I keep getting issues with the find command.
5
#5
2 Frags +

I have updated this to check for typos in #base keys and add support for block comments. Note that block comments only work in sourcemod configuration files - they act like line comments in HUDs and can cause unexpected behavior.

https://github.com/sheybey/kvlint/releases/tag/v0.4

FireStarwI'd love to run this (without doing one file at a time) but I keep getting issues with the find command.

Sorry, I should have been a little more clear in the OP. I developed this on a linux machine, so I was using GNU find. I don't know of an equivalent on the windows platform, but you can pass more than one file at once now.

I have updated this to check for typos in #base keys and add support for block comments. Note that block comments only work in sourcemod configuration files - they act like line comments in HUDs and can cause unexpected behavior.

https://github.com/sheybey/kvlint/releases/tag/v0.4

[quote=FireStarw]I'd love to run this (without doing one file at a time) but I keep getting issues with the find command.[/quote]
Sorry, I should have been a little more clear in the OP. I developed this on a linux machine, so I was using GNU find. I don't know of an equivalent on the windows platform, but you can pass more than one file at once now.
Please sign in through STEAM to post a comment.