Skip to main content

Static analysis tool for robotframework plain text files

Project description

Welcome to Robot Framework Lint

Static analysis for robot framework plain text files.

This is a static analysis tool for robot framework plain text files.

Installation Instructions

The preferred method of installation is to use pip:

$ pip install –upgrade robotframework-lint

This will install a package named “rflint”, and an executable named “rflint”

Running the linter

To run, use the command “rflint”, or use the -m option to python to run the rflint module. Add one or more filenames as arguments, and those files will be checked for rule violations.

Custom rules

Rules are simple python classes. For more information about how to write rules, see the [robotframework-lint wiki](https://github.com/boakley/robotframework-lint/wiki)

Examples

$ rflint myTestSuite.robot

To see a list of all of the built-in rules, run the following command

$ rflint –list

To see documentation, add the –verbose option:

$ rflint –list –verbose

Some rules are configurable. For example, to configure the “LineTooLong” rule to flag lines longer than 80 characters (the default is 100), you can change the default value with the configure option:

$ rflint –configure LineTooLong:80 myTestSuite.robot

You can disable any rule, or configure it to be a warning or error with the options –warning, –error and –ignore. For example, to ignore the LineTooLong rule you can do this:

$ rflint –ignore LineTooLong myTestSuite.robot

To see a list of all command line options, use the –help option:

$ python -m rflint –help

Example output:

$ python -m rflint myTestSuite.robot + myTestSuite.robot W: 2, 0: No suite documentation (RequireSuiteDocumentation) E: 15, 0: No keyword documentation (RequireKeywordDocumentation)

This show a warning on line two, character 0, where there should be suite documentation but isn’t. It also shows an error on line 15, character 0, where there should be keyword documentation but there isn’t.

Acknowledgements

A huge thank-you to Echo Global Logistics (http://www.echo.com) for supporting the development of this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-lint-0.6.tar.gz (21.0 kB view details)

Uploaded Source

File details

Details for the file robotframework-lint-0.6.tar.gz.

File metadata

File hashes

Hashes for robotframework-lint-0.6.tar.gz
Algorithm Hash digest
SHA256 eea059816943815a634c871dca4f61bd6229b00042b43b690a9cc2dec45c7f65
MD5 0b2f09cfce01fa0fe0c8425aea22e143
BLAKE2b-256 b9c236a6302fbb483cf7c38cca212b89c5c811add0492e65fcc2a5cb43f3b969

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page