Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): make_rule! macros #404

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2d55868
feat: add #[cfg_attr(feature = schemars, derive(schemars::JsonSchema)…
elcoosp Dec 1, 2024
91dd7c9
feat: write json-schema/config.json in generate_json_schema
elcoosp Dec 1, 2024
dc6b00d
docs: broken link
elcoosp Dec 1, 2024
ba0ab05
chore: fmt
elcoosp Dec 1, 2024
dfbcda2
chore: add cspell words
elcoosp Dec 1, 2024
16c7801
feat: add make_length_rule & make_rule macros to reduce boilerplate
elcoosp Dec 2, 2024
5dbe770
feat: add make_format_rule & make_options_rule
elcoosp Dec 2, 2024
13f6bde
feat: mig all rules to make_*_rule macro, sadly schemars 0.8 does not…
elcoosp Dec 2, 2024
1fecf54
feat: use schemars v1 (alpha) to get the json schema descriptions out…
elcoosp Dec 2, 2024
f7f3ad3
test: use insta to assert_yaml_snapshot on config json schema
elcoosp Dec 2, 2024
446d582
fix: lockfile
elcoosp Dec 2, 2024
b9aa496
feat: use paste to generate all rule structs doc attr, unfortunately …
elcoosp Dec 2, 2024
5c09949
docs: doc macro rules
elcoosp Dec 2, 2024
307ac78
chore: fmt
elcoosp Dec 2, 2024
a78b8fe
fix: make_length_rule & make_format_rule & make_options_rule generati…
elcoosp Dec 2, 2024
7dd7651
feat: use patched paste to support :dash modifier
elcoosp Dec 2, 2024
8ee0bf7
feat: add link to docs on all rules
elcoosp Dec 2, 2024
82c66df
chore: cspell additions
elcoosp Dec 2, 2024
e2ea4c4
Merge branch 'main' of github.com:elcoosp/commitlint-rs into feat/mak…
elcoosp Dec 3, 2024
e6473f0
fix(schema): move schema snap test to workspace member
elcoosp Dec 3, 2024
2ddc0f4
chore: fmt
elcoosp Dec 3, 2024
41ced4f
Merge pull request #1 from elcoosp/feat/make-rule-macro
elcoosp Dec 3, 2024
4bce28d
fix: double comment
elcoosp Dec 3, 2024
114ea2c
chore: cspell duplicates
elcoosp Dec 3, 2024
085543a
chore: run clippy
elcoosp Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 81 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ readme = "README.md"
repository = "https://github.com/KeisukeYamashita/commitlint-rs"
exclude = ["/web"]
edition = "2021"
[profile.dev.package]
insta.opt-level = 3
similar.opt-level = 3
5 changes: 2 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ repository.workspace = true
license.workspace = true
edition.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "commitlint"
path = "src/main.rs"

[dependencies]
paste = { git = "https://github.com/elcoosp/paste", branch = "feat/dash" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security & Maintenance Risk: Dependency on Forked Repository

Using a forked version of the paste crate introduces several risks:

  • Maintenance burden if upstream changes aren't regularly merged
  • Security concerns as the fork might miss security updates
  • Potential build issues if the fork becomes unavailable

Consider:

  1. Contributing the dash-case conversion feature upstream to the official paste crate
  2. Implementing the dash-case conversion locally if the upstream contribution isn't feasible

clap = { version = "4.5.4", features = ["derive", "env", "string"] }
futures = "0.3.30"
regex = "1.10.5"
schemars = { version = "0.8.21", optional = true }
schemars = { version = "1.0.0-alpha.16", optional = true }
serde = { version = "1.0.201", features = ["derive"] }
serde_json = "1.0.121"
serde_yaml = "0.9.34"
Expand Down
Loading
Loading