doAdjustment
257
258
259
260function doAdjustment(id, title, amount, form, type){261 if ((id==null) | (id ===""))return;
262 db.collection(type).doc(id).set({
263 id: id,
deleteRecord
199 table.tBodies[0].innerHTML = '';
200}
201
202function deleteRecord(id){203 colRecords.doc(id).delete().then(() => {
204 console.log("Document successfully deleted!");
205 updateRecords();
addRecord
175 return document.getElementById(id);
176}
177
178function addRecord(id, date, type, status, description, amount){179
180 let table = getElementById("recordTable");
181
getElementById
171 })
172}
173
174function getElementById(id){175 return document.getElementById(id);
176}
177
updateRecords
155 });
156});
157
158function updateRecords(){159 clearTable("recordTable");
160 colRecords.get().then((querySnapshot) => {
161 querySnapshot.forEach((doc) => {
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"]
function sum(a, b) {
return a + b;
}
/**
* 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;
}