Skip to content

Commit

Permalink
doc: slightly tweak the git-cliff configuration
Browse files Browse the repository at this point in the history
Simplify a few settings in `git-cliff`, but most importantly escape the
commit messages as they can contain some characters that can be
misinterpreted as HTML tags.
  • Loading branch information
dnaka91 committed Nov 2, 2023
1 parent 5d430be commit d7dc280
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
47 changes: 36 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ All notable changes to this project will be documented in this file.
- Implement encoding in the Rust codegen ([2787b51](https://github.com/dnaka91/stef/commit/2787b51c04803311bf5ca3160b37e7db31d5a8ea))
- Simplify encoding logic ([e8205bc](https://github.com/dnaka91/stef/commit/e8205bcb6749fce6dd1f56ede38128076820bffd))
- Implement basic decoding logic ([f67c572](https://github.com/dnaka91/stef/commit/f67c57220ac2c57961bf54f7f47bca467d3fb20b))
- Skip any decoding for unit structs/variants ([8f5a4ec](https://github.com/dnaka91/stef/commit/8f5a4ec3cd7377ac2f0eb7183c201fbf388d9ce2))
- Skip any decoding for unit structs/variants ([8f5a4ec](https://github.com/dnaka91/stef/commit/8f5a4ec3cd7377ac2f0eb7183c201fbf388d9ce2))
- Create playground crate and fix issues ([b55862f](https://github.com/dnaka91/stef/commit/b55862f3dafe8276faad9309cebff2cdcaec8ea3))
- Extend syntax highlighting ([0d83290](https://github.com/dnaka91/stef/commit/0d83290e1367edc1a8f9c7686bb2032067c177fa))
- Adjust encoding of option<T> ([39c6ccb](https://github.com/dnaka91/stef/commit/39c6ccba84c71688346ce9cd33bc2530ee0a746c))
- Unroll container type en-/decoding ([3d64436](https://github.com/dnaka91/stef/commit/3d64436501d5e395ba27e9acc51bd82aa312a8d8))
- Adjust encoding of option&lt;T&gt; ([39c6ccb](https://github.com/dnaka91/stef/commit/39c6ccba84c71688346ce9cd33bc2530ee0a746c))
- Unroll container type en-&#x2F;decoding ([3d64436](https://github.com/dnaka91/stef/commit/3d64436501d5e395ba27e9acc51bd82aa312a8d8))
> Instead of relying on generic implementations for the Rust generated
> code that en- or decodes the data, these are defined as closures.
>
Expand Down Expand Up @@ -59,7 +59,7 @@ All notable changes to this project will be documented in this file.
- Add snapshot tests for compiler errors ([0efc118](https://github.com/dnaka91/stef/commit/0efc118308a3e79ec1edddb833328c80182ea8cb))
> Verify good compiler error output by creating several snapshot tests.
> Also, slightly improve some of the messages.
- En-/decode non-zero integers directly ([f165d61](https://github.com/dnaka91/stef/commit/f165d618e91a70ab805a9f23f1139177150db4f4))
- En-&#x2F;decode non-zero integers directly ([f165d61](https://github.com/dnaka91/stef/commit/f165d618e91a70ab805a9f23f1139177150db4f4))
> Instead of driving the encoding and decoding of non-zero integer types
> through the Encode/Decode trait, use direct function calls which allows
> for specialized calls with better performance.
Expand All @@ -70,16 +70,27 @@ All notable changes to this project will be documented in this file.
> Check that all external types defined in any struct or enum definition
> exist within the bounds of the schema and give nice error messages in
> case a type can't be located.
- Resolve external schema imports ([62feaa0](https://github.com/dnaka91/stef/commit/62feaa08edeec63dbbf8e988b7508039c1f023ce))
> Implement the resolution of structs and enums that come from an external
> schemas, being used in the local schema file.
>
> Probably many edge cases can cause an error, dependency cycles for
> example. Also, error types are a bit of a mess and will be improved in
> coming commits.
- Improve error reporting for cross-schema errors ([c380ace](https://github.com/dnaka91/stef/commit/c380ace56af634c8e878a5c60b2b0ab2e0e1dd72))
> Type resolution that goes across a single file now shows code snippets
> for both the use side and declaration side to better pinpoint the
> problem.
### 🐛 Bug Fixes

- Don't double wrap optional types in decode ([a6d3d4b](https://github.com/dnaka91/stef/commit/a6d3d4bde28d28acb0afba123949ed7e5cbfeb98))
- Don&#x27;t double wrap optional types in decode ([a6d3d4b](https://github.com/dnaka91/stef/commit/a6d3d4bde28d28acb0afba123949ed7e5cbfeb98))
- Extend playground and correct issues ([ed24491](https://github.com/dnaka91/stef/commit/ed24491a8361574bb295d34aad6fc70ed408777b))
- Missing semicolon in tuple structs ([d616e92](https://github.com/dnaka91/stef/commit/d616e92414072a396e448f7b8cd39607b69fbbbe))
- Adjust for new clippy lints ([8855572](https://github.com/dnaka91/stef/commit/88555726ef9e9dd38ddc907a8fb6dbfd4884040f))
- Compile more schemas and fix errors ([ba90911](https://github.com/dnaka91/stef/commit/ba9091181ca93c8e94cf6638d5d23705f725c14a))
- Create specialized encoding for non-zero types ([39420b8](https://github.com/dnaka91/stef/commit/39420b80ef0a985f96ab77f42abd9dec508f4621))
- Supress warning about dereference operator ([21b2f69](https://github.com/dnaka91/stef/commit/21b2f6996254ed945af4ff5acc249870785b7f68))
- Suppress warning about dereference operator ([21b2f69](https://github.com/dnaka91/stef/commit/21b2f6996254ed945af4ff5acc249870785b7f68))
- Correctly check aliases and imports unique identifiers ([9c88e32](https://github.com/dnaka91/stef/commit/9c88e3291a169bb237e726e099468fd14f5766c5))
> Aliases couldn't be checked to a non-optimal struct format in its first
> version and imports were skipped when then don't have a final type
Expand All @@ -96,10 +107,18 @@ All notable changes to this project will be documented in this file.
> Outline a few ideas that would be great to have in the future, but
> require a significant amount of work. Therefore, these have no time
> frame attached to them.
- Update changelog and improve change items ([fa01844](https://github.com/dnaka91/stef/commit/fa01844e6a708f704ac3dc7774e7ffa2932facec))
> Re-generate the changelog and in addition, tweak the configuration for
> changelog generation for a better formatted output and fix the commit
> links as well.
- Adjust git-cliff config for latest version ([7d58f6b](https://github.com/dnaka91/stef/commit/7d58f6b961e6616a8b97a9ae24cff1dcd1ad7ea1))
> The latest v1.4.0 of `git-cliff` changes the tag_pattern setting from a
> glob pattern to a RegEx pattern. Therefore, the current setting needs
> slight tweaking.
### ⚡ Performance

- Extend the benchmark for better resolving checks ([1b7f52a](https://github.com/dnaka91/stef/commit/1b7f52a7b87579f8f48043ff69e278737d15bfea))
- Extend the benchmark for better resolving checks ([2074449](https://github.com/dnaka91/stef/commit/207444976b11533fbbce0d958a39472b34f3eebb))
> The current schema generated for benchmarks on large schemas didn't
> generate any definitions that use type references. Therefore, the
> benchmark didn't give good insight on type resolution timing.
Expand Down Expand Up @@ -127,10 +146,13 @@ All notable changes to this project will be documented in this file.
- Simplify transformation of name elements ([2acd7b7](https://github.com/dnaka91/stef/commit/2acd7b740859d2c0ea713b9fa20789e653c75013))
> Instead of manually constructing the `Name` instances, use the From/Into
> traits to do so automatically and with less code.
- Simplify compiler checking logic ([b77cfa2](https://github.com/dnaka91/stef/commit/b77cfa2c8c923791356b760ad6ccc9455f2cc756))
> Mostly replacing `Result<(), E>` with `Option<E>` to avoid several
> conversions into the `Result` type, An `Option` is simpler because all
> the checks never produce any value besides a possible error.
- Add schema as snapshot description ([137d2cd](https://github.com/dnaka91/stef/commit/137d2cdcab8f73172ee1214d91ca2c12c50b04ed))
> Include the source schema into snapshots for easier verification as this
> displays the schema together with the output of each snapshot in review
> mode.
- Reorganize the stef-compiler crate ([5d430be](https://github.com/dnaka91/stef/commit/5d430bed3d153cedba0d07015b2ec7e352262f0f))
> Shift several components around for better structure, expose all the
> possible errors on the API and document any publicly visible types.
### 🧪 Testing

Expand All @@ -142,5 +164,8 @@ All notable changes to this project will be documented in this file.
- Initial commit ([5eb2f2b](https://github.com/dnaka91/stef/commit/5eb2f2b9687146363974ea645de22a8441e890a1))
- Update checkout action to v4 ([4d753d8](https://github.com/dnaka91/stef/commit/4d753d8b30ef3ee7d7e463fb2e7f594aee86d8e7))
- Minor code cleanup of unused code ([a624300](https://github.com/dnaka91/stef/commit/a6243007663ddcf1d4a9da09c9b4b6514dab0db6))
- Correct several typos ([c74b3a7](https://github.com/dnaka91/stef/commit/c74b3a7aadbb4abd7da5e6e7d8901ebc103f5ccc))
> Correct some spelling mistakes and configure the `typos` tool for a few
> false-positives.
<!-- generated by git-cliff -->
11 changes: 4 additions & 7 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ body = """
- {% if commit.breaking %}[**breaking**] {% endif -%}
{% if commit.scope %}_{{ commit.scope }}_: {% endif -%}
{{ commit.message | upper_first }} ([{{ id }}]({{ url }}))
{{ commit.message | escape | upper_first }} ([{{ id }}]({{ url }}))
{%- if commit.body %}
{{ commit.body | indent(prefix=" > ", first=true, blank=true) }}
{%- endif -%}
{% endmacro -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") -%}
{{ self::commit(commit=commit) }}
Expand All @@ -60,7 +60,6 @@ footer = """
# postprocessors
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/dnaka91/stef" }, # replace repository URL
{ pattern = '<!-- \d+ -->', replace = "" },
]

[git]
Expand All @@ -73,6 +72,7 @@ split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" }, # replace issue numbers
{ pattern = ".*", replace_command = "typos --write-changes -" }, # fix commit message typos
]
# regex for parsing and grouping commits
commit_parsers = [
Expand All @@ -84,10 +84,7 @@ commit_parsers = [
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = '^chore\(release\): [pP]repare for', skip = true },
{ message = '^chore\(deps\)', skip = true },
{ message = '^chore\(pr\)', skip = true },
{ message = '^chore\(pull\)', skip = true },
{ message = '^chore\(fmt\)', skip = true },
{ message = '^chore\((deps|pr|pull|fmt)\)', skip = true },
{ message = "^chore|ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
Expand Down

0 comments on commit d7dc280

Please sign in to comment.