Prototype linter/formatter for SuperCollider code
Requirements: CMake, ANTLR 4.11+. Optional: Ninja.
To build:
mkdir build
cd build
cmake ..
cmake --build .
The GitHub actions scripts contain detailed examples of building on macOS, Linux, and Windows.
Linter features are subclasses of Detector, defined in src/lint/detectors/Detector.hpp.
- Decide on a name for your new detector. We typically name detectors after the behavior we want the user to follow,
for example,
WriteGreatCode. The option name will bewriteGreatCode, the first character is lower case. - Write tests first! Create a new directory in tests/writeGreatCode and include at least one test in it. See the comments in tests/CMakeLists.txt for details about adding tests.
- Make a copy of src/lint/detectors/ExampleDetector.hpp to your detector name, for example src/lint/detectors/WriteGreatCode.hpp.
- Resolve all the TODOs in your copy of example file.
- Add your Detector to the list of files in src/lint/CMakeLists.txt
- Add your Detector to the list of files in src/lint/DetectorList.hpp
macOS: Can install emscripten SDK or brew install emscripten.
mkdir build_em && cd build_em
emcmake cmake ..
cmake --build .