Browse Source

whitespace changes and tclint.toml config for tclint LSP

master
Julian Noble 4 weeks ago
parent
commit
e8c1de935e
  1. 25
      src/modules/punk-0.1.tm
  2. 2
      src/modules/punk/console-999999.0a1.0.tm
  3. 1
      src/modules/punk/icomm-999999.0a1.0.tm
  4. 1
      src/modules/punk/jtest.tcl
  5. 1
      src/modules/punk/repl-999999.0a1.0.tm
  6. 34
      tclint.toml

25
src/modules/punk-0.1.tm

@ -1583,7 +1583,7 @@ namespace eval punk {
}
%# {
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%# not string length is not supported"
}
#string length - REVIEW -
@ -1595,7 +1595,7 @@ namespace eval punk {
%%# {
#experimental
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%%# not string length is not supported"
}
#string length - REVIEW -
@ -1606,7 +1606,7 @@ namespace eval punk {
}
%str {
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%str - not string-get is not supported"
}
lappend INDEX_OPERATIONS string-get
@ -1617,7 +1617,7 @@ namespace eval punk {
%sp {
#experimental
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%sp - not string-space is not supported"
}
lappend INDEX_OPERATIONS string-space
@ -1628,7 +1628,7 @@ namespace eval punk {
%empty {
#experimental
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%empty - not string-empty is not supported"
}
lappend INDEX_OPERATIONS string-empty
@ -1638,7 +1638,7 @@ namespace eval punk {
}
@words {
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%words - not list-words-from-string is not supported"
}
lappend INDEX_OPERATIONS list-words-from-string
@ -1650,7 +1650,7 @@ namespace eval punk {
#experimental - leading character based on result not input(?)
#input type is string - but output is list
set active_key_type "list"
if $get_not {
if {$get_not} {
error "!%chars - not list-chars-from-string is not supported"
}
lappend INDEX_OPERATIONS list-from_chars
@ -1662,7 +1662,7 @@ namespace eval punk {
#experimental - flatten one level of list
#join without arg - output is list
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!@join - not list-join-list is not supported"
}
lappend INDEX_OPERATIONS list-join-list
@ -1674,7 +1674,7 @@ namespace eval punk {
#experimental
#input type is list - but output is string
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%join - not string-join-list is not supported"
}
lappend INDEX_OPERATIONS string-join-list
@ -1684,7 +1684,7 @@ namespace eval punk {
}
%ansiview {
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%# not string-ansiview is not supported"
}
lappend INDEX_OPERATIONS string-ansiview
@ -1694,7 +1694,7 @@ namespace eval punk {
}
%ansiviewstyle {
set active_key_type "string"
if $get_not {
if {$get_not} {
error "!%# not string-ansiviewstyle is not supported"
}
lappend INDEX_OPERATIONS string-ansiviewstyle
@ -5368,6 +5368,7 @@ namespace eval punk {
#for var="val {a b c}"
#proc ::punk::val {{v {}}} {tailcall lindex $v}
#proc ::punk::val {{v {}}} {return $v} ;#2023 - approx 2x faster than the tailcall lindex version
#tclint-disable-next-line
proc ::punk::val [list [list v [purelist]]] {return $v}
#----------------
@ -7437,7 +7438,7 @@ namespace eval punk {
foreach v $known_punk {
set c1 [overtype::left $col1 $v]
if {[info exists ::env($v)]} {
set c2 [overtype::left $col2 [set ::env($v)]
set c2 [overtype::left $col2 [set ::env($v)]]
} else {
set c2 [overtype::right $col2 "(NOT SET)"]
}

2
src/modules/punk/console-999999.0a1.0.tm

@ -777,7 +777,7 @@ namespace eval punk::console {
set extension [lindex [split $waitvar($callid) -] 1]
if {$extension eq ""} {
puts "blank extension $waitvar($callid)"
puts "->[set $waitvar($callid]<-"
puts "->[set $waitvar($callid)]<-"
}
puts stderr "get_ansi_response_payload Extending timeout by $extension"
after cancel $timeoutid($callid)

1
src/modules/punk/icomm-999999.0a1.0.tm

@ -711,7 +711,6 @@ namespace eval ::punk::icomm {
#
# Results:
# None.
proc commConfigure {chan {force 0} args} {
variable comm

1
src/modules/punk/jtest.tcl

@ -42,3 +42,4 @@
}
#test
set x blah

1
src/modules/punk/repl-999999.0a1.0.tm

@ -1044,7 +1044,6 @@ namespace eval punk::repl::class {
incr i
}
}
method add_rendered_chunk {rchunk} {
#split only on lf newlines - movement codes and \b \v \r not expected

34
tclint.toml

@ -0,0 +1,34 @@
# patterns to exclude when searching directories. defaults to empty list.
# follows gitignore pattern format: https://git-scm.com/docs/gitignore#_pattern_format
# the one exception is that a leading "#" character will be automatically escaped
#exclude = ["ignore_me/", "ignore*.tcl", "/ignore_from_here"]
# lint violations to ignore. defaults to empty list.
# can also supply an inline table with a path and a list of violations to ignore under that path.
#ignore = [
# "unbraced-expr",
# { path = "files_with_long_lines/", rules = ["line-length"] }
#]
# extensions of files to lint when searching directories. defaults to tcl, sdc,
# xdc, and upf.
extensions = ["tcl", "tm", "sdc"]
# path to command spec defining tool-specific commands and arguments, generated by
# `tclint-plugins make-spec`.
#commands = "~/.tclint/openroad.json"
# with the exception of line-length, the [style] settings affect tclfmt rather than tclint.
[style]
# number of spaces to indent. can also be set to "tab". defaults to 4.
#indent = 2
# maximum allowed line length. defaults to 100.
line-length = 400
# maximum allowed number of consecutive blank lines. defaults to 2.
max-blank-lines = 10
# whether to require indenting of "namespace eval" blocks. defaults to true.
#indent-namespace-eval = false
# whether to expect a single space (true) or no spaces (false) surrounding the contents of a braced expression or script argument.
# defaults to false.
#spaces-in-braces = true
Loading…
Cancel
Save