aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2019-03-26 15:52:21 +0100
committersonartech <sonartech@sonarsource.com>2019-03-29 09:44:58 +0100
commitc9990b56c199f23d97694b9de677872ca15471c2 (patch)
tree4c0c1d47a2ef541f62310a4f921a1ee805f29046
parent496a64705bb03ea7748d140698b5dbbc1af31325 (diff)
downloadsonarqube-c9990b56c199f23d97694b9de677872ca15471c2.tar.gz
sonarqube-c9990b56c199f23d97694b9de677872ca15471c2.zip
Remove dead code
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/utils.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/server/sonar-web/src/main/js/apps/portfolio/utils.ts b/server/sonar-web/src/main/js/apps/portfolio/utils.ts
index f3d76eeab2e..ea66cfb7398 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/utils.ts
+++ b/server/sonar-web/src/main/js/apps/portfolio/utils.ts
@@ -17,40 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-export function getNextRating(rating: number): number | undefined {
- return rating > 1 ? rating - 1 : undefined;
-}
-
-function getWorstSeverity(data: string): { severity: string; count: number } | undefined {
- const SEVERITY_ORDER = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];
-
- const severities: T.Dict<number> = {};
- data.split(';').forEach(equality => {
- const [key, count] = equality.split('=');
- severities[key] = Number(count);
- });
-
- for (let i = 0; i < SEVERITY_ORDER.length; i++) {
- const count = severities[SEVERITY_ORDER[i]];
- if (count > 0) {
- return { severity: SEVERITY_ORDER[i], count };
- }
- }
-
- return undefined;
-}
-
-export function getEffortToNextRating(
- measures: Array<{ metric: { key: string }; value: string }>,
- metricKey: string
-) {
- const measure = measures.find(measure => measure.metric.key === metricKey);
- if (!measure) {
- return undefined;
- }
- return getWorstSeverity(measure.value);
-}
-
export const PORTFOLIO_METRICS = [
'projects',
'ncloc',