ChiefOfGxBxL/WC3MapTranslator

View on GitHub
lib/translators/SoundsTranslator.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function warToJson has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static warToJson(buffer: Buffer): JsonResult<Sound[]> {
        const result = [];
        const outBufferToJSON = new W3Buffer(buffer);

        const fileVersion = outBufferToJSON.readInt(), // File version
Severity: Major
Found in lib/translators/SoundsTranslator.ts - About 3 hrs to fix

    Function jsonToWar has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static jsonToWar(soundsJson: Sound[]): WarResult {
            const outBufferToWar = new HexBuffer();
    
            /*
             * Header
    Severity: Minor
    Found in lib/translators/SoundsTranslator.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status