Skip to content

Commit

Permalink
Merge branch 'boyter:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoupert authored Feb 1, 2024
2 parents ca41616 + 43dee65 commit 9417e74
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 36 deletions.
2 changes: 2 additions & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ BASH (bash,bash_login,bash_logout,bash_profile,bashrc,.bash_login,.bash_logout,.
Basic (bas)
Batch (bat,btm,cmd)
Bazel (bzl,build.bazel,build,workspace)
Bicep (bicep)
Bitbake (bb,bbappend,bbclass)
Bitbucket Pipeline (bitbucket-pipelines.yml)
Blade template (blade.php)
Expand Down Expand Up @@ -175,6 +176,7 @@ nuspec (nuspec)
Objective C (m)
Objective C++ (mm)
OCaml (ml,mli)
Odin (odin)
Opalang (opa)
Org (org)
Oz (oz)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ If you don't like sloc cloc and code feel free to use the name `Succinct Code Co

Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).

### Support

Using `scc` commercially? If you want priority support for `scc` you can purchase a years worth https://boyter.gumroad.com/l/kgenuv which entitles you to priority direct email support from the developer.

### Install

#### Go Get
Expand Down
75 changes: 42 additions & 33 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th>465</th>
<th>7810</th>
<th>1593</th>
<th>398707</th>
<th>400035</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand All @@ -39,12 +39,12 @@
</tr><tr>
<th>Markdown</th>
<th>11</th>
<th>1475</th>
<th>1477</th>
<th>356</th>
<th>0</th>
<th>1119</th>
<th>1121</th>
<th>0</th>
<th>59790</th>
<th>59816</th>
</tr><tr>
<th>Python</th>
<th>11</th>
Expand All @@ -56,13 +56,13 @@
<th>18844</th>
</tr><tr>
<th>YAML</th>
<th>7</th>
<th>297</th>
<th>53</th>
<th>31</th>
<th>213</th>
<th>8</th>
<th>395</th>
<th>66</th>
<th>59</th>
<th>270</th>
<th>0</th>
<th>8470</th>
<th>12155</th>
</tr><tr>
<th>CSS</th>
<th>5</th>
Expand Down Expand Up @@ -107,7 +107,7 @@
<th>92</th>
<th>928</th>
<th>106</th>
<th>41861</th>
<th>41870</th>
</tr><tr>
<th>C#</th>
<th>2</th>
Expand All @@ -117,6 +117,15 @@
<th>410</th>
<th>45</th>
<th>19739</th>
</tr><tr>
<th>Dockerfile</th>
<th>2</th>
<th>15</th>
<th>3</th>
<th>0</th>
<th>12</th>
<th>0</th>
<th>322</th>
</tr><tr>
<th>JavaServer Pages</th>
<th>2</th>
Expand Down Expand Up @@ -189,6 +198,15 @@
<th>1</th>
<th>0</th>
<th>11</th>
</tr><tr>
<th>Bicep</th>
<th>1</th>
<th>19</th>
<th>1</th>
<th>5</th>
<th>13</th>
<th>1</th>
<th>410</th>
</tr><tr>
<th>Bitbucket Pipeline</th>
<th>1</th>
Expand Down Expand Up @@ -333,15 +351,6 @@
<th>2</th>
<th>0</th>
<th>45</th>
</tr><tr>
<th>Dockerfile</th>
<th>1</th>
<th>1</th>
<th>0</th>
<th>0</th>
<th>1</th>
<th>0</th>
<th>20</th>
</tr><tr>
<th>Elm</th>
<th>1</th>
Expand Down Expand Up @@ -462,12 +471,12 @@
</tr><tr>
<th>HTML</th>
<th>1</th>
<th>752</th>
<th>770</th>
<th>0</th>
<th>0</th>
<th>752</th>
<th>770</th>
<th>0</th>
<th>10896</th>
<th>11166</th>
</tr><tr>
<th>Hare</th>
<th>1</th>
Expand All @@ -489,12 +498,12 @@
</tr><tr>
<th>JSON</th>
<th>1</th>
<th>8757</th>
<th>8830</th>
<th>8</th>
<th>0</th>
<th>8749</th>
<th>8822</th>
<th>0</th>
<th>122733</th>
<th>123728</th>
</tr><tr>
<th>Korn Shell</th>
<th>1</th>
Expand Down Expand Up @@ -750,12 +759,12 @@
</tr></tbody>
<tfoot><tr>
<th>Total</th>
<th>202</th>
<th>93612</th>
<th>4573</th>
<th>5803</th>
<th>83236</th>
<th>2954</th>
<th>3121285</th>
<th>205</th>
<th>93836</th>
<th>4590</th>
<th>5836</th>
<th>83410</th>
<th>2955</th>
<th>3128310</th>
</tr></tfoot>
</table></body></html>
50 changes: 50 additions & 0 deletions examples/language/bicep.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
this is a multi
line comment
*/
param rgLocation string = resourceGroup().location
param storageNames array = [
'contoso'
'fabrikam'
]

// this is a comment
resource createStorages 'Microsoft.Storage/storageAccounts@2022-09-01' = [for name in storageNames: {
name: '${name}str${uniqueString(resourceGroup().id)}'
location: rgLocation
sku: {
name: 'Standard_LRS'
}
kind: '''StorageV2'''
}]

param storageAccountName string
param location string = resourceGroup().location

@allowed([
'new'
'existing'
])
param newOrExisting string = 'new'

resource saNew 'Microsoft.Storage/storageAccounts@2022-09-01' = if (newOrExisting == 'new') {
name: storageAccountName
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}

resource saExisting 'Microsoft.Storage/storageAccounts@2022-09-01' existing = if (newOrExisting == 'existing') {
name: storageAccountName
}

output storageAccountId string = ((newOrExisting == 'new') ? saNew.id : saExisting.id)

param deployZone bool

resource dnsZone 'Microsoft.Network/dnszones@2018-05-01' = if (deployZone) {
name: 'myZone'
location: 'global'
}
69 changes: 69 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,41 @@
}
]
},
"Bicep": {
"complexitychecks": [
"@minLength(",
"@maxLength(",
"@secure(",
"[for ",
"if(",
"if (",
" == ",
" != ",
" ? ",
"using ",
"range(",
"type ",
"func "
],
"extensions": [
"bicep"
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"*/"
]
],
"quotes": [
{
"end": "'",
"start": "'"
}
]
},
"Bitbake": {
"complexitychecks": [
"for ",
Expand Down Expand Up @@ -8753,5 +8788,39 @@
"start": "\""
}
]
},
"Odin": {
"complexitychecks": [
"for ",
"for(",
"if ",
"if(",
"when ",
"switch ",
"defer ",
"else ",
"|| ",
"&& ",
"!= ",
"== "
],
"extensions": [
"odin"
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"*/"
]
],
"quotes": [
{
"end": "\"",
"start": "\""
}
]
}
}
4 changes: 2 additions & 2 deletions processor/constants.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ else
fi

# Try out specific languages
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 '
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 '
do
if ./scc "examples/language/" | grep -q "$i "; then
echo -e "${GREEN}PASSED $i Language Check"
Expand Down

0 comments on commit 9417e74

Please sign in to comment.