Skip to content

Refactor Long Functions for Readability #298

@renaz6

Description

@renaz6

Refactor long functions

There are a few long functions that should be refactored and broken up into more readable sections.
By default, the funlen linter has a limit of 60 lines or 40 statements per function. It is the goal to adhere to these standards.
Currently, the funlen linter in this repo is disabled, this should be enabled as part of this issue. It can be enabled by adding it to the enable section of the .golanci.yaml config file.

To Do

  • Enable funlen linter in the .golanci.yaml config file
  • Run the linter golangci-lint run
  • Refactor and break up the functions the linter complains about

Re-assess lines ignored by the linter

At the moment, there are a few lines of code that are ignored by the linter. Re-assess whether or not these should continue to be ignored

To Do

  • Search for nolint in the repo and re-assess the results, remove the ignore if needed
  • Run the linter to make sure no issues are flagged. Fix issues if they are flagged

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions