Commit Checklist Extension for Visual Studio Code
Overview
The Commit Checklist extension for Visual Studio Code helps developers maintain production-ready code by enforcing a customizable checklist that must be reviewed during each commit. This ensures that best practices are consistently followed, reducing the number of revisions and potential bugs introduced into the codebase.
Features
- Customizable Checklists: Define global or project-specific checklists tailored to your team's needs.
- Pre-Commit Verification: Review and complete the checklist before committing changes.
- User-Friendly Interface: An intuitive webview within VS Code for easy interaction.
- Integration with Git: Seamlessly integrates with Git commands to enhance your existing workflow.
- Status Bar Access: Quick access to the checklist via Key binds or Command Palette in VS Code.
Installation
From Visual Studio Marketplace
- Open Visual Studio Code.
- Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).
- Search for "Commit Checklist".
- Click Install on the extension named "Commit Checklist" by [Your Publisher Name].
- Reload VS Code if prompted.
Usage
Accessing the Commit Checklist
- Via Key Bind: Ctrl + Shift + C to open the commit checklist and commit changes
- Via Command Palette:
- Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
- Type "Commit with Checklist" and select the command.
Completing the Checklist
- Open the Checklist.
- Answer pre-questions for each section.
- Complete all checklist items in applicable sections.
- Click "Submit" when finished.
Committing Changes
- Use the "Commit" button in the extension (if available).
- Or use VS Code's built-in Git features after completing the checklist.
Configuration
Setting Up a Global Checklist
- Open the Command Palette.
- Run "Set Global Commit Checklist" command.
- Provide the path to your JSON checklist file.
Project-Specific Checklist
Create a commit-checklist.json
file in your project root.
[
{
"title": "Section Title",
"preQuestion": "Is this section applicable?",
"required": false,
"items": [
{
"question": "First item to check",
"subItems": [
{
"question": "Sub-item to check"
}
]
},
{
"question": "Second item to check"
}
]
}
]
Extension Settings
commitChecklist.jsonFilePath
: Path to the global commit checklist JSON file.
Keybindings
- Commit with Checklist:
Ctrl+Shift+C
(Cmd+Shift+C on macOS)
Development
Running Locally
- Clone the repository:
git clone https://github.com/kendzisah/commit-checklist.git
- Install dependencies:
cd commit-checklist
npm install
- Open in VS Code:
code .
- Press F5 to start the Extension Development Host.
Building the Extension
- Compile TypeScript:
npm run compile
- Package the extension:
vsce package
License
This project is licensed under the GNU General Public License v3.0 (GPLv3):
Copyright (C) 2024 Ken Dzisah
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Contributing
Contributions are welcome! To contribute:
Fork the Repository on GitHub.
Create a New Branch for your feature or bug fix:
git checkout -b feature/your-feature-name
Make Your Changes and Commit:
git commit -m "Description of your changes"
Push to Your Fork:
git push origin feature/your-feature-name
Submit a Pull Request on GitHub.
Support
If you need assistance or have questions about using the extension, you can:
- Open an issue on GitHub.
- Contact Me: dzisahken10@gmail.com