_acs-tcl__naming__proc_naming (private)

 _acs-tcl__naming__proc_naming

Defined in packages/acs-tcl/tcl/test/doc-check-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) _acs-tcl__naming__proc_naming _acs-tcl__naming__proc_naming _acs-tcl__naming__proc_naming->aa_log _acs-tcl__naming__proc_naming->aa_log_result

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set count 0
    set good 0
    set allowedChars {^[a-zA-Z0-9_]+$}
    set allowedToplevel {^(_|(ad|acs|aa|adp|api|apm|chat|db|doc|ds|dt|cr|export|fs|general_comments|lc|news|ns|package|pkg_info|relation|rp|rss|sec|server_cluster|content_search|util|xml)_.+|callback|exec)$}
    set serverModuleProcs {^(h264open|h264length|h264read|h264eof|h264close|dom|bin|zip|transform|md5|base64|berkdb)$}
    set xmlRPC {^system\.(add|listMethods|multicall|methodHelp)$}
    set functionalOps {^f::(-|/)$}
    set internalUse {^(_.+|AcsSc[.].+|callback::.+|install::.+|.*[-](lob|text|gridfs|file))$}
    set prescribed {^((after|before|notifications)-([a-zA-Z0-9_]+))$}
    set nameWarning {public error private warning}

    foreach p [lsort -dictionary [nsv_array names api_proc_doc]] {
        if {[string match "* *" $p]} continue
        set info [nsv_get api_proc_doc $p]
        if {![dict exists $info script]} {
            aa_log "$p has no script (probably a referenced C-level cmd or a proc (no ad_proc)"
        } elseif {[dict get $info script] eq ""} {
            continue
        }
        incr count
        set tail [namespace tail $p]
        set qualifiers [regsub -all -- "::" [namespace qualifiers $p"__"]
        if {[regexp $internalUse $p]
            || [regexp $serverModuleProcs $p]
            || [regexp $functionalOps $p]
            || [regexp $xmlRPC $p]
        } {
            continue
        }
        set protection [expr {[dict exists $info protection] && "public" in [dict get $info protection]
                          ? "public" : "private"}]

        if {![regexp $allowedToplevel $p] && ![string match *::* $p]} {
            if {[dict exists $info deprecated_p] && [dict get $info deprecated_p]} {
                aa_log_result warning "deprecated proc '$p' ($protection) is not in a namespace"
            } else {
                aa_log_result fail "proc '$p' ($protection) is not in a namespace: $info"
            }
        } elseif { (![regexp $allowedChars $tail]
                    || $qualifiers ne ""
                    && ![regexp $allowedChars $qualifiers]
                    )
                   && ![regexp $prescribed $tail]
               } {
            aa_log_result [dict get $nameWarning $protection]  "proc '$p' ($protection): name/namespace contains invalid characters"
        } else {
            incr good
        }
    }
    aa_log "Found $good good of $count checked"
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "naming__proc_naming (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: