Skip to content

Commit d478ee1

Browse files
committed
feat: add template file metadata types in file.rs module
Add comprehensive template file metadata representation with: - File struct for storing template metadata (path, format, engine type) - Engine enum (Static, Tera) for template processing type detection - Format enum (Yml, Toml, Tf, Tera) for output format identification - Extension enum for supported file extensions - Robust error handling with thiserror for file parsing errors - Extensive test coverage (46 test cases) for edge cases and validation - Support for both static files and Tera templates with inner format detection This provides a standardized way to represent and validate template files without handling actual rendering or I/O operations.
1 parent c72ca6f commit d478ee1

File tree

4 files changed

+889
-0
lines changed

4 files changed

+889
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ serde = { version = "1.0", features = [ "derive" ] }
3232
serde_json = "1.0"
3333
tempfile = "3.0"
3434
tera = "1.0"
35+
thiserror = "1.0"
3536
torrust-linting = { path = "packages/linting" }

project-words.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ Tera
3838
terraformrc
3939
tfstate
4040
tfvars
41+
thiserror
4142
tlsv
4243
usermod
44+
значение
45+
ключ
46+
конфиг

0 commit comments

Comments
 (0)