Neat! Pickled Muskrat!

    @intuit/standardly

    0.1.2 • Public • Published


    StandardlyLogo

    Enforcing standards, one resource at a time!

    CircleCI

    npm


    Introduction

    Do you find code, documentation, or any other resource veering off standards?

    Is it hard to enforce standards on your team when an upcoming deadline is just around the corner?

    Want to automate part of the code review process?

    Well have no fear, Standardly is here! Standardly is a DIY automation tool for Standards Governance.

    So how does it work?

    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!

    Flow 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!

    Prerequisites For Installing

    • node 10.16.0
    • npm
    • git

    How To Use

    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

    Running Tests

    Unit tests

    To run the unit tests in the Standardly repo, in the base directory of the repo run:

    npm test
    

    Integration tests

    npm run test:integration
    

    Extending Standardly To Support New Rules

    See CREATING-RULES.md

    How To Contribute

    See CONTRIBUTING.md

    Install

    npm i @intuit/standardly

    DownloadsWeekly Downloads

    2

    Version

    0.1.2

    License

    Apache-2.0

    Unpacked Size

    463 kB

    Total Files

    75

    Last publish

    Collaborators

    • lshadler
    • alisowski
    • adierkens
    • davidaghassi
    • poorpaddy