Skip to content

Commit

Permalink
Tera support (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter authored Sep 30, 2024
1 parent 2715b69 commit 4089f8a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 14 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ TCL (tcl)
Teal (teal)
Templ (templ)
TemplateToolkit (tt,tt2)
Tera (tera)
Terraform (tf,tf.json)
TeX (tex,sty)
Textile (textile)
Expand Down
26 changes: 13 additions & 13 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>254048</th>
<th>254192</th>
<th>4067</th>
</tr><tr>
<td>processor/formatters.go</td>
Expand Down Expand Up @@ -240,16 +240,6 @@
<td>0</td>
<td>2209</td>
<td>35</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>686</td>
<td>23</td>
</tr><tr>
<td>processor/bloom.go</td>
<td></td>
Expand All @@ -260,6 +250,16 @@
<td>2</td>
<td>1062</td>
<td>29</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>686</td>
<td>23</td>
</tr><tr>
<td>processor/helpers_test.go</td>
<td></td>
Expand Down Expand Up @@ -288,7 +288,7 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>21709</td>
<td>21853</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -299,7 +299,7 @@
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>254048</th>
<th>254192</th>
<th>4067</th>
</tr>
<tr>
Expand Down
8 changes: 8 additions & 0 deletions examples/language/tera.tera
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% set map = section.pages | group_by(attribute="year") %}
{% set_global years = [] %}
{% for year, ignored in map %}
{% set_global years = years | concat(with=year) %}
{% endfor %}
{% for year in years | reverse %}
{% set posts = map[year] %}
{% endfor %}
17 changes: 17 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6201,6 +6201,23 @@
"multi_line": [["[%#", "%]"]],
"quotes": []
},
"Tera": {
"complexitychecks": [
"{% include ",
"{% macro ",
"{% block ",
"{% extends ",
"{% for ",
"{% set ",
"{% if ",
"{% elif ",
"{% else "
],
"extensions": ["tera"],
"line_comment": [],
"multi_line": [["<!--", "-->"], ["{#", "#}"]],
"quotes": []
},
"Terraform": {
"complexitychecks": [
"count",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ specificLanguages=(
'Snakemake '
'Stan '
'Teal '
'Tera '
'Templ '
'Terraform '
'TTCN-3 '
Expand Down

0 comments on commit 4089f8a

Please sign in to comment.