ankitpokhrel / jira-cli

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
5 months ago9 months old
func Generate has a cyclomatic complexity of 21 with "high" risk
116// Generate generates the config file.
117//
118//nolint:gocyclo
119func (c *JiraCLIConfigGenerator) Generate() (string, error) {120	var cfgFile string
121
122	if cfgFile = viper.ConfigFileUsed(); cfgFile == "" {
func configureProjectAndBoardDetails has a cyclomatic complexity of 21 with "high" risk
477}
478
479//nolint:gocyclo
480func (c *JiraCLIConfigGenerator) configureProjectAndBoardDetails() error {481	project := c.usrCfg.Project
482	board := c.usrCfg.Board
483
func configureServerAndLoginDetails has a cyclomatic complexity of 22 with "high" risk
302}
303
304//nolint:gocyclo
305func (c *JiraCLIConfigGenerator) configureServerAndLoginDetails() error {306	var qs []*survey.Question
307
308	c.value.server = c.usrCfg.Server
func initTable has a cyclomatic complexity of 21 with "high" risk
263}
264
265//nolint:gocyclo
266func (t *Table) initTable() {267	t.view.SetSelectable(true, false).
268		SetSelectedStyle(customTUIStyle(t.style)).
269		SetDoneFunc(func(key tcell.Key) {
func prompt has a cyclomatic complexity of 17 with "high" risk
 67// EXTENDED to augment prompt text and keypress handling.
 68//
 69//nolint:gocyclo
 70func (e *JiraEditor) prompt(initialValue string, config *survey.PromptConfig) (interface{}, error) { 71	err := e.Render(
 72		EditorQuestionTemplate,
 73		// EXTENDED to support printing editor in prompt and BlankAllowed.