pixijs/pixi-haxe

View on GitHub
samples/src/spine/Main.hx

Summary

Maintainability
Test Coverage

0.4 is a magic number
Open

        _spine.stateData.setMix("jump", "walk", 0.4);
Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

0.2 is a magic number
Open

        _spine.stateData.setMix("walk", "jump", 0.2);
Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

0x00FF66 is a magic number
Open

        backgroundColor = 0x00FF66;
Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

1.5 is a magic number
Open

        _spine.scale.set(1.5);
Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

String jump appears 3 times in the file
Open

        _spine.state.setAnimation(0, "jump", false);
Severity: Minor
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.

String walk appears 3 times in the file
Open

        _spine.state.setAnimation(0, "walk", true);
Severity: Minor
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.

String walk appears 4 times in the file
Open

        _spine.state.addAnimation(0, "walk", true, 0);
Severity: Minor
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.

Invalid method name signature: main (name should be ~/^_[a-z][a-zA-Z0-9]*$/)
Open

    static function main() {
        new Main();
    }
Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that method names conform to a format specified by the format property.

Invalid method name signature: onAssetsLoaded (name should be ~/^_[a-z][a-zA-Z0-9]*$/)
Open

    function onAssetsLoaded() {
        _spine = new Spine(Reflect.field(_loader.resources, "spineboy").spineData);

        _spine.position.set(renderer.width / 2, renderer.height);

Severity: Info
Found in samples/src/spine/Main.hx by haxe-checkstyle

Checks that method names conform to a format specified by the format property.

There are no issues that match your filters.

Category
Status