@cryptotaxi247 / netdata-1 / commits / 7953472f1

address lgtm alerts (#7441)

Jacek Kolasa committed Dec 5, 2019 at 13:41 UTC 7953472f1190b96c46ce3180c935bdcc9b5d2717
3 files changed +5 -14
.remarkrc.js
-10
@@ -1,8 +1,5 @@
1 // Source: https://github.com/codacy/codacy-remark-lint/raw/master/.remarkrc.js
2
3 -const fs = require("fs");
4 -const path = require("path");
5 -
3 exports.settings = {
4 gfm: true,
5 commonmark: true,
@@ -19,13 +16,6 @@ exports.settings = {
16 incrementListMarker: true
17 };
18
22 -const personalDictionaryPath = path.join(__dirname, ".dictionary");
23 -const personalDictionary = fs.existsSync(personalDictionaryPath)
24 - ? {
25 - personal: fs.readFileSync(personalDictionaryPath, "utf8")
26 - }
27 - : {};
28 -
19 const remarkPresetLintMarkdownStyleGuide = {
20 plugins: require("remark-preset-lint-markdown-style-guide").plugins.filter(
21 function(elem) {
web/gui/dash-example.html
+1 -1
@@ -692,7 +692,7 @@ class PickNSort {
692
693 for (var i = 0; i < aProps.length; i++) {
694 var propName = aProps[i];
695 - var aa = a[propName]
695 + var aa = a[propName];
696 var aaProps = Object.keys(aa);
697 var bb = b[propName];
698 var bbProps = Object.keys(bb);
web/gui/main.js
+4 -3
@@ -1818,7 +1818,7 @@ function renderPage(menus, data) {
1818
1819 if (!isMemoryModeDbEngine) {
1820 sidebar += '<br />&nbsp;<br />Get more history by ' +
1821 - '<a href="https://docs.netdata.cloud/docs/configuration-guide/#increase-the-metrics-retention-period" target=_blank>configuring Netdata\'s <strong>history</strong></a> or using the <a href="https://docs.netdata.cloud/database/engine/" target=_blank>DB engine.</a>'
1821 + '<a href="https://docs.netdata.cloud/docs/configuration-guide/#increase-the-metrics-retention-period" target=_blank>configuring Netdata\'s <strong>history</strong></a> or using the <a href="https://docs.netdata.cloud/database/engine/" target=_blank>DB engine.</a>';
1822 }
1823
1824 sidebar += '<br/>&nbsp;<br/><strong>netdata</strong><br/>' + data.version.toString() + '</small></li>';
@@ -4956,7 +4956,8 @@ function handleSignInMessage(e) {
4956
4957 netdataRegistryCallback(registryAgents);
4958 if (e.data.redirectURI && !window.location.href.includes(e.data.redirectURI)) {
4959 - window.location.replace(e.data.redirectURI);
4959 + // lgtm false-positive - redirectURI does not come from user input, but from iframe callback
4960 + window.location.replace(e.data.redirectURI); // lgtm[js/client-side-unvalidated-url-redirection]
4961 }
4962 }
4963
@@ -5183,5 +5184,5 @@ if (document.readyState === "complete") {
5184 if (document.readyState === "complete") {
5185 initializeApp();
5186 }
5186 - })
5187 + });
5188 }