From 8916c91390f09ea766ce0668d1795aa8e67cf5c2 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 8 Nov 2016 13:51:24 +0100 Subject: [PATCH] fix quality flaws --- .../sonar-web/src/main/js/apps/code/components/Component.js | 2 +- .../main/js/apps/projects/components/ProjectCardContainer.js | 2 +- .../main/js/apps/projects/components/ProjectsListFooter.js | 2 +- server/sonar-web/src/main/js/apps/projects/store/actions.js | 4 ++-- server/sonar-web/src/main/js/apps/projects/store/utils.js | 2 +- server/sonar-web/src/main/js/components/source-viewer/main.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.js b/server/sonar-web/src/main/js/apps/code/components/Component.js index 14386f2b2f5..7a772566d7f 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.js +++ b/server/sonar-web/src/main/js/apps/code/components/Component.js @@ -87,7 +87,7 @@ export default class Component extends React.Component { { metric: 'reliability_rating', type: 'RATING' }, { metric: 'security_rating', type: 'RATING' }, { metric: 'sqale_rating', type: 'RATING' }, - { metric: 'ncloc', type: 'SHORT_INT' }, + { metric: 'ncloc', type: 'SHORT_INT' } ] : [ { metric: 'ncloc', type: 'SHORT_INT' }, { metric: 'bugs', type: 'SHORT_INT' }, diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js index f3f9713ffb9..e260f56ca15 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js @@ -24,6 +24,6 @@ import { getComponent, getComponentMeasures } from '../../../app/store/rootReduc export default connect( (state, ownProps) => ({ project: getComponent(state, ownProps.projectKey), - measures: getComponentMeasures(state, ownProps.projectKey), + measures: getComponentMeasures(state, ownProps.projectKey) }) )(ProjectCard); diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js index d256492d68e..1ff5cdd71af 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js @@ -22,7 +22,7 @@ import ListFooter from '../../../components/controls/ListFooter'; export default class ProjectsListFooter extends React.Component { static propTypes = { - total: React.PropTypes.number.isRequired, + total: React.PropTypes.number.isRequired }; render () { diff --git a/server/sonar-web/src/main/js/apps/projects/store/actions.js b/server/sonar-web/src/main/js/apps/projects/store/actions.js index 561937468f3..9582b7a7dee 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/actions.js +++ b/server/sonar-web/src/main/js/apps/projects/store/actions.js @@ -92,7 +92,7 @@ const onReceiveProjects = dispatch => response => { }); dispatch(updateState({ total: response.paging.total, - pageIndex: response.paging.pageIndex, + pageIndex: response.paging.pageIndex })); }; @@ -142,7 +142,7 @@ export const fetchFavoriteProjects = () => dispatch => { }); dispatch(updateState({ total: projects.length, - pageIndex: 1, + pageIndex: 1 })); }, onFail(dispatch)); }; diff --git a/server/sonar-web/src/main/js/apps/projects/store/utils.js b/server/sonar-web/src/main/js/apps/projects/store/utils.js index d2422b8ee85..9ed9dd74ef4 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/utils.js +++ b/server/sonar-web/src/main/js/apps/projects/store/utils.js @@ -39,7 +39,7 @@ export const parseUrlQuery = urlQuery => ({ 'maintainability': getAsNumericRating(urlQuery['maintainability']), 'coverage': getAsNumericRating(urlQuery['coverage']), 'duplications': getAsNumericRating(urlQuery['duplications']), - 'size': getAsNumericRating(urlQuery['size']), + 'size': getAsNumericRating(urlQuery['size']) }); const convertIssuesRating = (metric, rating) => { diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js index 50d476d0f57..980e7e98447 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/main.js +++ b/server/sonar-web/src/main/js/components/source-viewer/main.js @@ -216,7 +216,7 @@ export default Marionette.LayoutView.extend({ } source = source.map(function (row) { return _.extend(row, { - coverageStatus: that.getCoverageStatus(row), + coverageStatus: that.getCoverageStatus(row) }); }); const firstLine = _.first(source).line; -- 2.39.5