GithubHelp home page GithubHelp logo

classicvalues / standardly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intuit/standardly

0.0 1.0 0.0 4.46 MB

Standardly allows you to check for compliance against standards. Once you code your standards into a 'rules' json object, you can scan a directory on your filesystem or a GitHub repo to check for its compliance against the standard.

License: Other

Shell 0.27% JavaScript 99.73%

standardly's Introduction


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

standardly's People

Contributors

vidyanarayanan avatar jlu17 avatar roxiomontes avatar akanksha2507 avatar hipstersmoothie avatar jenniferlu avatar rociomontes avatar mbello498 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.