mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-08-18 17:04:51 -05:00
Static code analysis setup
This commit is contained in:
committed by
Salah Benmoussati
parent
e7759e72c4
commit
b4d5f6d038
@@ -0,0 +1,2 @@
|
||||
spec/
|
||||
Dockerfile
|
||||
@@ -26,6 +26,7 @@ const cleanOldCache = (): void => {
|
||||
const files = fs.readdirSync(userDataPath);
|
||||
|
||||
files.forEach((file) => {
|
||||
// nosemgrep
|
||||
const filePath = path.join(userDataPath, file);
|
||||
if (!fileRemovalList.includes(file)) {
|
||||
return;
|
||||
|
||||
+3
-6
@@ -105,12 +105,9 @@ class Translation {
|
||||
* @param locale
|
||||
*/
|
||||
private loadResource(locale: LocaleType): JSON | null {
|
||||
const resourcePath = path.resolve(
|
||||
__dirname,
|
||||
'..',
|
||||
'locale',
|
||||
`${locale}.json`,
|
||||
);
|
||||
const filename = `${locale}.json`;
|
||||
// nosemgrep
|
||||
const resourcePath = path.resolve(__dirname, '..', 'locale', filename);
|
||||
|
||||
if (!fs.existsSync(resourcePath)) {
|
||||
return null;
|
||||
|
||||
@@ -274,6 +274,7 @@ class Logger {
|
||||
const files = fs.readdirSync(this.logPath);
|
||||
const deleteTimeStamp = new Date().getTime() - 5 * 24 * 60 * 60 * 1000;
|
||||
files.forEach((file) => {
|
||||
// nosemgrep
|
||||
const filePath = path.join(this.logPath, file);
|
||||
if (fs.existsSync(filePath)) {
|
||||
const stat = fs.statSync(filePath);
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class MessageBanner {
|
||||
if (onlineStateIntervalId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// nosemgrep
|
||||
onlineStateIntervalId = setInterval(async () => {
|
||||
try {
|
||||
const response = await window.fetch(this.url || window.location.href, {
|
||||
|
||||
Reference in New Issue
Block a user