This app is used by the Robotic Process Automation (RPA) team at Flinders University to lint our RPA projects against an agreed set of rules. We apply these style rules so that our automations are consistent.
We use UiPath to develop and manage our automations.
This app, developed using Node.js, uses static analysis techniques to check the XAML code and project settings against our agreed rules.
To install the app:
-
Download and install Node.js onto your computer
-
Clone this repository
-
Install the app dependencies using the following command:
npm install
-
Link to the package so it can be run from anywhere using the following command:
npm link
After the app has been linked you can use the app in one of two ways.
You can run the app by specifying the path to the UiPath project folder using the -i
option. For example:
rpa-lint -i U:\MyWork\UiPath\Flinders.Foundation\
Alternatively, if the -i
option is not set the current working directory is used. For example:
cd MyWork\UiPath\Flinders.Foundation\
rpa-lint
To see a list of possible command line options, use the -h
or --help
option. For example:
rpa-lint --help
To check the project for outdated dependencies use the --dep-check
option. For example:
cd MyWork\UiPath\Flinders.Foundation\
rpa-lint --dep-check
The app is licensed using the BSD 3-Clause License. Contributions, such as suggestions for new rules or new features are welcome.
This is a good question. Using Invoke Code activities we could have implemented this type of analysis using UiPath. There are three main reasons for the decision to use Node.js.
- Our aim is to have as little code as possible in our automations. This makes them easier to develop and maintain. It also makes it easier for less experienced users to work with us on developing automations.
- The app needed to be cross platform. The app needs to be able to be run locally while developing an automation on Windows. The app also needs to be able to be run on common continuous integration infrastructure. So that code can be automatically checked.
- JavaScript continues to be one of the most popular development languages. Making it easier for developers to contribute and help maintain the app.
We use the popular Mocha framework to develop and manage unit tests for the app. To run the tests, use the following command:
npm run test
We use the popular Istanbul test coverage tool to monitor the test coverage. To generate a report, use the following command:
npm run coverage
We use the ESLint utility to lint our JavaScript code. To lint the code, use the following command:
npm run lint
Take a look at the .eslintrc.json
file to see which rules we apply.
We use JSDoc syntax and the related tool to generation internal documentation for the app. To generate the documentation using the latest version of the code, use the following command:
npm run docs