https://cran.r-project.org/web/packages/lintr/index.html
CRAN: Package lintr
Checks adherence to a given style, syntax errors and possible semantic issues. Supports on the fly checking of R code edited with 'RStudio IDE', 'Emacs',...
cranpackagelintr