Documentation comment not found for method definition
validate
10 super(SellerModel)
11 }
12
13 async validate(req, res){ 14
15 const seller = await this.findById(req)
16 const sellerKey = await Validator.createAuthToken({...seller, isSeller: true}, process.env.SELLER_TOKEN_KEY) //mismo caso que con el salesManager
Documentation comment not found for class
SellerController
4
5const SellerModel = new Seller();
6
7class SellerController extends Controller{ 8
9 constructor(){
10 super(SellerModel)
Documentation comment not found for method definition
validate
10 super(ManagerModel)
11 }
12
13 async validate(req, res){ 14
15 const manager = await this.findById(req)
16 const managerKey = await Validator.createAuthToken({...manager, isSeller: true}, process.env.MANAGER_TOKEN_KEY) //como no tengo el archivo env voy a inventar el nombre del token
Documentation comment not found for class
SalesManagerController
4
5const ManagerModel = new SalesManager();
6
7class SalesManagerController extends Controller{ 8
9 constructor(){
10 super(ManagerModel)
Description
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
Bad Practice
function sum(a, b) {
return a + b;
}
Recommended
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}