Aboa is a npm package that informs developers who want to controbute to your project by usinh and applying various tags to your code.
Aboa can be installed through npm by usin the following command:
npm i aboa
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 :
-
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);
-
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);
}
-
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);
-
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);
-
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");
To find out all the tags in a directory in various files, use the aboa
command line as follows:
aboa src/
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__/
To run the tests, clone the git
repo and run the following commands:
npm install
npm run test