Showing 1,008 of 1,820 total issues
Function ConvertResourceWatch
has 60 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
var (
m Resource
checkFuncs []ResourceCheckFunc
)
Method raftProxyGen.genClientServerStreamingMethod
has 60 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (g *raftProxyGen) genClientServerStreamingMethod(s *descriptor.ServiceDescriptorProto, m *descriptor.MethodDescriptorProto) {
streamType := s.GetName() + "_" + m.GetName() + "Server"
g.genStreamWrapper(streamType)
Method Cluster.Size
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *Cluster) Size() (n int) {
if m == nil {
return 0
}
var l int
Method SessionMessage.MarshalToSizedBuffer
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *SessionMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
Method Node.processInternalRaftRequest
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (n *Node) processInternalRaftRequest(ctx context.Context, r *api.InternalRaftRequest, cb func()) (proto.Message, error) {
n.stopMu.RLock()
if !n.IsMember() {
n.stopMu.RUnlock()
return nil, ErrStopped
Method controller.Logs
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (r *controller) Logs(ctx context.Context, publisher exec.LogPublisher, options api.LogSubscriptionOptions) error {
if err := r.checkClosed(); err != nil {
return err
}
Function convertMount
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func convertMount(m api.Mount) enginemount.Mount {
mount := enginemount.Mount{
Source: m.Source,
Target: m.Target,
ReadOnly: m.ReadOnly,
Function ConvertExtensionWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Extension
checkFuncs []ExtensionCheckFunc
)
Function ConvertSecretWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Secret
checkFuncs []SecretCheckFunc
)
Function ConvertVolumeWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Volume
checkFuncs []VolumeCheckFunc
)
Function ConvertClusterWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Cluster
checkFuncs []ClusterCheckFunc
)
Function ConvertConfigWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertConfigWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Config
checkFuncs []ConfigCheckFunc
)
Function ConvertNetworkWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Network
checkFuncs []NetworkCheckFunc
)
Function ConvertServiceWatch
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
var (
m Service
checkFuncs []ServiceCheckFunc
)
Method testSuite.TestIPAMNotNil
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (suite *testSuite) TestIPAMNotNil() {
s := store.NewMemoryStore(nil)
suite.NotNil(s)
defer s.Close()
Method Node.JoinAndStart
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (n *Node) JoinAndStart(ctx context.Context) (err error) {
ctx, cancel := n.WithContext(ctx)
defer func() {
cancel()
if err != nil {
Method LogBroker.ListenSubscriptions
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (lb *LogBroker) ListenSubscriptions(request *api.ListenSubscriptionsRequest, stream api.LogBroker_ListenSubscriptionsServer) error {
remote, err := ca.RemoteNode(stream.Context())
if err != nil {
return err
}
Method Collector.Run
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (c *Collector) Run(ctx context.Context) error {
defer close(c.doneChan)
watcher, cancel, err := store.ViewAndWatch(c.store, func(readTx store.ReadTx) error {
nodes, err := store.FindNodes(readTx, store.All)
Function printNetworkSummary
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func printNetworkSummary(network *api.Network) {
w := tabwriter.NewWriter(os.Stdout, 8, 8, 8, ' ', 0)
defer func() {
// Ignore flushing errors - there's nothing we can do.
_ = w.Flush()
Method signHandler.ServeHTTP
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (h *signHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if atomic.LoadUint32(h.flaky) == 1 {
w.WriteHeader(http.StatusInternalServerError)
}