Skip to content

Latest commit

 

History

History
122 lines (97 loc) · 2.04 KB

how-it-work.md

File metadata and controls

122 lines (97 loc) · 2.04 KB

Types of processed comments

Line comment

Per each code line

/** line-comment */
const a = ...
// line-comment
if (someStament)
/**
 * line-comment
 */
state.value = ...
// TODO rename to ...  - this line is being reviewed
let a = Object()

// FIXME ...
let foo = function() {  // this function isn't, but with `block` option would be
    ...
}

Block comment

Per each code block

/** block-comment */
const someFun = () => {
   ...
}
// block-comment
type SomeType = {
   ...
}
/**
 * block-comment
 */
function someFun = () => {
  ...
}
// TODO ...  - this block is being reviewed
let foo = function() {  // this block of code is being reviewed
    ...
}

Module comment

Per each code module

import ... from ...
import ... from ...

// TODO: common module comment

/**
 * Some common description of module
 * module-comment
 */
 
/** other comment */
const A = () => ...
// #file.js  -  this module is being reviewed

// TODO ...  - this line is being reviewed
let a = Object()

// FIXME -  this block is being reviewed
let foo = function() {  // this function isn't, but with `block` option would be
    ...
}

Relevancy validating

/**                                    // comment block lastCommit: **commit1**
 * Get schedules from server
 * TODO: some subtask
 */
const getSharedDictionaries = () => {  // code block lastCommit: **commit2**
validateDiffByCommits(commit1: Commit, commit2: Commit, diff: number): boolean
validateDiffByDates(date1: Date, date2: Date, diff: number): boolean

67538-Image-889x474-Color

Validating entities

Commit

By history intermediate commits

if (validateDiffByCommits(commit1, commit2, diff)

Days (experimental)

By trivial days comparsion

if (validateDiffByDates(commit1.date, commit2.date, diff))