Changeset 1026 for trunk/modules/diagnostics.tcl
- Timestamp:
- 08/29/09 04:42:03 (3 years ago)
- File:
-
- 1 edited
-
trunk/modules/diagnostics.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/diagnostics.tcl
r947 r1026 328 328 } 329 329 330 ### bMotion_diagnostic_parsing 331 # Try to build every abstract we can and make sure it parses ok 332 # This is not run automatically! 333 # This is run as an admin plugin, so it tries to output to the admin stuff 334 proc bMotion_diagnostic_parsing { } { 335 bMotion_putadmin "Counting abstracts..." 336 set all_abstracts [bMotion_abstract_get_names] 337 set all_abstracts_size [llength $all_abstracts] 338 bMotion_putadmin "Found $all_abstracts_size abstracts" 339 340 set broken [list] 341 set errors 0 342 set count_abstract 0 343 set count_lines 0 344 set i 0 345 346 foreach abstract $all_abstracts { 347 incr i 348 if {[expr $i % 10] == 0} { 349 bMotion_putadmin "Processing abstract $i: $abstract..." 350 } 351 set abstract_contents [bMotion_abstract_all $abstract] 352 bMotion_putloglev d * "Processing [llength $abstract_contents] items for abstract $abstract" 353 incr count_abstract 354 foreach content $abstract_contents { 355 incr count_lines 356 set line "" 357 set fail "" 358 catch { 359 set line [bMotion_process_macros "" $content] 360 set line [bMotionDoInterpolation $line "JamesOff" "moretext" "#diagnostics"] 361 # bit of a hack! 362 set line [bMotion_plugin_output_preprocess "#diagnostics" $line] 363 } 364 if {($line == "") || [regexp {%(?!(SETTING|ruser|r?bot|BOT|percent|channel))[^%2\| ]} $line matches moo]} { 365 incr errors 366 lappend broken "$abstract:$content\r\n -> $line" 367 } 368 } 369 } 370 371 bMotion_putadmin "Finished." 372 bMotion_putadmin "$errors errors found in $count_lines lines in $count_abstract abstracts." 373 foreach line $broken { 374 bMotion_putadmin $line 375 } 376 } 377 330 378 ### bMotion_diagnostic_auto <<<1 331 379 proc bMotion_diagnostic_auto { min hr a b c } {
Note: See TracChangeset
for help on using the changeset viewer.
