Skip to content

Commit 2ebe964

Browse files
Add OpenTofu (#607)
1 parent 4d544eb commit 2ebe964

File tree

6 files changed

+117
-25
lines changed

6 files changed

+117
-25
lines changed

LANGUAGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ OCaml (ml,mli)
208208
Odin (odin)
209209
Opalang (opa)
210210
OpenQASM (qasm)
211+
OpenTofu (tofu)
211212
Org (org)
212213
Oz (oz)
213214
Pascal (pas)

SCC-OUTPUT-REPORT.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313
<tbody><tr>
1414
<th>Go</th>
1515
<th>25</th>
16-
<th>22295</th>
17-
<th>1422</th>
18-
<th>427</th>
19-
<th>20446</th>
20-
<th>1379</th>
21-
<th>431576</th>
22-
<th>6025</th>
16+
<th>22359</th>
17+
<th>1424</th>
18+
<th>429</th>
19+
<th>20506</th>
20+
<th>1388</th>
21+
<th>432954</th>
22+
<th>6044</th>
2323
</tr><tr>
2424
<td>processor/constants.go</td>
2525
<td></td>
26-
<td>12925</td>
26+
<td>12962</td>
2727
<td>1</td>
2828
<td>2</td>
29-
<td>12922</td>
29+
<td>12959</td>
3030
<td>0</td>
31-
<td>202672</td>
32-
<td>1986</td>
31+
<td>203189</td>
32+
<td>1988</td>
3333
</tr><tr>
3434
<td>processor/workers_test.go</td>
3535
<td></td>
@@ -83,13 +83,13 @@
8383
</tr><tr>
8484
<td>main.go</td>
8585
<td></td>
86-
<td>432</td>
87-
<td>10</td>
88-
<td>6</td>
89-
<td>416</td>
86+
<td>459</td>
87+
<td>12</td>
9088
<td>8</td>
91-
<td>9726</td>
92-
<td>271</td>
89+
<td>439</td>
90+
<td>17</td>
91+
<td>10587</td>
92+
<td>291</td>
9393
</tr><tr>
9494
<td>cmd/badges/main.go</td>
9595
<td></td>
@@ -274,15 +274,15 @@
274274
<tfoot><tr>
275275
<th>Total</th>
276276
<th>25</th>
277-
<th>22295</th>
278-
<th>1422</th>
279-
<th>427</th>
280-
<th>20446</th>
281-
<th>1379</th>
282-
<th>431576</th>
283-
<th>6025</th>
277+
<th>22359</th>
278+
<th>1424</th>
279+
<th>429</th>
280+
<th>20506</th>
281+
<th>1388</th>
282+
<th>432954</th>
283+
<th>6044</th>
284284
</tr>
285285
<tr>
286-
<th colspan="9">Estimated Cost to Develop (organic) $642,294<br>Estimated Schedule Effort (organic) 11.62 months<br>Estimated People Required (organic) 4.91<br></th>
286+
<th colspan="9">Estimated Cost to Develop (organic) $644,273<br>Estimated Schedule Effort (organic) 11.64 months<br>Estimated People Required (organic) 4.92<br></th>
287287
</tr></tfoot>
288288
</table></body></html>

examples/language/test.tofu

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is a comment
2+
// This is another comment
3+
4+
/* This is a
5+
multiline
6+
comment
7+
*/
8+
9+
provider "null" {}
10+
11+
locals {
12+
list = [for i, v in ["foo", "bar"] : v if v == "foo"]
13+
map = { for k, v in { "a" = "foo", "b" = "bar" } : v => k }
14+
}
15+
16+
resource "null_resource" "count" {
17+
count = 2
18+
19+
triggers = {
20+
conditional = 1 < 2 || 2 <= 3 && "a" == "c" ? "foo" : "bar"
21+
conditional2 = 1 > 2 || 2 >= 3 && "a" != "c" ? "foo" : "bar"
22+
}
23+
24+
provisioner "local-exec" {
25+
command = "echo ${join(" ", local.list)}"
26+
}
27+
}
28+
29+
resource "null_resource" "foreach" {
30+
for_each = toset(local.map)
31+
}

languages.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4649,6 +4649,28 @@
46494649
}
46504650
]
46514651
},
4652+
"OpenTofu": {
4653+
"complexitychecks": [
4654+
"count",
4655+
"for",
4656+
"for_each",
4657+
"if",
4658+
": ",
4659+
"? ",
4660+
"|| ",
4661+
"&& ",
4662+
"!= ",
4663+
"> ",
4664+
">= ",
4665+
"< ",
4666+
"<= ",
4667+
"== "
4668+
],
4669+
"extensions": ["tofu"],
4670+
"line_comment": ["#", "//"],
4671+
"multi_line": [["/*", "*/"]],
4672+
"quotes": []
4673+
},
46524674
"Org": {
46534675
"complexitychecks": [
46544676
"for ",

processor/constants.go

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ specificLanguages=(
980980
'Moonbit '
981981
'Nushell '
982982
'OpenQASM '
983+
'OpenTofu '
983984
'Pkl '
984985
'Proto '
985986
'Q# '

0 commit comments

Comments
 (0)