* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for cfg/common_settings.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for cfg/position_validation.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for cfg/validations.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for checklist/checklist.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for checklist/checklist_item.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/conversions.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Get rid of utils.Home() function
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/homedir.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/text.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Clean up utils/utils.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
Issue #600 points out Jenkins module panics occasionally
I noticed that a number of places panic because of JSON parsing
Centralize JSON parsing, have it return an error, and have widgets
report the error
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same
GetRect can lead to a race condition
Add a RenderFunc method so that we can call try to
wrap even more of our rendering in the thread safe
`QueueUpdateDraw` method
* Some assignments simplified by using assignment operators
* Rewrite switch statement with only one case as if.
* Rewrite if-else chain as a switch statement.
* go fmt `modules/todoist/project.go` file.
Define help with keys
This means that keys and help are automatically in sync
This means that you can't define keys, but forget help
This unfortunately also means that formatting may not be quite as good
There is already default handling of title. Remove instances where people are unknowingly overriding it
For instances where we want to set special things, make sure to use CommonSettings.Title, so people can still override
Rather than referencing wtc.Config, instead pass the global config
Also, look up config for the module early and pass that in sooner, to deal with fewer long paths and get rid of the
ConfigKey variable
If, on startup, a widget's positional configuration is invalid (ie:
cannot be displayed onscreen) then terminate the app and inform about
which widget is erroring