Following pull request PR-6262, we integrated a linting workflow to our continuous integration.
Waiting we update the
Utilities/SetupForDevelopment.sh to automatically install the requirements, the linting could be performed locally following these steps:
pip install pre-commit
pre-commit run --all-files
And to install the tool within the Slicer environment:
./Slicer-Release/python-install/bin/PythonSlicer -m pip install pre_commit
and to perform the check:
../Slicer-Release/python-install/bin/PythonSlicer -m pre_commit run --all-files
Thank you @jcfr, this is very useful. I’ve tried to execute this on Windows and I got two errors:
- The script complained that
DLLs folder is missing.
- In Slicer install tree:
- In Slicer build tree:
I created an empty folder at the not found location and restarted the script and it seemed to solve this issue.
pythonw.exe not found
pythonw.exe and it seemed to solve this issue.
@jcfr do you know what may require this folder and file? Should we add them to the build tree or add a module to the Sandbox (DebuggingTools or DeveloperToolsForExtensions) extension that can create these folders, install the pre-commit package, and run the checks on a single click?