The central database of all the rules available in carpet and it's extensions.
This project uses a custom parser to read and process the rules from java files themselves.
If you want to add your extension to the database,
please add your extension to data/repos.toml and submit a pull request.
NOTE: If different branches use different settings file, please don't put them all inside "settingsFile" property. Duplicate the object and change branch and settings file path.
If your extension uses the new language file translation carpet rules:
If you use json files:
use `translations-json`
If you use yaml/yml files:
use `translations-yaml`
Otherwise
Contact me
Otherwise:
Use `legacy`
For now please only include english lang file. Other languages will be added later.
The schema for rule follows:
# In the below comments, GH => https://github.com
[[parser-version]]
# Display name for your extension
name = "Name"
# Repository for the extension
# GH/owner/repo
# ^^^^^^^^^^
owner-repo = "owner/repo"
# Path to the settings file containing @Rule annotated fields
# GH/owner/repo/main/src/main/java/path/to/SettingsFile.java
# ^^^^^^^^^^^^^^^^^^^^^^^^^
settings-file-paths = [ "path/to/SettingsFile.java" ]
# Path to the language file
# GH/owner/repo/main/src/main/resources/assets/path/to/lang/en_us.yml
# ^^^^^^^^^^^^^^^^^^^^^^
lang-file-path = "path/to/lang/en_us.yml"
# Root where carpet rules are contained.
# ONLY REQUIRED IF YOU USE YAML
rules-root = "name.some-subroot.some-root.root"
# Branches that share the settings file paths and lang files
branches = [ "main" ]Please make an issue or contact me over on discord to discuss your ideas before submitting a pull request.
Once you are good to go, follow the steps below to submit a pull request.
- Fork/Clone the repo
- Change your directory to the local copy
- Run
npm install yarnif you dont have yarn already - Run
yarn installto install js packages and tailwindcss - Run
yarn serveto start python http local server on port 8000 - Run
yarn startto start tailwind with watch flag if you are working on css related things - Add your modifications to the repo
- Run
yarn buildto build the css
- Run
npm install yarnif you dont have yarn already - Run
pip install -r requirements.txtto install httpx - Run
yarn serveto start python http local server on port 8000 - Follow the instructions in generator/main.py to do local testing
- Add your modifications to the repo
Once you are finished, push the changes and make a PR
Discord: Crec0#0420