[#148] linter: Add funlen linter

Long functions are hard to understand and source of errors

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-03-20 10:01:27 +03:00
parent cc8ff015b4
commit 97c36ed3ec
52 changed files with 76 additions and 0 deletions

View file

@ -171,6 +171,8 @@ type subStorageCfg struct {
// readConfig fills applicationConfiguration with raw configuration values
// not modifying them.
//
// nolint: funlen
func (a *applicationConfiguration) readConfig(c *config.Config) error {
if a._read {
err := c.Reload()
@ -522,6 +524,7 @@ type cfgReputation struct {
var persistateSideChainLastBlockKey = []byte("side_chain_last_processed_block")
// nolint: funlen
func initCfg(appCfg *config.Config) *cfg {
c := &cfg{}
@ -654,6 +657,7 @@ type shardOptsWithID struct {
shOpts []shard.Option
}
// nolint: funlen
func (c *cfg) shardOpts() []shardOptsWithID {
shards := make([]shardOptsWithID, 0, len(c.EngineCfg.shards))