Skip to content

Commit

Permalink
resolve #206
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Dec 15, 2020
1 parent 431af8a commit 3fd994e
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 108 deletions.
1 change: 0 additions & 1 deletion LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ C# (cs,csx)
C++ (cc,cpp,cxx,c++,pcc)
C++ Header (hh,hpp,hxx,inl,ipp)
Cabal (cabal)
Cargo Lock (cargo.lock)
Cassius (cassius)
Ceylon (ceylon)
Clojure (clj,cljc)
Expand Down
36 changes: 18 additions & 18 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th>349</th>
<th>6519</th>
<th>1352</th>
<th>325373</th>
<th>324573</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand Down Expand Up @@ -48,12 +48,12 @@
</tr><tr>
<th>Markdown</th>
<th>8</th>
<th>1190</th>
<th>1189</th>
<th>283</th>
<th>0</th>
<th>907</th>
<th>906</th>
<th>0</th>
<th>48508</th>
<th>48559</th>
</tr><tr>
<th>CSS</th>
<th>5</th>
Expand Down Expand Up @@ -94,11 +94,11 @@
<th>Shell</th>
<th>3</th>
<th>987</th>
<th>136</th>
<th>37</th>
<th>814</th>
<th>91</th>
<th>35251</th>
<th>133</th>
<th>84</th>
<th>770</th>
<th>85</th>
<th>35299</th>
</tr><tr>
<th>JavaServer Pages</th>
<th>2</th>
Expand Down Expand Up @@ -354,12 +354,12 @@
</tr><tr>
<th>JSON</th>
<th>1</th>
<th>7162</th>
<th>7122</th>
<th>0</th>
<th>0</th>
<th>7162</th>
<th>7122</th>
<th>0</th>
<th>99807</th>
<th>99206</th>
</tr><tr>
<th>Korn Shell</th>
<th>1</th>
Expand Down Expand Up @@ -553,11 +553,11 @@
<tfoot><tr>
<th>Total</th>
<th>162</th>
<th>24731</th>
<th>2830</th>
<th>1542</th>
<th>20359</th>
<th>2276</th>
<th>1746225</th>
<th>24690</th>
<th>2827</th>
<th>1589</th>
<th>20274</th>
<th>2270</th>
<th>1744923</th>
</tr></tfoot>
</table></body></html>
40 changes: 0 additions & 40 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1040,46 +1040,6 @@
],
"quotes": []
},
"Cargo Lock": {
"complexitychecks": [
"for ",
"for(",
"if ",
"if(",
"switch ",
"while ",
"else ",
"|| ",
"&& ",
"!= ",
"== "
],
"extensions": [
"cargo.lock"
],
"line_comment": [
"#"
],
"multi_line": [],
"quotes": [
{
"end": "\\\"",
"start": "\\\""
},
{
"end": "'",
"start": "'"
},
{
"end": "\\\"\\\"\\\"",
"start": "\\\"\\\"\\\""
},
{
"end": "'''",
"start": "'''"
}
]
},
"Cassius": {
"complexitychecks": [
"for ",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,54 +43,54 @@ else
echo -e "${GREEN}PASSED invalid option test"
fi

# NB you need to have pyyaml installed via pip install pyyaml for this to work
if ./scc "examples/language/" --format cloc-yaml -o .tmp_scc_yaml >/dev/null && python <<EOS
import yaml,sys
try:
with open('.tmp_scc_yaml','r') as f:
data = yaml.load(f.read())
if type(data) is dict and data.keys():
sys.exit(0)
else:
print('data was {}'.format(type(data)))
except Exception as e:
pass
sys.exit(1)
EOS

then
echo -e "${GREEN}PASSED cloc-yaml format test"
else
echo -e "${RED}======================================================="
echo -e "${RED}FAILED Should accept --format cloc-yaml and should generate valid output"
echo -e "=======================================================${NC}"
rm -f .tmp_scc_yaml
exit
fi

if ./scc "examples/language/" --format cloc-yml -o .tmp_scc_yaml >/dev/null && python <<EOS
import yaml,sys
try:
with open('.tmp_scc_yaml','r') as f:
data = yaml.load(f.read())
if type(data) is dict and data.keys():
sys.exit(0)
else:
print('data was {}'.format(type(data)))
except Exception as e:
pass
sys.exit(1)
EOS

then
echo -e "${GREEN}PASSED cloc-yml format test"
else
echo -e "${RED}======================================================="
echo -e "${RED}FAILED Should accept --format cloc-yml and should generate valid output"
echo -e "=======================================================${NC}"
rm -f .tmp_scc_yaml
exit
fi
## NB you need to have pyyaml installed via pip install pyyaml for this to work
#if ./scc "examples/language/" --format cloc-yaml -o .tmp_scc_yaml >/dev/null && python <<EOS
#import yaml,sys
#try:
# with open('.tmp_scc_yaml','r') as f:
# data = yaml.load(f.read())
# if type(data) is dict and data.keys():
# sys.exit(0)
# else:
# print('data was {}'.format(type(data)))
#except Exception as e:
# pass
#sys.exit(1)
#EOS
#
#then
# echo -e "${GREEN}PASSED cloc-yaml format test"
#else
# echo -e "${RED}======================================================="
# echo -e "${RED}FAILED Should accept --format cloc-yaml and should generate valid output"
# echo -e "=======================================================${NC}"
# rm -f .tmp_scc_yaml
# exit
#fi
#
#if ./scc "examples/language/" --format cloc-yml -o .tmp_scc_yaml >/dev/null && python <<EOS
#import yaml,sys
#try:
# with open('.tmp_scc_yaml','r') as f:
# data = yaml.load(f.read())
# if type(data) is dict and data.keys():
# sys.exit(0)
# else:
# print('data was {}'.format(type(data)))
#except Exception as e:
# pass
#sys.exit(1)
#EOS
#
#then
# echo -e "${GREEN}PASSED cloc-yml format test"
#else
# echo -e "${RED}======================================================="
# echo -e "${RED}FAILED Should accept --format cloc-yml and should generate valid output"
# echo -e "=======================================================${NC}"
# rm -f .tmp_scc_yaml
# exit
#fi

if ./scc NOTAREALDIRECTORYORFILE > /dev/null ; then
echo -e "${RED}================================================="
Expand Down

0 comments on commit 3fd994e

Please sign in to comment.