Skip to content

Commit da5c4a9

Browse files
Adds pre-commit hook and bumps version for next release
1 parent 7c62937 commit da5c4a9

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

.github/workflows/precommit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pre-Commit Checks
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
pre-commit:
7+
name: Run Pre-Commit Hooks
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.13"
18+
19+
- name: Install pre-commit
20+
run: pip install pre-commit
21+
22+
- name: Run pre-commit hooks
23+
run: pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.11.2
4+
hooks:
5+
- id: ruff

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,30 @@ $ rat-king-parser -n dangerzone/* | jq
562562
]
563563
```
564564

565+
566+
567+
## Development Guide
568+
**More Verbose Guide To Be Published**
569+
570+
### Development Dependencies
571+
572+
RKP uses `pre-commit` to enforce formatting.
573+
574+
To begin development and install `pre-commit`, use the following command:
575+
576+
```bash
577+
pip install .[dev]
578+
```
579+
580+
Then, ensure you install the pre-commit hook:
581+
582+
```bash
583+
pre-commit install
584+
```
585+
565586
## Feedback, Issues, and Additions
566587

567-
If you have suggestions for improvement, bugs, feedback, or additional RAT families that use a similar configuration format as AsyncRAT, QuasarRAT, VenomRAT, DcRAT, etc. that are not yet supported, please send me a message on [Mastodon](https://infosec.exchange/@jeFF0Falltrades), [YouTube](https://www.youtube.com/c/jeff0falltrades), or submit an Issue or PR in this repo.
588+
If you have suggestions for improvement, bugs, feedback, or additional RAT families that use a similar configuration format as AsyncRAT, QuasarRAT, VenomRAT, DcRAT, etc. that are not yet supported, please send me a message on [Bluesky](https://bsky.app/profile/jeff0falltrades.bsky.social), [YouTube](https://www.youtube.com/c/jeff0falltrades), or submit an Issue or PR in this repo.
568589

569590
Also, if this tool or video tutorial was helpful to you, that's always nice to hear as well!
570591

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ classifiers = [
3636
]
3737
dynamic = [ "version" ]
3838
dependencies = [ "dnfile", "pycryptodomex", "yara-python" ]
39-
39+
optional-dependencies.dev = [ "pre-commit" ]
4040
optional-dependencies.maco = [ "maco", "validators" ]
4141
urls."Bug Reports" = "https://github.com/jeFF0Falltrades/rat_king_parser/issues"
4242
urls."Homepage" = "https://github.com/jeFF0Falltrades/rat_king_parser"
@@ -56,3 +56,6 @@ namespaces = false
5656

5757
[tool.ruff]
5858
lint.extend-select = [ "I" ]
59+
60+
[tool.pre-commit]
61+
hook-config = "file:.pre-commit-config.yaml"

src/rat_king_parser/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2424
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2525
# SOFTWARE.
26-
__version__ = "4.0.2"
26+
__version__ = "4.1.0"

0 commit comments

Comments
 (0)