- Run pre-commit checks
- 267 Installs
This extension is allowed to:
- Read & Write Files
- Launch Subprocesses
pre-commit provides integration with pre-commit, for automatically linting / formatting your code.
This extension is not officially affiliated with or endorsed by the pre-commit project itself.
pre-commit must be installed on your system:
pip install pre-commit
To run pre-commit manually on one or more files:
- Select the Editor → pre-commit menu item; or
- Open the command palette and type
To configure global preferences, open Extensions → Extension Library... then select pre-commit's Preferences tab.
You can also configure preferences on a per-project basis in Project → Project Settings...
Pre-commit can run automatically on save (for files with pre-commit config enabled). This is disabled by default, but can be enabled in preferences. If enabled, pre-commit will only run on files in a repo with a pre-commit config.
Use relative paths, fixing some configuration detection, e.g.
BSD 3-Clause License
Copyright (c) 2020, Min RK All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.