Well have no fear, Standardly is here! Standardly is a DIY automation tool for Standards Governance.
1. You establish standards
2. You translate standards into rules
- Rules should be in JSON format
3. To run the tool, you pass Standardly the following input:
- Resource to be assessed
- Rules
- Location to output the results
4. You view the results!
Makes sense? Below is a high-level flow chart of how Standardly works!
Standardly was designed in mind to work on a number of different resources: code, databases, documents, you name it! For example, for a code resource, rules can revolve around coding standards. For a database resource, rules might be that certain types of data must be encrypted, or data older than a particular date should be archived. Currently, Standardly only supports resources that are files; files that are on your filesystem or on a github repo. Okay enough chit chat, let's get to analysing your resource!
- node 10.16.0
- npm
- git
Download/clone this repository, to clone:
git clone https://github.com/intuit/standardly.git
Change your working directory so that you are inside the Standardly repository:
cd standardly
Before you can run the tool first install the dependencies it needs:
npm install
Now Standardly is equipped to start scanning your resource!
To scan a local directory, run:
standardly --localdir <directory_location> --rulesfile <fullpath_of_rules_file>
or
standardly -l <directory_location> -r <fullpath_of_rules_file>
or if running in a bash shell, simply run
./standardly -l <directory_location> -r <fullpath_of_rules_file>
To scan a github repo, run:
standardly --giturl <url_of_gitrepo_to_scan> --rulesfile <fullpath_of_rules_file>
or
standardly -g <url_of_gitrepo_to_scan> -r <fullpath_of_rules_file>
The output is created as a results.csv file in a folder named 'reports' under the current directory. If you would like to change the location of the results.csv file pass a --outputdir (or simply -o) parameter to output where you want the results.csv file to be. Below is an example of explicitly specifying the outputdir.
standardly -g https://github.com/argoproj/argo -r /Users/standardlyRocks/Desktop/standardly/sample/rules.json -o /Users/standardlyRocks/Desktop/reports
When this command is executed, a results.csv file will be created in the /Users/standardlyRocks/Desktop/reports
directory
To run the unit tests in the Standardly repo, in the base directory of the repo run:
npm test
npm run test:integration
See CONTRIBUTING.md