Skip to content

Commit 51c65c5

Browse files
committed
add nushell for #304
1 parent d0f5674 commit 51c65c5

File tree

6 files changed

+81
-17
lines changed

6 files changed

+81
-17
lines changed

LANGUAGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ MUMPS (mps)
151151
Mustache (mustache)
152152
Nim (nim)
153153
Nix (nix)
154+
Nushell (nu)
154155
nuspec (nuspec)
155156
Objective C (m)
156157
Objective C++ (mm)

SCC-OUTPUT-REPORT.html

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<th>421</th>
1818
<th>7033</th>
1919
<th>1416</th>
20-
<th>349702</th>
20+
<th>350282</th>
2121
</tr><tr>
2222
<th>Java</th>
2323
<th>24</th>
@@ -39,12 +39,12 @@
3939
</tr><tr>
4040
<th>Markdown</th>
4141
<th>11</th>
42-
<th>1338</th>
42+
<th>1339</th>
4343
<th>319</th>
4444
<th>0</th>
45-
<th>1019</th>
45+
<th>1020</th>
4646
<th>0</th>
47-
<th>54198</th>
47+
<th>54211</th>
4848
</tr><tr>
4949
<th>Python</th>
5050
<th>10</th>
@@ -98,7 +98,7 @@
9898
<th>85</th>
9999
<th>855</th>
100100
<th>95</th>
101-
<th>38992</th>
101+
<th>39003</th>
102102
</tr><tr>
103103
<th>C#</th>
104104
<th>2</th>
@@ -381,12 +381,12 @@
381381
</tr><tr>
382382
<th>JSON</th>
383383
<th>1</th>
384-
<th>7372</th>
384+
<th>7404</th>
385385
<th>0</th>
386386
<th>0</th>
387-
<th>7372</th>
387+
<th>7404</th>
388388
<th>0</th>
389-
<th>102679</th>
389+
<th>103115</th>
390390
</tr><tr>
391391
<th>Korn Shell</th>
392392
<th>1</th>
@@ -432,6 +432,15 @@
432432
<th>62</th>
433433
<th>12</th>
434434
<th>1764</th>
435+
</tr><tr>
436+
<th>Nushell</th>
437+
<th>1</th>
438+
<th>22</th>
439+
<th>2</th>
440+
<th>2</th>
441+
<th>18</th>
442+
<th>2</th>
443+
<th>514</th>
435444
</tr><tr>
436445
<th>Perl</th>
437446
<th>1</th>
@@ -579,12 +588,12 @@
579588
</tr></tbody>
580589
<tfoot><tr>
581590
<th>Total</th>
582-
<th>172</th>
583-
<th>26395</th>
584-
<th>3001</th>
585-
<th>1748</th>
586-
<th>21646</th>
587-
<th>2363</th>
588-
<th>1799304</th>
591+
<th>173</th>
592+
<th>26450</th>
593+
<th>3003</th>
594+
<th>1750</th>
595+
<th>21697</th>
596+
<th>2365</th>
597+
<th>1800858</th>
589598
</tr></tfoot>
590599
</table></body></html>

examples/language/docker.nu

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# docker wrapper that returns a nushell table
2+
def docker [
3+
...args:string # command to be passed to the real docker command
4+
] {
5+
let data = (^docker $args --format={{json .}}|lines|each {$it|from json})
6+
if Labels in ($data|get) {
7+
$data|docker labels
8+
} {
9+
$data
10+
}
11+
12+
}
13+
14+
# subcommand used to reformat docker labels into their own table
15+
def 'docker labels' [] {
16+
update Labels {
17+
get Labels|
18+
split row ','|
19+
where ($it|str starts-with ' ') == $false|
20+
split column '=' name value
21+
}
22+
}

languages.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5652,6 +5652,38 @@
56525652
"sh"
56535653
]
56545654
},
5655+
"Nushell": {
5656+
"complexitychecks": [
5657+
"for ",
5658+
"do { ",
5659+
"each {",
5660+
"if ",
5661+
"|| ",
5662+
"&& ",
5663+
"!= ",
5664+
"== "
5665+
],
5666+
"extensions": [
5667+
"nu"
5668+
],
5669+
"line_comment": [
5670+
"#"
5671+
],
5672+
"multi_line": [],
5673+
"quotes": [
5674+
{
5675+
"end": "\"",
5676+
"start": "\""
5677+
},
5678+
{
5679+
"end": "'",
5680+
"start": "'"
5681+
}
5682+
],
5683+
"shebangs": [
5684+
"nu"
5685+
]
5686+
},
56555687
"Smarty Template": {
56565688
"complexitychecks": [
56575689
"for ",

processor/constants.go

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

test-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ else
836836
fi
837837

838838
# Try out specific languages
839-
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM '
839+
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell '
840840
do
841841
if ./scc "examples/language/" | grep -q "$i "; then
842842
echo -e "${GREEN}PASSED $i Language Check"

0 commit comments

Comments
 (0)