Showing 85 of 107 total issues
Function NewCmdGenerateJekyll
has 6 return statements (exceeds 4 allowed). Open
Open
func NewCmdGenerateJekyll() *cobra.Command {
cmd := &cobra.Command{
Use: "generate-jekyll",
Short: "Generate plugin path help as jekyll pages",
Example: "vault-plugin-docs generate-jekyll",
Function removeCmd
has 6 return statements (exceeds 4 allowed). Open
Open
func removeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "remove REPO",
Short: "Remove a software repository",
DisableFlagsInUseLine: true,
Method NonAtomicTufStore.WalkStagedTargets
has 6 return statements (exceeds 4 allowed). Open
Open
func (store *NonAtomicTufStore) WalkStagedTargets(targetPathList []string, targetsFn tuf.TargetsWalkFunc) error {
store.logger.Debug(fmt.Sprintf("-- NonAtomicTufStore.WalkStagedTargets %v", targetPathList))
ctx := context.Background()
Function GetBackendReferencePages
has 6 return statements (exceeds 4 allowed). Open
Open
func GetBackendReferencePages(ctx context.Context, backend BackendHandle, formatPathLink func(markdownPagePath string) string) ([]*BackendReferencePage, error) {
req := &logical.Request{
Operation: logical.HelpOperation,
Storage: backend.Storage,
Connection: &logical.Connection{},
Function VerifyCommitSignatures
has 6 return statements (exceeds 4 allowed). Open
Open
func VerifyCommitSignatures(repo *git.Repository, commit string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
co, err := repo.CommitObject(plumbing.NewHash(commit))
if err != nil {
return fmt.Errorf("unable to get commit %q: %w", commit, err)
}
Function switchTaskToCompletedInStorage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func switchTaskToCompletedInStorage(ctx context.Context, storage logical.Storage, status taskStatus, uuid string, opts switchTaskToCompletedInStorageOptions) error {
Function VerifyTagSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func VerifyTagSignatures(repo *git.Repository, tagName string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
Function verifyObjectSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func verifyObjectSignatures(repo *git.Repository, objectID string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
Function ValidatePublishConfig
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ValidatePublishConfig(ctx context.Context, publisher publisher.Interface, publisherRepository publisher.RepositoryInterface, config *config.TrdlChannels, logger hclog.Logger) error {
Function VerifyCommitSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func VerifyCommitSignatures(repo *git.Repository, commit string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
Function VerifyPGPSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func VerifyPGPSignatures(pgpSignatures []string, signedReaderFunc func() (io.Reader, error), pgpKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) ([]string, int, error) {
Method Manager.PeriodicFunc
has 5 return statements (exceeds 4 allowed). Open
Open
func (m *Manager) PeriodicFunc(ctx context.Context, req *logical.Request) error {
// lock manager
m.mu.Lock()
defer m.mu.Unlock()
Method Client.saveMeta
has 5 return statements (exceeds 4 allowed). Open
Open
func (c *Client) saveMeta() error {
localDB, err := leveldbstore.FileLocalStore(c.metaLocalStoreDir)
if err != nil {
return fmt.Errorf("unable to init file local store: %w", err)
}
Function processExecArgs
has 5 return statements (exceeds 4 allowed). Open
Open
func processExecArgs(cmd *cobra.Command, args []string) (*execCmdData, error) {
data := &execCmdData{}
data.repoName = args[0]
data.group = args[1]
Method configuration.load
has 5 return statements (exceeds 4 allowed). Open
Open
func (c *configuration) load() error {
if exist, err := util.IsRegularFileExist(c.configPath); err != nil {
return fmt.Errorf("unable to check existence of file %q: %w", c.configPath, err)
} else if !exist {
return nil
Function StartUpdateInBackground
has 5 return statements (exceeds 4 allowed). Open
Open
func StartUpdateInBackground(name string, args []string, backgroundStdoutFile, backgroundStderrFile string) error {
cmd := exec.Command(name, args...)
if backgroundStdoutFile != "" {
f, err := os.Create(backgroundStdoutFile)
Method Client.UpdateRepoChannel
has 5 return statements (exceeds 4 allowed). Open
Open
func (c Client) UpdateRepoChannel(repoName, group, optionalChannel string, autocleanReleases bool) error {
channel, err := c.processRepoOptionalChannel(repoName, optionalChannel)
if err != nil {
return err
}
Method Client.findChannelReleaseDir
has 5 return statements (exceeds 4 allowed). Open
Open
func (c Client) findChannelReleaseDir(group, channel string) (dir, release string, err error) {
release, err = c.GetChannelRelease(group, channel)
if err != nil {
return "", "", err
}
Function LoadKeys
has 5 return statements (exceeds 4 allowed). Open
Open
func LoadKeys(r io.Reader, passphrase []byte) ([]*data.PrivateKey, error) {
pk := &PersistedKeys{}
if err := json.NewDecoder(r).Decode(pk); err != nil {
return nil, fmt.Errorf("error unmarshalling keys json data: %w", err)
Method Client.GetChannelRelease
has 5 return statements (exceeds 4 allowed). Open
Open
func (c Client) GetChannelRelease(group, channel string) (string, error) {
channelFilePath := c.channelPath(group, channel)
exist, err := util.IsRegularFileExist(channelFilePath)
if err != nil {
return "", fmt.Errorf("unable to check existence of file %q: %w", channelFilePath, err)