Linting preprocessors
Not all preprocessors convert code. Some clear up after us and search for the bugs we’ve missed. The unique Unix command-line device, lint
, has metastasized and now its capabilities are discovered as preprocessors in lots of language growth stacks. These linting instruments, or linters, repair formatting, implement naming conventions, and even repair some syntactic and semantic errors. Some implement guidelines that flag potential safety flaws from unhealthy logic. In style variations embrace RuboCop for Ruby code, Pylint for Python, and ESLint for JavaScript (ECMAScript).
Preprocessors for documentation
Some preprocessors produce one thing aside from runnable code. Instruments like Sphinx, MkDocs, and Doxygen analyze your information and create an annotated and cross-referenced set of documentation information immediately from code. These instruments are designed to work with a number of languages however nearly all of the languages have their very own official preprocessor. In style examples embrace Javadoc, Rustdoc, Godoc, and JSDoc.
Preprocessors for built-in information reporting
Information scientists don’t simply converse R language. Additionally they write out advanced information stories in a human language stuffed with charts, tables, and graphs created by R. Through the years, information scientists have created advanced preprocessors for not solely R but additionally LaTeX, the typesetting language. The scientist writes every little thing in R and human language, then the preprocessor splits it up, sending the computational directions to R and the typesetting directions to LaTeX. On the identical time, it juggles the elements so the images produced by R find yourself in the correct place in your doc. LaTeX then folds them into the eventual PDF that’s produced from the human language elements of the file. It does all this whereas additionally organizing web page references and illustration numbers to be constant.