Skip to content

Commit 16114b5

Browse files
committed
Apply further suggestions from SonarQube
1 parent 731dbd2 commit 16114b5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

extension.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,13 +611,13 @@ class FedoraUpdateIndicator extends Button {
611611

612612
if (proc.get_successful()) {
613613
for (const line of stdout.split('\n')) {
614-
let nameMatch = line.match(/^Name\s+:\s+(.+)$/);
614+
let nameMatch = line.match(/^Name\s+:\s+([^\r\n]+)$/);
615615
if (nameMatch !== null) {
616616
name = nameMatch[1].trim();
617617
continue;
618618
}
619619

620-
let sourceMatch = line.match(/^Source\s+:\s+(.+?)-\d/);
620+
let sourceMatch = line.match(/^Source\s+:\s+([A-Za-z0-9_.+]+(?:-[A-Za-z0-9_.+]+)*)-\d/);
621621
if (sourceMatch !== null) {
622622
rootPackage = sourceMatch[1].trim();
623623
break;

stylesheet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
padding: 1px 5px;
3333
}
3434

35+
/* NOSONAR */
3536
.fedora-updates-menubutton > StIcon {
3637
icon-size: 16px;
3738
}

0 commit comments

Comments
 (0)