Summary:
Filter out gas linter error checks for fmt.Fprintf commands. This required defining a custom linter around gas that additionally included the offending code.
Notes:
Gas format, without piping it through gometalinter, gives output like this:
$ gas -fmt=csv geth/jail/console/console.go
geth/jail/console/console.go,21,Errors unhandled.,LOW,HIGH,"fmt.Fprintf(w, ""%s: %s"", consoleEventName, formatForConsole(fn.ArgumentList))"
Gometalinter, by default, does not grab the line of code when it filters gas errors. To resolve this, I created a wrapper around gas (I wasn't sure what to call this "gas wrapper", I opted for gasv2, open to other names).
The first part of the regular expression was taken directly from gometalinter (see https://github.com/alecthomas/gometalinter/blob/master/linters.go#L236), and I then appended ,\".*\" to additionally grab the line of code of the offending line. Lastly, I excluded ".*Errors unhandled.*fmt.Fprintf.*" to filter out only fmt.Fprintf errors around omitted errors.
Also as a result of this change, gas lint output will now include the offending code.
Closes#590
* Enable gometalinter on tests and fix static analysis issues
* Remove unneeded change
* Fix additional lint errors
* Add nolint directives and error checks
* Add error assertions instead of nolint directives
* Go back to using lint directive for loop.Run goroutine
* Add error check to loop.Run
The main goal of this change is to remove async operations from node manager.
Additionally all of the signals from node manager are moved to status backend.
All of the async operation now will have the following behaviour:
- If node in the correct state exit immediatly without error
- If node not in the correct state exit immediatly with error
- In all other cases spawn a goroutine with wanted operation
- All the progress regarding that operation will be reported
by using signals
- Signals should be handled in once place, which is StatusBackend
There are 2 potentially breaking changes:
- Empty event field will be ommited when Envelope is sent to a client
- All errors will be delivered to a client as an Envelope, previously
some errors (NodeExists, NoRunningNode) were delivered synchronously
Signed-off-by: Dmitry Shulyak <yashulyak@gmail.com>
* fix sync-and-exit logic
* fix reading from doneSync channel
* clean up
* make statusd before using it
* move syncAndStopNode to different file
* change log level in travis chain sync command
* do not use fmt but log
* add progress log and set timeout to 20 mins
* set datadir to .ethereumtest
* fix datadir
* Fix string printed after compilation is done
On GNU coreutils 8.27, echo prints the \n occurrences as literals. This
commit changes the calls to echo containing such character to calls to
printf, and appends another \n in the end of the line.
* Fix indent