Add https://pkl-lang.org/ support · boyter/scc@af51102

6 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -186,6 +186,7 @@ Perl (pl,pm)

186186

PHP (php)

187187

Picat (pi)

188188

PKGBUILD (pkgbuild)

189+

Pkl (pkl)

189190

PL/SQL (fnc,pkb,pks,prc,trg,vw)

190191

Plain Text (text,txt)

191192

Polly (polly)

Original file line numberDiff line numberDiff line change

@@ -17,7 +17,7 @@

1717

<th>465</th>

1818

<th>7810</th>

1919

<th>1593</th>

20-

<th>399951</th>

20+

<th>400883</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>1477</th>

43-

<th>356</th>

42+

<th>1492</th>

43+

<th>362</th>

4444

<th>0</th>

45-

<th>1121</th>

45+

<th>1130</th>

4646

<th>0</th>

47-

<th>59816</th>

47+

<th>60283</th>

4848

</tr><tr>

4949

<th>Python</th>

5050

<th>11</th>

@@ -56,13 +56,13 @@

5656

<th>18844</th>

5757

</tr><tr>

5858

<th>YAML</th>

59-

<th>8</th>

60-

<th>395</th>

59+

<th>9</th>

60+

<th>906</th>

6161

<th>66</th>

62-

<th>59</th>

63-

<th>270</th>

62+

<th>62</th>

63+

<th>778</th>

6464

<th>0</th>

65-

<th>12155</th>

65+

<th>18672</th>

6666

</tr><tr>

6767

<th>CSS</th>

6868

<th>5</th>

@@ -107,7 +107,7 @@

107107

<th>92</th>

108108

<th>928</th>

109109

<th>106</th>

110-

<th>41870</th>

110+

<th>41877</th>

111111

</tr><tr>

112112

<th>C#</th>

113113

<th>2</th>

@@ -125,7 +125,25 @@

125125

<th>0</th>

126126

<th>12</th>

127127

<th>0</th>

128-

<th>322</th>

128+

<th>268</th>

129+

</tr><tr>

130+

<th>HTML</th>

131+

<th>2</th>

132+

<th>1540</th>

133+

<th>0</th>

134+

<th>0</th>

135+

<th>1540</th>

136+

<th>0</th>

137+

<th>22334</th>

138+

</tr><tr>

139+

<th>JSON</th>

140+

<th>2</th>

141+

<th>8877</th>

142+

<th>8</th>

143+

<th>0</th>

144+

<th>8869</th>

145+

<th>0</th>

146+

<th>136751</th>

129147

</tr><tr>

130148

<th>JavaServer Pages</th>

131149

<th>2</th>

@@ -270,6 +288,15 @@

270288

<th>3</th>

271289

<th>0</th>

272290

<th>76</th>

291+

</tr><tr>

292+

<th>CSV</th>

293+

<th>1</th>

294+

<th>84</th>

295+

<th>0</th>

296+

<th>0</th>

297+

<th>84</th>

298+

<th>0</th>

299+

<th>2224</th>

273300

</tr><tr>

274301

<th>Cairo</th>

275302

<th>1</th>

@@ -468,15 +495,6 @@

468495

<th>10</th>

469496

<th>0</th>

470497

<th>245</th>

471-

</tr><tr>

472-

<th>HTML</th>

473-

<th>1</th>

474-

<th>770</th>

475-

<th>0</th>

476-

<th>0</th>

477-

<th>770</th>

478-

<th>0</th>

479-

<th>11166</th>

480498

</tr><tr>

481499

<th>Hare</th>

482500

<th>1</th>

@@ -495,15 +513,6 @@

495513

<th>7</th>

496514

<th>0</th>

497515

<th>226</th>

498-

</tr><tr>

499-

<th>JSON</th>

500-

<th>1</th>

501-

<th>8831</th>

502-

<th>8</th>

503-

<th>0</th>

504-

<th>8823</th>

505-

<th>0</th>

506-

<th>123714</th>

507516

</tr><tr>

508517

<th>Korn Shell</th>

509518

<th>1</th>

@@ -585,6 +594,15 @@

585594

<th>1</th>

586595

<th>0</th>

587596

<th>43</th>

597+

</tr><tr>

598+

<th>Pkl</th>

599+

<th>1</th>

600+

<th>39</th>

601+

<th>7</th>

602+

<th>21</th>

603+

<th>11</th>

604+

<th>0</th>

605+

<th>1340</th>

588606

</tr><tr>

589607

<th>Q#</th>

590608

<th>1</th>

@@ -621,6 +639,15 @@

621639

<th>0</th>

622640

<th>0</th>

623641

<th>0</th>

642+

</tr><tr>

643+

<th>SQL</th>

644+

<th>1</th>

645+

<th>225</th>

646+

<th>0</th>

647+

<th>0</th>

648+

<th>225</th>

649+

<th>0</th>

650+

<th>26445</th>

624651

</tr><tr>

625652

<th>Sieve</th>

626653

<th>1</th>

@@ -759,12 +786,12 @@

759786

</tr></tbody>

760787

<tfoot><tr>

761788

<th>Total</th>

762-

<th>205</th>

763-

<th>93868</th>

764-

<th>4597</th>

765-

<th>5836</th>

766-

<th>83435</th>

789+

<th>211</th>

790+

<th>95558</th>

791+

<th>4610</th>

792+

<th>5860</th>

793+

<th>85088</th>

767794

<th>2958</th>

768-

<th>3128940</th>

795+

<th>3191023</th>

769796

</tr></tfoot>

770797

</table></body></html>

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,39 @@

1+

// ===----------------------------------------------------------------------===//

2+

// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.

3+

//

4+

// Licensed under the Apache License, Version 2.0 (the "License");

5+

// you may not use this file except in compliance with the License.

6+

// You may obtain a copy of the License at

7+

//

8+

// https://www.apache.org/licenses/LICENSE-2.0

9+

//

10+

// Unless required by applicable law or agreed to in writing, software

11+

// distributed under the License is distributed on an "AS IS" BASIS,

12+

// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

13+

// See the License for the specific language governing permissions and

14+

// limitations under the License.

15+

// ===----------------------------------------------------------------------===//

16+

@go.Package { name = "github.com/apple/pkl-go-examples/gen/redisconfig" }

17+

module org.pkl.golang.example.RedisConfig

18+
19+

import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"

20+
21+

class Auth {

22+

/// Basic HTTP authorization username

23+

username: String

24+
25+

/// Basic HTTP authorization password

26+

password: String

27+

}

28+
29+

/// Whether Redis connections are enabled or not.

30+

enabled: Boolean

31+
32+

/// The hostname that Redis listens on

33+

host: String

34+
35+

/// The port that Redis listens on

36+

port: UInt16

37+
38+

/// Authorization settings for Redis

39+

auth: Auth?

Original file line numberDiff line numberDiff line change

@@ -5258,6 +5258,51 @@

52585258

"multi_line": [],

52595259

"quotes": []

52605260

},

5261+

"Pkl": {

5262+

"complexitychecks": [

5263+

"function ",

5264+

"?? ",

5265+

"?.",

5266+

"ifNonNull(",

5267+

"if ",

5268+

" else ",

5269+

".map",

5270+

"for ",

5271+

"when ",

5272+

"..."

5273+

],

5274+

"extensions": [

5275+

"pkl"

5276+

],

5277+

"line_comment": [

5278+

"//"

5279+

],

5280+

"multi_line": [

5281+

[

5282+

"/*",

5283+

"*/"

5284+

]

5285+

],

5286+

"quotes": [

5287+

{

5288+

"end": "\"",

5289+

"start": "\""

5290+

},

5291+

{

5292+

"end": "#\"",

5293+

"start": "\"#"

5294+

},

5295+

{

5296+

"end": "##\"",

5297+

"start": "\"##"

5298+

},

5299+

{

5300+

"end": "\"\"\"",

5301+

"ignoreEscape": true,

5302+

"start": "\"\"\""

5303+

}

5304+

]

5305+

},

52615306

"PL/SQL": {

52625307

"complexitychecks": [

52635308

"and ",

Original file line numberDiff line numberDiff line change

@@ -883,7 +883,7 @@ else

883883

fi

884884
885885

# Try out specific languages

886-

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 ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL ' 'INI ' 'Hare ' 'Templ ' 'Cuda ' 'GraphQL ' 'Bicep '

886+

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 ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL ' 'INI ' 'Hare ' 'Templ ' 'Cuda ' 'GraphQL ' 'Bicep ' 'Pkl '

887887

do

888888

if ./scc "examples/language/" | grep -q "$i "; then

889889

echo -e "${GREEN}PASSED $i Language Check"