aboa

0.0.2 • Public • Published

Aboa

Aboa is a npm package that informs developers who want to controbute to your project by usinh and applying various tags to your code.

Installation

Aboa can be installed through npm by usin the following command:

npm i aboa

Usage

Aboa informs user about your repository by tags which can be added to your code in comments. There are 5 different types of tags that are described as follows :

  • @bug

    The @bug tag denotes that the next chunk of code in that file has potential bigs and is not fully secure. To add the @bug tag to your code, make a comment in the file you want to set the tag to as follows:
/*
@bug
The following code is buggy as the value of num is `undefined`
*/
let num = undefined;
console.log(num + 10);
  • @fix

    The @fix tag denotes that the next peice of code is just a fix implentation to solve the problem. You can add the @fix to a file as follows:
/*
@fix
Change the following peice of code in the next update
*/
let num = undefined;
if (num == undefined) {
  console.log("Undefined");
} else {
  console.log(num + 10);
}
  • @error

    The @error tag denotes that the next peice of code will probably result in an error. Add the @error tag to a file as follows:
/*
@error
The follwing code will result in an error
*/
console.log(a.b.c);
  • @vulnerable

    The @vulnerable tag denotes that a peice of code is vulnerable if not used in the intended manner. To add the @vulnerable tag to your code, make a comment in the file you want to set the tag to as follows:
/*
@vulnerable
The following code is buggy as the value of num is `undefined`
*/
let num = input("Enter a num : >>");
console.log(num + 10);
  • @unsafe

    The @unsafe tag denotes that the next peice of code may not work on all platforms. To add the @unsafe tag to your code, make a comment in the file you want to set the tag to as follows:
/*
@unsafe
The following code may not work on windows
*/
const shell = require("shelljs");
shell.exec("pwd");

Command Line Tool

To find out all the tags in a directory in various files, use the aboa command line as follows:

aboa src/

Examples

Test the aboa command line on the aboa github repo

git clone https://github.com/svel-ai/aboa
cd aboa
npm i aboa
aboa __tests__/

Test

To run the tests, clone the git repo and run the following commands:

npm install
npm run test

License : MIT

Readme

Keywords

none

Package Sidebar

Install

npm i aboa

Weekly Downloads

6

Version

0.0.2

License

MIT

Unpacked Size

13.8 kB

Total Files

15

Last publish

Collaborators

  • japroz-saini