Skip to content

Commit

Permalink
add a analyzer for farmers delight
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Jun 15, 2024
1 parent 6e1db4e commit 588eadf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/logIssueAnalyzers/_logIssueAnalyzers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Analyzer } from '../handlers/log.handler';
import { createVersionAnalyzer } from './createVersion';
import { farmersDelightNPE } from './farmersDelightNPE';

export const logAnalyzers: Analyzer[] = [createVersionAnalyzer];
export const logAnalyzers: Analyzer[] = [createVersionAnalyzer, farmersDelightNPE];

export default logAnalyzers;
15 changes: 15 additions & 0 deletions src/logIssueAnalyzers/farmersDelightNPE.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Analyzer } from '../handlers/log.handler';

export const farmersDelightNPE: Analyzer = async (log) => {
if (!log.mods) return null;

const regex = log.content.match(/NullPointerException.*class_2960.*farmersdelight\$migrateGet/gs)
if (regex) {
return {
name: 'Farmers Delight Missing Null check',
value: "Farmers Delight is missing a null check, update farmers delight",
};
}

return null;
};

0 comments on commit 588eadf

Please sign in to comment.