Skip to content

Improve inject_global_rule to allow structured data#277

Merged
jeparlefrancais merged 3 commits into
mainfrom
improve-inject-global-rule
Jun 22, 2025
Merged

Improve inject_global_rule to allow structured data#277
jeparlefrancais merged 3 commits into
mainfrom
improve-inject-global-rule

Conversation

@jeparlefrancais

Copy link
Copy Markdown
Contributor

Closes #126

  • Add support for composed data-structures like arrays or objects for the value property. That means that you can now inject tables into a global value

  • Add a new property to read JSON data from an environment variable (using env_json instead of env)

  • Add a new property to provide a default value when using a undefined environment variable (default_value)

  • add entry to the changelog

- Add a new property to read JSON data from an environment variable
- Add a new property to provide a default value when using a undefined
  environment variable
@github-actions

Copy link
Copy Markdown

Coverage after merging improve-inject-global-rule into main will be

86.88%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/rules
   inject_value.rs86.73%100%93.55%86.04%180, 188, 194–205, 207–216, 218, 221–227, 233, 239–241, 74, 78–79
   mod.rs90.27%100%83.78%91.06%136–138, 157–159, 174, 195–197, 199, 245–247, 358, 398–400, 427, 434–437, 451
   rule_property.rs92.52%100%96%91.88%107, 113, 157–162, 164–167, 171–172, 38, 46, 57, 73, 91, 97

@jeparlefrancais jeparlefrancais merged commit 20e7bd5 into main Jun 22, 2025
6 checks passed
@jeparlefrancais jeparlefrancais deleted the improve-inject-global-rule branch June 22, 2025 21:55
@jeparlefrancais jeparlefrancais mentioned this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add default value for inject_global_value rule with environment variable

1 participant