TABLE 1.
Style guides for different programming languages
| Language | Style guide(s) | Guide URL(s) | Linter(s) | Documentation tool(s) |
|---|---|---|---|---|
| C/C++ | Google C++ Style Guide | https://google.github.io/styleguide/cppguide.html | clang-tidy, cppcheck, cpplint | Doxygen, Sphinx |
| Julia | Style Guide | https://docs.julialang.org/en/v1/manual/style-guide/ | Documenter | |
| Matlab | MATLAB Style Guidelines 2.0 | https://www.mathworks.com/matlabcentral/fileexchange/46056-matlab-style-guidelines-2-0 | mlint | Doxygen, M2HTML, Sphinx |
| Python | PEP 8 | https://www.python.org/dev/peps/pep-0008/ | black, flake8, pylint | PEP 257 |
| R | The tidyverse Style Guide, Google’s R Style Guide | https://style.tidyverse.org/, https://google.github.io/styleguide/Rguide.html | lintr, styler | docstring, roxygen2 |
| SAS | Code Diary for SAS, Doxygen | |||
| Scala | Scala Style Guide | https://docs.scala-lang.org/style/ | scalafmt, scalafix | scaladoc, Sphinx |
| Stata | Suggestions on Stata Programming Style | https://www.stata-journal.com/sjpdf.html?articlenum=pr0018 | MarkDoc |