Fixed following SonarQube issues:

1) TypeError can be thrown as <variable_name> might be null or undefined here.
2) Unexpected duplicate "white-space".
3) Unexpected missing generic font family.
4) Unexpected shorthand "padding" after "padding-left".
This commit is contained in:
Akshay Joshi 2020-06-24 15:57:01 +05:30
parent cdf1c7a2a6
commit 15c621b1d8
8 changed files with 36 additions and 56 deletions

View File

@ -92,13 +92,8 @@ div.tab-pane[data-explain-tabpanel=table] {
overflow-wrap: break-word;
word-break: break-all;
overflow: visible;
white-space: -moz-pre-wrap !important;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
white-space: pre-wrap;
word-wrap: break-word;
white-space: -webkit-pre-wrap;
white-space: normal;
}
&.pg-ex-highlighter {
color: $color-primary;

View File

@ -19,7 +19,6 @@ function (copyData, RangeSelectionHelper) {
var isModifierDown = event.ctrlKey || event.metaKey;
var self = this || window;
self.slickgrid = args.grid;
self.csvOptions;
if (isModifierDown && modifiedKey == KEY_C) {
copyData.apply(self);

View File

@ -12,7 +12,7 @@
}
.control-label::before {
font: normal normal normal 16px/1 FontAwesome;
font: normal normal normal 16px/1 $font-family-icon;
content: "\f071";
text-decoration: inherit;
position: absolute;

View File

@ -288,10 +288,10 @@ td.switch-cell > div.toggle {
.navbar-brand {
margin-right: 0rem;
padding: 0rem;
padding-left: 0.5rem !important;
padding-right: 1rem !important;
height: $navbar-height;
padding: 0rem;
display: flex;
align-items: center !important;
font-weight: bold;

View File

@ -285,9 +285,9 @@
/* Message panel shown on browser tabs */
.pg-panel-message {
margin-top: 25px !important;
width: 80%;
margin: 0 auto;
margin-top: 25px !important;
position: relative;
text-align: center;
@ -586,7 +586,7 @@ fieldset.inline-fieldset > div {
}
.icon-fa::before {
font: normal normal normal 14px/1 FontAwesome;
font: normal normal normal 14px/1 $font-family-icon;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@ -700,7 +700,6 @@ div.rolmembership {
.inline-tab-panel > ul.tab-content {
padding-left: 5px; padding-right: 5px; border-color: $color-gray-lighter;
border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;
border-width: 0px 1px 1px 1px; border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px; border-style: solid solid;
}

View File

@ -366,8 +366,8 @@ define([
// It will assign default values to "Default value" column
for (j = (argname.length - 1); j >= 0; j--) {
if (debug_info['proargmodes'] != null) {
if (argmode[j] == 'i' || argmode[j] == 'b' ||
(is_edb_proc && argmode[j] == 'o')) {
if (argmode && (argmode[j] == 'i' || argmode[j] == 'b' ||
(is_edb_proc && argmode[j] == 'o'))) {
if (arg_cnt) {
arg_cnt = arg_cnt - 1;
def_val_list[j] = default_args[arg_cnt];
@ -386,8 +386,8 @@ define([
if (argtype.length != 0) {
for (i = 0; i < argtype.length; i++) {
if (debug_info['proargmodes'] != null) {
if (argmode[i] == 'i' || argmode[i] == 'b' ||
(is_edb_proc && argmode[i] == 'o')) {
if (argmode && (argmode[i] == 'i' || argmode[i] == 'b' ||
(is_edb_proc && argmode[i] == 'o'))) {
use_def_value = false;
if (def_val_list[i] != '<no default>') {
use_def_value = true;
@ -419,7 +419,7 @@ define([
for (i = 0; i < func_args_data.length; i++) {
index = func_args_data[i]['arg_id'];
if (debug_info['proargmodes'] != null &&
(argmode[index] == 'o' && !is_edb_proc)) {
(argmode && argmode[index] == 'o' && !is_edb_proc)) {
continue;
}
@ -493,8 +493,8 @@ define([
'default_value': def_val_list[i],
});
} else {
if (argmode[i] == 'i' || argmode[i] == 'b' ||
(is_edb_proc && argmode[i] == 'o')) {
if (argmode && (argmode[i] == 'i' || argmode[i] == 'b' ||
(is_edb_proc && argmode[i] == 'o'))) {
use_def_value = false;
if (def_val_list[i] != '<No default value>') {
use_def_value = true;
@ -706,7 +706,7 @@ define([
// If debugging is not started again then we should initialize the target otherwise not
if (self.setting('restart_debug') == 0) {
if (d._type == 'function') {
if (d && d._type == 'function') {
baseUrl = url_for('debugger.initialize_target_for_function', {
'debug_type': 'direct',
'trans_id': self.setting('trans_id'),
@ -715,7 +715,7 @@ define([
'scid': treeInfo.schema._id,
'func_id': treeInfo.function._id,
});
} else if (d._type == 'procedure') {
} else if (d && d._type == 'procedure') {
baseUrl = url_for('debugger.initialize_target_for_function', {
'debug_type': 'direct',
'trans_id': self.setting('trans_id'),
@ -724,7 +724,7 @@ define([
'scid': treeInfo.schema._id,
'func_id': treeInfo.procedure._id,
});
} else if (d._type == 'edbfunc') {
} else if (d && d._type == 'edbfunc') {
baseUrl = url_for('debugger.initialize_target_for_function', {
'debug_type': 'direct',
'trans_id': self.setting('trans_id'),
@ -733,7 +733,7 @@ define([
'scid': treeInfo.schema._id,
'func_id': treeInfo.edbfunc._id,
});
} else if (d._type == 'edbproc') {
} else if (d && d._type == 'edbproc') {
baseUrl = url_for('debugger.initialize_target_for_function', {
'debug_type': 'direct',
'trans_id': self.setting('trans_id'),

View File

@ -1,17 +1,4 @@
.icon-schema-diff:before {
/*
display: inline-block;
align-content: center;
vertical-align: middle;
height: 18px;
width: 18px;
background-size: 20px !important;
background-repeat: no-repeat;
background-position-x: center;
background-position-y: center;
background-image: url('../img/compare.svg') !important;
*/
font-icon: url('../img/compare.svg');
font-size: 1.3em !important;
}
@ -115,20 +102,6 @@
width: 20px;
}
.slick-group-toggle.collapsed::before {
font-family: "FontAwesome";
content: "\f054";
font-size: 0.6rem;
border: none;
}
.slick-group-toggle.expanded::before {
font-family: "FontAwesome";
content: "\f078";
font-size: 0.6rem;
margin-left: 0rem;
}
.slick-group-toggle {
margin-right: 0px !important;
height: 11px !important;
@ -141,13 +114,6 @@
width: 0.7rem;
}
#schema-diff-ddl-comp .badge .caret::before {
font-family: "FontAwesome";
content: "\f078";
font-size: 0.7rem;
margin-left: 0rem;
}
#schema-diff-ddl-comp .badge {
font-size: inherit;
padding: 7px;

View File

@ -96,3 +96,24 @@
vertical-align: middle;
display: inline-block;
}
.slick-group-toggle.collapsed::before {
font-family: $font-family-icon;
content: "\f054";
font-size: 0.6rem;
border: none;
}
.slick-group-toggle.expanded::before {
font-family: $font-family-icon;
content: "\f078";
font-size: 0.6rem;
margin-left: 0rem;
}
#schema-diff-ddl-comp .badge .caret::before {
font-family: $font-family-icon;
content: "\f078";
font-size: 0.7rem;
margin-left: 0rem;
}