generated from CMU-17313Q/NodeBB-f23
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from CMU-17313Q/plato-analysis-tool
Integrated Plato - static analysis tool
- Loading branch information
Showing
65 changed files
with
17,791 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Plato | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
plato1: | ||
permissions: | ||
checks: write | ||
contents: read | ||
name: Plato | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
TEST_ENV: ${{ matrix.test_env || 'production' }} | ||
|
||
services: | ||
mongo: | ||
image: "mongo:3.7" | ||
ports: | ||
# Maps port 27017 on service container to the host | ||
- 27017:27017 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: cp install/package.json package.json | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: NPM Install | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: Setup on MongoDB | ||
env: | ||
SETUP: >- | ||
{ | ||
"url": "http://127.0.0.1:4567", | ||
"secret": "abcdef", | ||
"admin:username": "admin", | ||
"admin:email": "[email protected]", | ||
"admin:password": "hAN3Eg8W", | ||
"admin:password:confirm": "hAN3Eg8W", | ||
"database": "mongo", | ||
"mongo:host": "127.0.0.1", | ||
"mongo:port": 27017, | ||
"mongo:username": "", | ||
"mongo:password": "", | ||
"mongo:database": "nodebb" | ||
} | ||
CI: >- | ||
{ | ||
"host": "127.0.0.1", | ||
"port": 27017, | ||
"database": "ci_test" | ||
} | ||
run: | | ||
node app --setup="${SETUP}" --ci="${CI}" | ||
- name: Install Plato | ||
run: npm install -g plato | ||
|
||
- name: Run Plato Tool | ||
run: plato -r -d report public/src/client/topic/postTools.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
body { | ||
background: #222222; | ||
margin: 20px; | ||
} | ||
|
||
.reportBlock { | ||
background: #34495e; | ||
color: #ecf0f1; | ||
height: 300px; | ||
position: relative; | ||
} | ||
|
||
.chart { | ||
width: 100%; | ||
height: 300px; | ||
position: absolute; | ||
top: 0; left: 0; | ||
z-index: 0; | ||
} | ||
|
||
.reportContent { | ||
z-index: 10; | ||
position: absolute; | ||
top: 0; left: 0; | ||
width: 100%; | ||
} | ||
|
||
h2.reportTitle { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
color: #7F8181; | ||
font-size: 14px; | ||
font-weight: 200; | ||
padding: 10px; | ||
margin: 0; | ||
text-transform: uppercase; | ||
letter-spacing: 1px; | ||
} | ||
|
||
.reportBlock.lineCount { background-color: #272727; } | ||
.reportBlock.maintainability { background-color: #272727; } | ||
.reportBlock.maintainabilityList, | ||
.reportBlock.locList, | ||
.reportBlock.lintList { | ||
background-color: #2A2A2A; | ||
margin-top: 15px; | ||
padding: 20px 5px; | ||
} | ||
|
||
.reportBlock .chart-label { | ||
display: block; | ||
padding-top: 100px; | ||
text-align: center; | ||
color: #7F8181; | ||
font-size: 14px; | ||
font-weight: 200; | ||
text-transform: uppercase; | ||
letter-spacing: 1px; | ||
} | ||
|
||
.reportBlock strong { | ||
display: block; | ||
font-size: 90%; | ||
} | ||
|
||
.reportBlock li { | ||
border-bottom: 1px solid #323232; | ||
} | ||
|
||
.reportBlock h1 { | ||
margin: 0; | ||
font-size: 60px; | ||
text-align: center; | ||
} | ||
|
||
.reportBlock ul { | ||
margin: 15px !important; | ||
} | ||
.reportBlock h3 { | ||
margin: 5px 15px 0; | ||
} | ||
|
||
.reportBlock li { | ||
line-height: 22px; | ||
font-size: 16px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
.historical .chart { | ||
height: 200px; | ||
} | ||
|
||
.CodeMirror { | ||
height: auto; | ||
} | ||
|
||
.CodeMirror-scroll { | ||
overflow-x: hidden; | ||
overflow-y: hidden; | ||
} | ||
.CodeMirror-lines { | ||
cursor:default; | ||
} | ||
|
||
.plato-mark { | ||
background-color:rgb(212, 250, 236); | ||
border: 1px dashed red; | ||
border-width:1px 0 1px 0; | ||
cursor:pointer; | ||
} | ||
|
||
.plato-mark.focus { | ||
background-color: rgb(235, 250, 166); | ||
} | ||
.plato-mark.active { | ||
background-color: rgb(158, 180, 255); | ||
} | ||
|
||
.plato-mark-start { | ||
border-left-width:1px; | ||
padding-left:1px; | ||
} | ||
.plato-mark-end { | ||
border-right-width:1px; | ||
padding-right:1px; | ||
} | ||
.plato-gutter { | ||
} | ||
|
||
.plato-gutter-icon { | ||
font-size:16px; | ||
cursor:pointer; | ||
color: #800000; | ||
text-align:center; | ||
} | ||
|
||
.plato-gutter-jshint, .plato-gutter-complexity { | ||
width:14px; | ||
} | ||
|
||
.charts { | ||
margin-top:1em; | ||
} | ||
|
||
.charts .header { | ||
font-weight:normal; | ||
text-align:center; | ||
} | ||
|
||
.chart-header { | ||
font-weight:normal; | ||
text-align:center; | ||
} | ||
|
||
.CodeMirror pre { | ||
z-index:4; | ||
} | ||
|
||
.CodeMirror-linewidget { | ||
background-color: hsl(240, 20%, 96%); | ||
font-size:12px; | ||
box-shadow:inset 10px 10px 10px -12px hsl(240, 20%, 17%); | ||
margin-top:10px; | ||
padding-top:5px; | ||
padding-left:5px; | ||
padding-bottom:2px; | ||
} | ||
|
||
.CodeMirror-linewidget ~ .CodeMirror-linewidget{ | ||
box-shadow:inset 10px 0px 10px -12px hsl(240, 20%, 17%); | ||
margin-top:0px; | ||
padding-top:0px; | ||
} | ||
|
||
.plato-line-widget { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
.chart { | ||
margin: 0 auto; | ||
height: 200px; | ||
} | ||
|
||
.overview .chart { | ||
height: 250px; | ||
} | ||
|
||
.historical .chart { | ||
height:200px; | ||
} | ||
|
||
.chart rect { | ||
cursor:pointer; | ||
} | ||
|
||
.file-list li { | ||
border-bottom:1px solid #ccc; | ||
padding-bottom:10px; | ||
padding-top:10px; | ||
} | ||
|
||
.file-list li:nth-child(odd) { | ||
background-color: hsl(0, 0%, 98%); | ||
} | ||
|
||
.fade-left { | ||
background: -moz-linear-gradient(left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ | ||
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ | ||
background: -webkit-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ | ||
background: -o-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ | ||
background: -ms-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ | ||
background: linear-gradient(to right, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C */ | ||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 */ | ||
} | ||
|
||
.file-list li:nth-child(odd) .fade-left { | ||
background: -moz-linear-gradient(left, rgba(249,249,249,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ | ||
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(249,249,249,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ | ||
background: -webkit-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ | ||
background: -o-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ | ||
background: -ms-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ | ||
background: linear-gradient(to right, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* W3C */ | ||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f9f9f9', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 */ | ||
} | ||
|
||
.fadeout { | ||
position: absolute; | ||
height: 50px; | ||
z-index: 10; | ||
float: left; | ||
width:70px | ||
} | ||
|
||
.file { | ||
white-space: nowrap; | ||
} | ||
|
||
|
||
.file-link { | ||
text-align: right; | ||
direction: rtl; | ||
overflow: hidden; | ||
height:40px; | ||
font-size:20px; | ||
color: #334B6D; | ||
display:block; | ||
padding:12px 12px 12px 0; | ||
text-decoration: underline; | ||
} | ||
|
||
.file-link:hover { | ||
color: #3B71B1; | ||
} | ||
|
||
.file-chart label { | ||
width: 75px; | ||
text-align: right; | ||
margin-right: 10px; | ||
} | ||
|
||
.file-chart .chart-value { | ||
margin-left: 3px; | ||
font-size:11px; | ||
} | ||
|
||
.horizontal-bar { | ||
display:inline-block; | ||
height:8px; | ||
border-radius: 0 4px 4px 0; | ||
} | ||
|
||
.threshold-0 .horizontal-bar { | ||
background-color: #01939A; | ||
} | ||
.threshold-1 .horizontal-bar { | ||
background-color: #FFAB00; | ||
} | ||
.threshold-2 .horizontal-bar { | ||
background-color: #FF0700; | ||
} | ||
|
||
|
||
@media (max-width: 767px) { | ||
.file-link { | ||
text-align: center; | ||
} | ||
} | ||
|
||
.complexity, .sloc, .bugs, .lint { | ||
font-weight: normal; | ||
} | ||
|
||
.on { /* marking 'sorting buttons' active */ | ||
font-weight: bold; | ||
} |
Oops, something went wrong.