Limerick(4) - Linter, Formatter, Logging and Editor
Hello, everyone. Welcome to the fourth episode of FPGA limerick. In this episode, we will talk about the linter, formatter, logging and editor for SpinalHDL. However, as we all know, the concepts like linter, formatter etc. are universal. They are not only confined to SpinalHDL. So we will expand the scope to other languages when it is necessary. Linter for C/C++ Maybe we can start with a more popular language like C/C++. An often-used linter for C/C++ is clang-tidy . On Ubuntu, (which is the Linux distro we choose for WSL), it can be installed like sudo apt install clang-tidy And you can use the following to check a C/C++ source file: clang-tidy -checks=* file_name.cpp And you can use the following inline comment to ignore a certain warning, like // NOLINT(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers) Or simply just // NOLINT Formatter for C/C++ An often-used formatter for C/C++ is clang-formatter, which can be installed on Ubuntu like ...