Showing 11 of 11 total issues
SaveFileIterator
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export class SaveFileIterator { constructor(saveFile: any) { this.saveFile = saveFile; this.state = []; }
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public copyRange(size: number, data: Uint8Array, padding: number = 0, bigEndian: boolean = false) { const ret = this.file.copyRange(this.offset, size, data, bigEndian); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public setStr(size: number, maxChars: number, str: string, padding: number = 0): void { const ret = this.file.setStr(this.offset, size, maxChars, str); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public getHex(size: number, prefix: boolean, padding: number = 0, bigEndian: boolean = false): string { const ret = this.file.getHex(this.offset, size, prefix, bigEndian); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public getStr(size: number, maxChars: number, padding: number = 0): string { const ret = this.file.getStr(this.offset, size, maxChars); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public getRange(size: number, padding: number = 0, bigEndian: boolean = false): Uint8Array { const ret = this.file.getRange(this.offset, size, bigEndian); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
public setBCD(size: number, val: number, padding: number = 0): void { const ret = this.file.setBCD(this.offset, size, val); this.offsetBy(size + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public setByte(value: number, padding: number = 0): void { const ret = this.file.setByte(this.offset, value); this.offsetBy(1 + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public getWord(padding: number = 0, bigEndian: boolean = false): number { const ret = this.file.getWord(this.offset, bigEndian); this.offsetBy(2 + padding); return ret; }
- Read upRead up
- Create a ticketCreate a ticket
if statements must be braced Open
if (val === undefined) val = 0x0000;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Type number trivially inferred from a number literal, remove type annotation Open
public offset: number = 0x0000;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks