HaxeFoundation/haxe.org

View on GitHub

Showing 243 of 243 total issues

Inner assignment detected
Open

                downloads.windows.archives.push(current = getInfo("Windows 32-bit Binaries", url));
Severity: Info
Found in src/DownloadsData.hx by haxe-checkstyle

Checks for assignments in subexpressions, such as in if ((a=b) > 0) return;.

Inner assignment detected
Open

                downloads.windows.archives.unshift(current = getInfo("Windows 64-bit Binaries", url));
Severity: Info
Found in src/DownloadsData.hx by haxe-checkstyle

Checks for assignments in subexpressions, such as in if ((a=b) > 0) return;.

Variable definition of inPath masks member of same name
Open

            var inPath = Path.join([Config.manualImageDir, image]);
Severity: Info
Found in src/generators/Manual.hx by haxe-checkstyle

Checks that a local variable or a parameter does not shadow a field that is defined in the same class.

Too many parameters for function: genPage (> 7)
Open

    static function genPage (folder:String, root, sitepage, content, file:String, editLink,additionalStyles,additionalScripts) {
        if (file.startsWith("introduction")) {
            // Shows menu for introduction section. I have no idea why I need this combo of booleans
            // Changing those bools hides the menu in some cases.
            var dir = Path.directory(Path.join([folder, file]));
Severity: Info
Found in src/generators/Pages.hx by haxe-checkstyle

Checks the number of parameters of a method.

Variable definition of posts masks member of same name
Open

        var posts = posts;
Severity: Info
Found in src/generators/Blog.hx by haxe-checkstyle

Checks that a local variable or a parameter does not shadow a field that is defined in the same class.

Parameter definition of posts masks member of same name
Open

    static function list (title:String, posts:Array<Post>, description:String, path:String, ?avatar:String) {
Severity: Info
Found in src/generators/Blog.hx by haxe-checkstyle

Checks that a local variable or a parameter does not shadow a field that is defined in the same class.

Parameter definition of inPath masks member of same name
Open

        inPath:String
Severity: Info
Found in src/generators/Manual.hx by haxe-checkstyle

Checks that a local variable or a parameter does not shadow a field that is defined in the same class.

Redundant Void for method cmd
Open

    static public function cmd(cmd:String, ?params:Array<String>):Void {
        Sys.println('run: $cmd ${params.join(" ")}');

        #if nodejs
        var result = js.node.ChildProcess.spawnSync(cmd, params == null ? [] : params, { shell: true });
Severity: Info
Found in src/Cmd.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Return type not specified for method minifyHtml
Open

    public static inline function minifyHtml(content:String) {
        #if nodejs 
        return content; /* The regex doesn't work on nodejs. */
        #else
        // adapted from http://stackoverflow.com/questions/16134469/minify-html-with-boost-regex-in-c
Severity: Info
Found in src/Utils.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Using the .* form of import should be avoided
Open

import sys.io.*;
Severity: Info
Found in src/DownloadsData.hx by haxe-checkstyle

Checks for import statements that use the * notation and using directives.

Return type not specified for method minifyCss
Open

    public static inline function minifyCss(content:String) {
        #if nodejs 
        return content; /* The regex doesn't work on nodejs. */
        #else
        content = ~/(\/\*\*?(.|\n)+?\*?\*\/)/g.replace(content, "");
Severity: Info
Found in src/Utils.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

String href appears 4 times in the file
Open

                            xml.set("href", '${subLabelMap[href].page.url}#${href}');
Severity: Info
Found in src/generators/Manual.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 href appears 5 times in the file
Open

                            xml.set("href", '${labelMap[splitHref[0]].page.url}#${splitHref[1]}');
Severity: Info
Found in src/generators/Manual.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.

Using the .* form of import should be avoided
Open

import sys.io.*;

Checks for import statements that use the * notation and using directives.

Redundant Void for method processSection
Open

    static function processSection(section:Section):Void {
        // Add header
        section.content = '## ${section.id} ${section.title}\n${section.content}';

        // Include generated files
Severity: Info
Found in src/generators/Manual.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Redundant Void for method generatePages
Open

    static function generatePages(
        section:Section,
        sitemap:Array<SitePage>,
        titleToSection:Map<String, Array<SitePage>>,
        inPath:String
Severity: Info
Found in src/generators/Manual.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Return type not specified for method stripAccents
Open

    static function stripAccents(value:String) {
        var inChars   = ["à", "á", "â", "ã", "ä", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ñ", "ò", "ó", "ô", "õ", "ö", "ù", "ú", "û", "ü", "ý", "ÿ"];
        var outChars  = ["a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "n", "o", "o", "o", "o", "o", "u", "u", "u", "u", "y", "y"];
        for (i in 0 ... inChars.length) {
            value = value.replace(inChars[i], outChars[i]);
Severity: Info
Found in src/generators/Videos.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Redundant Void for method processNode
Open

    static function processNode(xml:Xml):Void {
        if (xml.nodeType == Xml.Element) {
            switch (xml.nodeName) {
                case "a":
                    if (xml.exists("href")) {
Severity: Info
Found in src/generators/Manual.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Redundant Void for method aws
Open

    static function aws(params:Array<String>):Void {
        cmd("aws", params);
    }
Severity: Info
Found in src/Deploy.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Return type not specified for method getVideos
Open

        function getVideos(max:Int) {
            var videos = [];
            for (section in Videos.sections) {
                for (category in section.categories) {
                    if (category.featuredVideos.length > 0) {
Severity: Info
Found in src/generators/Pages.hx by haxe-checkstyle

Warns if Void is used for return or if return type is not specified when returning.

Severity
Category
Status
Source
Language