As far as I know, there isn't an existing linting tool for rules.txt and similar files. I wanted something that can detect loops in the tech tree, so I had a quick hacking session last night and wrote civ2lint: https://github.com/leonsp/civ2lint/releases
I've only tested it on Mac, but Go makes...