Fix cmdcov issues (#475)
This commit is contained in:
Родитель
b29b9473b3
Коммит
edd98b04b4
|
@ -2,6 +2,11 @@
|
|||
|
||||
Release History
|
||||
===============
|
||||
0.1.80
|
||||
++++++
|
||||
* `azdev cmdcov`: Support both extension short name and long name
|
||||
* `azdev cmdcov`: Fix sorting issues
|
||||
|
||||
0.1.79
|
||||
++++++
|
||||
* Fix profile options
|
||||
|
|
|
@ -116,12 +116,16 @@ class CmdcovManager:
|
|||
print("\033[31m" + "Get all commands".center(self.width, self.fillchar) + "\033[0m")
|
||||
time.sleep(0.1)
|
||||
for _, y in tqdm(self.loaded_help.items()):
|
||||
module = None
|
||||
if hasattr(y, 'command_source') and y.command_source in self.selected_mod_names:
|
||||
module = y.command_source
|
||||
elif hasattr(y, 'command_source') and hasattr(y.command_source, 'extension_name'):
|
||||
module = 'azext_' + y.command_source.extension_name.replace('-', '_')
|
||||
if module not in self.selected_mod_names:
|
||||
module = None
|
||||
ext_name = y.command_source.extension_name
|
||||
full_ext_name = 'azext_' + ext_name.replace('-', '_')
|
||||
if ext_name in self.selected_mod_names:
|
||||
module = ext_name
|
||||
elif full_ext_name in self.selected_mod_names:
|
||||
module = full_ext_name
|
||||
else:
|
||||
continue
|
||||
if (not y.deprecate_info) and module:
|
||||
|
|
|
@ -31,19 +31,19 @@ function sortStrDesc(a, b)
|
|||
}
|
||||
function sortTextAS(a, b)
|
||||
{
|
||||
if (a==='Not applicable'){
|
||||
a = -1
|
||||
} else if (a===''){
|
||||
a = 100
|
||||
if (a === 'Not applicable' || a === 'N/A') {
|
||||
a = -1;
|
||||
} else if (a === '') {
|
||||
a = 100;
|
||||
} else {
|
||||
a = parseFloat(a.substr(0,a.length-1))
|
||||
a = parseFloat(a.substr(0, a.length - 1));
|
||||
}
|
||||
if (b==='N/A'){
|
||||
b = -1
|
||||
} else if (b===''){
|
||||
b = 100
|
||||
if (b === 'Not applicable' || b === 'N/A') {
|
||||
b = -1;
|
||||
} else if (b === '') {
|
||||
b = 100;
|
||||
} else {
|
||||
b = parseFloat(b.substr(0,b.length-1))
|
||||
b = parseFloat(b.substr(0, b.length - 1));
|
||||
}
|
||||
if (a < b) {
|
||||
return -1;
|
||||
|
@ -51,22 +51,23 @@ function sortTextAS(a, b)
|
|||
if (a > b) {
|
||||
return 1;
|
||||
}
|
||||
return 0; // In case a and b are equal
|
||||
}
|
||||
function sortTextDesc(a, b)
|
||||
{
|
||||
if (a==='N/A'){
|
||||
a = -1
|
||||
} else if (a===''){
|
||||
a = 100
|
||||
} else {
|
||||
a = parseFloat(a.substr(0,a.length-1))
|
||||
if (a === 'Not applicable' || a === 'N/A') {
|
||||
a = -1;
|
||||
} else if (a === '') {
|
||||
a = 100;
|
||||
} else {
|
||||
a = parseFloat(a.substr(0, a.length - 1));
|
||||
}
|
||||
if (b==='N/A'){
|
||||
b = -1
|
||||
} else if (b===''){
|
||||
b = 100
|
||||
} else {
|
||||
b = parseFloat(b.substr(0,b.length-1))
|
||||
if (b === 'Not applicable' || b === 'N/A') {
|
||||
b = -1;
|
||||
} else if (b === '') {
|
||||
b = 100;
|
||||
} else {
|
||||
b = parseFloat(b.substr(0, b.length - 1));
|
||||
}
|
||||
if (a < b) {
|
||||
return 1;
|
||||
|
@ -74,8 +75,10 @@ function sortTextDesc(a, b)
|
|||
if (a > b) {
|
||||
return -1;
|
||||
}
|
||||
return 0; // In case a and b are equal
|
||||
}
|
||||
|
||||
|
||||
function SortTable(obj){
|
||||
var column=obj.id
|
||||
var tdModule=document.getElementsByName("td-module");
|
||||
|
|
Загрузка…
Ссылка в новой задаче