Skip to content

Simple command line tool to type check a given teal file/directory

License

Notifications You must be signed in to change notification settings

svermeulen/tlcheck

Repository files navigation

Teal Check

A simple command line tool to type check a given teal file/directory and produce a list of warnings/errors

test

Installation

From luarocks

  • luarocks install tlcheck
  • tlcheck

From source

  • Clone repo
  • From repo root:
    • luarocks init
    • ./luarocks make
    • ./lua_modules/bin/tlcheck

Usage

tlcheck [PATH]

Note:

  • Given path can be a single .tl file or a directory (which will be searched recursively for all .tl files)
  • A tlconfig.lua file must be present in the given directory or a parent of the given directory/path
  • This program is designed to be more script/machine friendly than human friendly. The output is easy to parse but not easy to read. When no errors are found, there is zero output and the exit code is 0 (and otherwise will be 1)

FAQ

Doesn't cyan already do this?

Yes. cyan would be a better choice when building/type-checking your teal scripts on the command line manually. However, the output from cyan is not currently very script friendly. So tlcheck just fills that one particular gap, for cases where you are type checking as part of a larger script/automation/development environment, and would like to parse the errors.

The tl script that comes with teal also provides some of this functionality, however it appears to be deprecated in favour of cyan.

About

Simple command line tool to type check a given teal file/directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published