patch
stringlengths
17
31.2k
y
int64
1
1
oldf
stringlengths
0
2.21M
idx
int64
1
1
id
int64
4.29k
68.4k
msg
stringlengths
8
843
proj
stringclasses
212 values
lang
stringclasses
9 values
@@ -57,6 +57,10 @@ func (ctx *ChannelContext) Cleanup(module string) { // Send send msg to a module. Todo: do not stuck func (ctx *ChannelContext) Send(module string, message model.Message) { + // check if msg is sync + if message.Header.Sync { + klog.Warningf("Get a sync-msg when use beehive.Send(),msg.Header:{%v...
1
package context import ( "errors" "fmt" "sync" "sync/atomic" "time" "k8s.io/klog" "github.com/kubeedge/beehive/pkg/core/model" ) // constants for channel context const ( ChannelSizeDefault = 1024 MessageTimeoutDefault = 30 * time.Second TickerTimeoutDefault = 20 * time.Millisecond ) // ChannelContext i...
1
18,887
In fact it would be useful for debug, i prefer combine them into one debug level log.
kubeedge-kubeedge
go
@@ -24,7 +24,9 @@ var alertDefine = { crash: { target: [ { value: 'Total crashes', name: 'Total crashes' }, - { value: 'New crash occurence', name: 'New crash occurence' } + { value: 'New crash occurence', name: 'New crash occurence' }, + { value: 'None fatal crash per session', name: 'None fatal crash p...
1
var alertDefine = { metric: { target: [ { value: 'Total users', name: 'Total users' }, { value: 'New users', name: 'New users' }, { value: 'Total sessions', name: 'Total sessions' }, { value: 'Average session duration', name: 'Average session duration' }, { value: 'Bounce rate', name: 'Bounce rate (%)...
1
13,133
We would need to localize them eventually too, just FYI
Countly-countly-server
js
@@ -70,7 +70,7 @@ void sequential_model::write_proto(lbann_data::Model* proto) { model::write_proto(proto); //Add layers if (m_comm->am_world_master()) { - proto->set_name(name()); + proto->set_name(type()); for(size_t l = 0; l < m_layers.size(); l++) { auto layer_proto = proto->add_layer(); ...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
13,227
It looks like the proto code needs to change the function name from set_name to set_type to be consistent.
LLNL-lbann
cpp
@@ -0,0 +1,16 @@ +// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). You may +// not use this file except in compliance with the License. A copy of the +// License is located at +// +// http://aws.amazon.com/apache2.0/ +// +...
1
1
21,018
I think we can avoid using this pattern for this use case.
aws-amazon-ecs-agent
go
@@ -25,7 +25,9 @@ #include <pthread.h> #include <pwd.h> #include <signal.h> +#ifndef __ANDROID__ #include <spawn.h> +#endif #include <stdint.h> #include <stdlib.h> #include <string.h>
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Nick Desaulniers * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * right...
1
12,672
Could you please change this to `#ifndef __linux__`? That's when we use our own implementation instead of `posix_spawnp`.
h2o-h2o
c
@@ -139,9 +139,10 @@ public class NodeStatus { return slots.stream().anyMatch(slot -> slot.getSession() == null); } + // Check if the Node's max session limit is not exceeded and has a free slot that supports the capability. public boolean hasCapacity(Capabilities caps) { - return slots.stream() - ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
19,085
Nit: put the `&&` on the previous line so that a reader knows that there's more to the statement at a casual glance.
SeleniumHQ-selenium
java
@@ -49,6 +49,19 @@ func (t RootType) String() string { } } +func tlfTypeToPath(t tlf.Type) string { + switch t { + case tlf.Private: + return string(libkbfs.PrivatePathType) + case tlf.Public: + return string(libkbfs.PublicPathType) + case tlf.SingleTeam: + return string(libkbfs.SingleTeamPathType) + default: +...
1
// Copyright 2017 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libpages import ( "context" "fmt" "strings" "github.com/keybase/client/go/protocol/keybase1" "github.com/keybase/kbfs/libfs" "github.com/keybase/kbfs/lib...
1
19,102
Technically the "right" variables to use would be the ones in `libgit/autogit_node_wrappers.go", which define how the tlf types map to subdirs for autogit specifically. (They would have to be exported.) But this is fine too I guess, just a little dirtier.
keybase-kbfs
go
@@ -27,6 +27,18 @@ class CommunicartMailer < ActionMailer::Base ) end + def notification_for_approver_removed(to_email, approval, alert_partial=nil) + @approval = approval + @alert_partial = alert_partial + proposal = approval.proposal + send_proposal_email( + from_email: user_email_with_nam...
1
class CommunicartMailer < ActionMailer::Base include Roadie::Rails::Automatic layout 'communicart_mailer' add_template_helper CommunicartMailerHelper add_template_helper ValueHelper add_template_helper ClientHelper add_template_helper MarkdownHelper # Approver can approve/reject/take other action def...
1
13,459
Should there be a template or something associated with this email? Right now it's identical to `notification_for_approver`
18F-C2
rb
@@ -67,8 +67,9 @@ class SliderController extends AdminBaseController */ public function listAction() { - $queryBuilder = $this->getDoctrine()->getManager()->createQueryBuilder(); - $queryBuilder + /** @var \Doctrine\ORM\EntityManager $em */ + $em = $this->getDoctrine()->getMa...
1
<?php namespace Shopsys\FrameworkBundle\Controller\Admin; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Shopsys\FrameworkBundle\Component\Domain\AdminDomainTabsFacade; use Shopsys\FrameworkBundle\Component\Grid\GridFactory; use Shopsys\FrameworkBundle\Component\Grid\QueryBuilderDataSource; use Shops...
1
16,297
i hope there is some extension in phpstan for this
shopsys-shopsys
php
@@ -1025,6 +1025,7 @@ public class Dictionary { assert morphSep > 0; assert morphSep > flagSep; int sep = flagSep < 0 ? morphSep : flagSep; + if (sep == 0) return 0; CharSequence toWrite; String beforeSep = line.substring(0, sep);
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
40,746
We don't store empty dictionary entries anymore: they bring no benefits, only trouble.
apache-lucene-solr
java
@@ -625,6 +625,15 @@ class CppGenerator : public BaseGenerator { return false; } + bool VectorElementUserFacing(const Type& type) const { + // Normally, in non-Object-API, we use the non-user-facing type when + // emitting the Vector element type, however in the case of enums + // we want to avoid t...
1
/* * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
1
17,693
Optional: This function is C++ specific and could be declared as `static`.
google-flatbuffers
java
@@ -831,13 +831,15 @@ public class ZMSClient implements Closeable { * * @param domainName name of the domain * @param members include all members for group roles as well + * @param tagKey query all roles with given tag name + * @param tagValue query all roles with given tag key and val...
1
/* * Copyright 2016 Yahoo Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
5,480
we can't remove functions as that would introduce backward compatibility issues in our java client. So we should also have a function with the original arguments: ` public Roles getRoles(String domainName, Boolean members) { return getRoles(domainName, members, null, null); } ` For the Go client we don't have a wrapper...
AthenZ-athenz
java
@@ -32,5 +32,12 @@ ADDITIONAL def warn_deprecation(message) warn message end + + # @private + # + # Used internally to send deprecation warnings to io + def warn(message) + RSpec.configuration.deprecation_io.puts(message) + end end end
1
module RSpec class << self # @private # # Used internally to print deprecation warnings def deprecate(method, alternate_method=nil, version=nil) version_string = version ? "rspec-#{version}" : "a future version of RSpec" message = <<-NOTICE ***********************************************...
1
8,827
I'd recommend keeping this in `warn_deprecation` and not adding an override of `warn`.
rspec-rspec-core
rb
@@ -0,0 +1,10 @@ +// Startup script for Phusion Passenger that uses next.js cli +// Run `blitz build` before starting +const path = require('path') + +const blitzPath = path.join(__dirname, 'node_modules', 'next', 'dist', 'bin', 'next'); + +process.argv.length = 1; +process.argv.push(blitzPath, 'start'); + +require(bli...
1
1
12,573
I think we should use a `blitz` bin instead
blitz-js-blitz
js
@@ -101,7 +101,10 @@ class DictInterface(Interface): @classmethod def validate(cls, dataset): - dimensions = dataset.dimensions(label='name') + if dataset._virtual_vdims: + dimensions = dataset.dimensions('key', label='name') + else: + dimensions = dataset.dimensio...
1
from collections import OrderedDict from itertools import compress try: import itertools.izip as zip except ImportError: pass import numpy as np from .interface import Interface, DataError from ..dimension import Dimension from ..element import Element from ..dimension import OrderedDict as cyODict from ..nd...
1
18,936
Why not make the ``derived_vdims`` flag (or similar, ``validate_vdims`` maybe?) an explicit argument to ``validate``?
holoviz-holoviews
py
@@ -155,6 +155,16 @@ func (s *VolumeServer) create( err.Error()) } + if spec.IsPureVolume() { + id, err = s.driver(ctx).Create(locator, source, spec) + if err != nil { + return "", status.Errorf( + codes.Internal, + "Failed to create snapshot for Pure FA volume: %v", + err.Error()) + } +...
1
/* Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required...
1
8,991
was it not possible to do this at the filter or porx driver layer? We typically try to avoid driver-specific things in the SDK layer
libopenstorage-openstorage
go
@@ -1,3 +1,19 @@ +/* + * Copyright 2012 LinkedIn Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by ap...
1
package azkaban.user; /** * Lambda interface for parsing user config file. */ public interface ParseConfigFile { void parseConfigFile(); }
1
17,973
please update the year. it can be setup in intellij template.
azkaban-azkaban
java
@@ -144,6 +144,16 @@ public class PreventTokenLoggingTests { passSlf4j("log.trace(message);"); } + @Test + public void testSlf4jTraceNullMessageNoArgs() { + passSlf4j("log.trace(null);"); + } + + @Test + public void testSlf4jTraceNullArg() { + passSlf4j("log.trace(message, a...
1
/* * (c) Copyright 2019 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1
7,060
what's the use-case for this?
palantir-gradle-baseline
java
@@ -1281,6 +1281,9 @@ class _Frame(object): raise ValueError("Grouper for '{}' not 1-dimensional".format(type(by))) if not len(by): raise ValueError('No group keys passed!') + if not isinstance(as_index, bool): + raise TypeError('as_index must be an boolean; however,...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
14,069
nit: `as_index must be an boolean` -> `as_index must be a boolean`
databricks-koalas
py
@@ -26,5 +26,7 @@ interface BaseModuleInterface public function postDeactivation(ConnectionInterface $con = null); + public function update($currentVersion, $newVersion, ConnectionInterface $con = null); + public function destroy(ConnectionInterface $con = null, $deleteModuleData = false); }
1
<?php /*************************************************************************************/ /* This file is part of the Thelia package. */ /* */ /* Copyright (c) OpenStudio ...
1
11,562
What is the goal of that method ? And what are `$currentVersion` and `$newVersion` ? Are they Thelia or Module version ? :)
thelia-thelia
php
@@ -34,6 +34,8 @@ function assertServerError (res) { } module.exports = class AwsS3Multipart extends Plugin { + static VERSION = require('../package.json').version + constructor (uppy, opts) { super(uppy, opts) this.type = 'uploader'
1
const { Plugin } = require('@uppy/core') const { Socket, Provider, RequestClient } = require('@uppy/companion-client') const emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress') const getSocketHost = require('@uppy/utils/lib/getSocketHost') const limitPromises = require('@uppy/utils/lib/limitPromises') co...
1
11,947
Is there an advantage to this vs setting `this.version` in the constructor? Cleaner this way, at the top?
transloadit-uppy
js
@@ -270,7 +270,7 @@ public class OAuthWebviewHelper { * @return login url */ protected String getLoginUrl() { - return SalesforceSDKManager.getInstance().getLoginServerManager().getSelectedLoginServer().url; + return SalesforceSDKManager.getInstance().getLoginServerManager().getSelectedLoginSer...
1
/* * Copyright (c) 2011-2012, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright notice,...
1
13,802
Fix for URISyntaxException.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -121,6 +121,10 @@ mainLoop: logrus.WithField("route", routeUpd).Debug("Ignoring route with no link index.") continue } + if routeUpd.Dst == nil { + logrus.WithField("route", routeUpd).Debug("Ignoring route with no destination") + continue + } idx := routeUpd.LinkIndex oldUpds := upd...
1
// Copyright (c) 2020-2021 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
19,028
Would be good to UT this case
projectcalico-felix
c
@@ -44,6 +44,8 @@ module.exports = { 'arrow-body-style': ['warn', 'as-needed'], 'no-param-reassign': ['error', { props: false }], 'import/prefer-default-export': 'off', + 'import/no-extraneous-dependencies': 'off', + 'import/no-unresolved': 'off', 'no-console': 'off', 'eol-last': ['error'...
1
module.exports = { env: { browser: true, es6: true, 'jest/globals': true, }, extends: [ 'airbnb', 'plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint', 'plugin:prettier/recommended', ], globals: { Atomics: 'readonly', SharedArrayBuffer: 're...
1
14,558
Why we need to add this?
HospitalRun-hospitalrun-frontend
js
@@ -1,6 +1,6 @@ -require 'spec_helper' +require 'rails_helper' -describe Api::V1::CompletionsController, '#show' do +describe Api::V1::CompletionsController, '#show', type: :controller do it 'returns a 401 when users are not authenticated' do get :index expect(response.code).to eq "401"
1
require 'spec_helper' describe Api::V1::CompletionsController, '#show' do it 'returns a 401 when users are not authenticated' do get :index expect(response.code).to eq "401" end end
1
10,598
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -2259,11 +2259,12 @@ type JSInfo struct { Disabled bool `json:"disabled,omitempty"` Config JetStreamConfig `json:"config,omitempty"` JetStreamStats - StreamCnt int `json:"total_streams,omitempty"` - ConsumerCnt int `json:"total_consumers,omitempty"` - MessageCnt uint64 ...
1
// Copyright 2013-2019 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
12,690
This is ok to change since I believe that these were added just in main and not in public release.
nats-io-nats-server
go
@@ -26,7 +26,7 @@ import ( ) func MakeAuditLogsOrDie(client *Client, - auditlogsName, methodName, project, resourceName, serviceName, targetName string, + auditlogsName, methodName, project, resourceName, serviceName, targetName, pubsubServiceAccount string, so ...kngcptesting.CloudAuditLogsSourceOption, ) { s...
1
/* Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
11,456
Not needed in this PR, just want to make sure people think about this (maybe make an issue)? This is a lot of strings in a row. It will be hard/impossible for someone reading the code to see that everything is in the correct position. I recommend creating a struct instead of passing seven strings in a row. A similar pr...
google-knative-gcp
go
@@ -197,6 +197,16 @@ namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk { _issueLogJsonWriter.CloseResults(); + if (_run.ConfigurationNotifications != null) + { + _issueLogJsonWriter.WriteConfigurationNotifications(_run.ConfigurationNotific...
1
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Writ...
1
10,727
_jaw drops_ I would have sworn I wrote those lines. Good catch.
microsoft-sarif-sdk
.cs
@@ -3,6 +3,7 @@ // Clean up after resolve / reject function cleanup() { + axe._memoizedFns.forEach(fn => fn.clear()); axe._cache.clear(); axe._tree = undefined; axe._selectorData = undefined;
1
/*global Context */ /*exported runRules */ // Clean up after resolve / reject function cleanup() { axe._cache.clear(); axe._tree = undefined; axe._selectorData = undefined; } /** * Starts analysis on the current document and its subframes * @private * @param {Object} context The `Context` specification obje...
1
15,098
This needs to be tested.
dequelabs-axe-core
js
@@ -1019,4 +1019,18 @@ describe Mongoid::Relations::Embedded::One do end end end + + context "when parent validation of child is set to false" do + + let(:building) do + building = Building.create + building.building_address = BuildingAddress.new + building.save + building.reload ...
1
require "spec_helper" describe Mongoid::Relations::Embedded::One do describe "#===" do let(:base) do Person.new end let(:target) do Name.new end let(:metadata) do Person.relations["name"] end let(:relation) do described_class.new(base, target, metadata) en...
1
11,252
I believe you're missing the comparison after 'be'
mongodb-mongoid
rb
@@ -94,12 +94,15 @@ func (s *KVStoreForTrie) Put(key []byte, value []byte) error { func (s *KVStoreForTrie) Get(key []byte) ([]byte, error) { trieKeystoreMtc.WithLabelValues("get").Inc() v, err := s.cb.Get(s.bucket, key) - if err != nil { - if v, err = s.dao.Get(s.bucket, key); err != nil { - return nil, errors...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
16,760
move 103~105 to in front of 97?
iotexproject-iotex-core
go
@@ -2,6 +2,9 @@ package com.fsck.k9.helper; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher;
1
package com.fsck.k9.helper; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.content.Context; import android.database.Cursor; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Handler; import and...
1
17,363
Lots of unnecessary imports left in this file.
k9mail-k-9
java
@@ -805,8 +805,9 @@ bool CoreChecks::ValidateDescriptorSetBindingData(const CMD_BUFFER_STATE *cb_nod for (uint32_t i = index_range.start; i < index_range.end; ++i, ++array_idx) { uint32_t index = i - index_range.start; const auto *descriptor = descriptor_set->GetDescriptorFromGlobalIn...
1
/* Copyright (c) 2015-2021 The Khronos Group Inc. * Copyright (c) 2015-2021 Valve Corporation * Copyright (c) 2015-2021 LunarG, Inc. * Copyright (C) 2015-2021 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You m...
1
15,470
Does this actually produce different code?
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -0,0 +1,7 @@ +if (node.getAttribute('onFocus') === 'this.blur()') { + return false; +} +if (node.getAttribute('onFocus').indexOf('this.blur()') > -1) { + return undefined; +} +return true;
1
1
13,307
This should account for whitespace. Simply putting `.trim()` on the attribute value should do.
dequelabs-axe-core
js
@@ -105,6 +105,9 @@ func newVXLANManager( blackHoleProto = dpConfig.DeviceRouteProtocol } + noencTarget := routetable.Target{Type: routetable.TargetTypeNoEncap} + bhTarget := routetable.Target{Type: routetable.TargetTypeBlackhole} + brt := routetable.New( []string{routetable.InterfaceNone}, 4,
1
// Copyright (c) 2016-2021 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
19,551
I don't think we need these. Simpler just to put `routetable.TargetType...` inline below.
projectcalico-felix
go
@@ -176,6 +176,11 @@ def get_port_from_custom_rules(method, path, data, headers): # assume that this is an S3 POST request with form parameters or multipart form in the body return config.PORT_S3 + if stripped and '/' in stripped: + if method == 'PUT': + # assume that th...
1
import re import os import sys import json import logging from requests.models import Response from localstack import config from localstack.services import plugins from localstack.constants import ( HEADER_LOCALSTACK_TARGET, HEADER_LOCALSTACK_EDGE_URL, LOCALSTACK_ROOT_FOLDER, PATH_USER_REQUEST) from localstack.uti...
1
11,392
Nested if statement. You can merge both statements nested together to create one
localstack-localstack
py
@@ -45,6 +45,15 @@ public abstract class AbstractTest { return System.getProperty("java.version").startsWith("9."); } + protected boolean isJava10() { + return System.getProperty("java.version").startsWith("10."); + } + + protected boolean isJavaVersionAbove9() { + String jdkVersi...
1
/* * Copyright 2016 Federico Tomassetti * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
1
12,541
Nitpick: add a space after the comma. Also, we should consider that the format of the version could change in the future so we could get something that is not a parsable integer.
javaparser-javaparser
java
@@ -31,7 +31,7 @@ TEST(Load, SSTLoad) { EXPECT_EQ(ResultCode::SUCCESSED, engine->ingest(files)); std::string result; - EXPECT_EQ(ResultCode::SUCCESSED, engine->get("key", result)); + EXPECT_EQ(ResultCode::SUCCESSED, engine->get("key", &result)); EXPECT_EQ(result, "value"); } } // namespace kv...
1
/* Copyright (c) 2018 - present, VE Software Inc. All rights reserved * * This source code is licensed under Apache 2.0 License * (found in the LICENSE.Apache file in the root directory) */ #include "base/Base.h" #include <gtest/gtest.h> #include <rocksdb/db.h> #include <rocksdb/slice.h> #include <rocksdb/options...
1
14,612
For your reference in future, I sugguest to use the `ASSERT_*` family.
vesoft-inc-nebula
cpp
@@ -68,6 +68,7 @@ #include "modify.h" #include "universe.h" #include "variable.h" +#include "fmt/format.h" #include <cstring>
1
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://lammps.sandia.gov/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC...
1
29,416
no need to import `fmt/format.h` here since the `KimInit` class is derived from `Pointers`. Any class derived from `Pointers` can assumed that `lmptype.h`, `mpi.h`, `cstddef`, `cstdio`, `string`, `utils.h` and `fmt/format.h` are already included through `pointers.h`.
lammps-lammps
cpp
@@ -17,7 +17,10 @@ limitations under the License. package v1alpha1 import ( + "os" + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/types" apis "github.com/openebs/maya/pkg/apis/openebs.io/upgrade/v1alpha1" cast "github.com/openebs/maya/pkg/castemplate/v1alpha1"
1
/* Copyright 2019 The OpenEBS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
1
13,991
Can we have prefix of `OPENEBS_IO` e.g.: `OPENEBS_IO_INSTANCE_NAME`
openebs-maya
go
@@ -1059,8 +1059,14 @@ func (fbo *folderBranchOps) GetTLFCryptKeys(ctx context.Context, func (fbo *folderBranchOps) GetOrCreateRootNode( ctx context.Context, h *TlfHandle, branch BranchName) ( node Node, ei EntryInfo, err error) { - err = errors.New("GetOrCreateRootNode is not supported by " + - "folderBranchOps"...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "errors" "fmt" "strings" "sync" "time" "github.com/keybase/backoff" "github.com/keybase/client/go/logger" keybase1 "github.com/keybase...
1
11,838
Might as well fix these bare returns by making them `return errors.New(...` directly.
keybase-kbfs
go
@@ -66,7 +66,7 @@ public class Benchmarks { .sender(Address.ZERO) .value(Wei.ZERO) .apparentValue(Wei.ZERO) - .code(new Code(Bytes.EMPTY)) + .code(new Code(Bytes.EMPTY, org.hyperledger.besu.datatypes.Hash.EMPTY)) .depth(1) .completer(__ -> {}) ...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
26,086
we can use import here
hyperledger-besu
java
@@ -35,8 +35,6 @@ func EchoBehavior(addr string) Result { ctx, // TODO get Service from client &json.Request{ - Caller: "client", - Service: "yarpc-test", Procedure: "echo", Body: &server.EchoRequest{Token: token}, TTL: 3 * time.Second,
1
package client import ( "crypto/rand" "encoding/base64" "fmt" "io" "io/ioutil" "time" "github.com/yarpc/yarpc-go" "github.com/yarpc/yarpc-go/crossdock/server" "github.com/yarpc/yarpc-go/encoding/json" "github.com/yarpc/yarpc-go/transport" "github.com/yarpc/yarpc-go/transport/http" "golang.org/x/net/conte...
1
9,226
thx for removing these
yarpc-yarpc-go
go
@@ -55,7 +55,11 @@ public final class XmlReportFailuresSupplier implements FailuresSupplier { @Override public List<Failure> getFailures() throws IOException { File sourceReport = reporting.getReports().findByName("xml").getDestination(); - return XmlUtils.parseXml(reportHandler, new FileInput...
1
/* * (c) Copyright 2017 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
1
7,401
I snuck this one in as well as checkstyle crashing (on files from resources) caused an unfinished xml to be written, and it wasn't obvious where that XML was
palantir-gradle-baseline
java
@@ -542,6 +542,7 @@ func TestCreateInstanceValidateMachineType(t *testing.T) { shouldErr bool }{ {"good case", fmt.Sprintf("projects/%s/zones/%s/machineTypes/%s", testProject, testZone, testMachineType), false}, + {"good case2", fmt.Sprintf("projects/%s/zones/%s/machineTypes/%s", testProject, testZone, testMac...
1
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
6,819
How is this different than "good case"?
GoogleCloudPlatform-compute-image-tools
go
@@ -33,7 +33,7 @@ const ( // Client is wrapper of ECS client. type Client interface { - ServiceExists(ctx context.Context, clusterName string, services []string) (bool, error) + ServiceExists(ctx context.Context, clusterName string, services string) (bool, error) CreateService(ctx context.Context, service types.S...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
15,335
the last parameter name should be `serviceName` as is in the implementation
pipe-cd-pipe
go
@@ -178,7 +178,7 @@ public class PrettyPrintVisitorTest { @Test public void multilineJavadocGetsFormatted() { CompilationUnit cu = new CompilationUnit(); - cu.addClass("X").addMethod("abc").setJavadocComment(" line1\n line2 *\n * line3"); + cu.addClass("X").addMethod("abc").setJavadoc...
1
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the ...
1
12,161
@ftomassetti - okay, this is a little meh.
javaparser-javaparser
java
@@ -11,7 +11,8 @@ import ( // Portable analogs of some common system call errors. var ( - ErrUnsupported = errors.New("operation not supported") + errUnsupported = errors.New("operation not supported") + notImplemented = errors.New("os: not implemented") ) // Stdin, Stdout, and Stderr are open Files pointing to...
1
// Package os implements a subset of the Go "os" package. See // https://godoc.org/os for details. // // Note that the current implementation is blocking. This limitation should be // removed in a future version. package os import ( "errors" ) // Portable analogs of some common system call errors. var ( ErrUnsuppor...
1
7,314
Note, changed initial capitalisation of this for consistency. Can do it the other way around too if that'd be better. :wink:
tinygo-org-tinygo
go
@@ -11,7 +11,7 @@ if (typeof define === 'function' && define.amd) { }); } if (typeof module === 'object' && module.exports && typeof axeFunction.toString === 'function') { - axe.source = '(' + axeFunction.toString() + ')(this, this.document);'; + axe.source = '(' + axeFunction.toString() + ')(typeof window ==...
1
/*exported axe, commons */ /*global axeFunction, module, define */ // exported namespace for aXe var axe = axe || {}; axe.version = '<%= pkg.version %>'; if (typeof define === 'function' && define.amd) { define([], function () { 'use strict'; return axe; }); } if (typeof module === 'object' && module.exports && ...
1
11,121
hey, aren't we supposed to be passing in two parameters here?
dequelabs-axe-core
js
@@ -18,6 +18,7 @@ bitcore.encoding.BufferWriter = require('./lib/encoding/bufferwriter'); bitcore.encoding.Varint = require('./lib/encoding/varint'); // main bitcoin library +bitcore.Unit = require('./lib/unit'); bitcore.Address = require('./lib/address'); bitcore.BIP32 = require('./lib/bip32'); bitcore.Block = ...
1
var bitcore = module.exports; // crypto bitcore.crypto = {}; bitcore.crypto.BN = require('./lib/crypto/bn'); bitcore.crypto.ECDSA = require('./lib/crypto/ecdsa'); bitcore.crypto.Hash = require('./lib/crypto/hash'); bitcore.crypto.Random = require('./lib/crypto/random'); bitcore.crypto.Point = require('./lib/crypto/p...
1
13,195
please keep alphabetical ordering :)
bitpay-bitcore
js
@@ -43,11 +43,14 @@ import org.openqa.selenium.remote.internal.CircularOutputStream; import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; import java.net.ConnectException; ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
12,020
Selenium must compile against Java 6. Revert this line.
SeleniumHQ-selenium
py
@@ -147,7 +147,7 @@ func (r *Reconciler) reconcilePullSubscription(ctx context.Context, source *v1al logging.FromContext(ctx).Desugar().Error("Failed to get PullSubscription", zap.Error(err)) return nil, fmt.Errorf("failed to get PullSubscription: %w", err) } - newPS := resources.MakePullSubscription(source...
1
/* Copyright 2019 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
10,076
what is that `""`, the adapterType? can you add `"" /* adapterType */`... in other places as well... might be cleaner if it's a pointer or some varargs at the end but don't have any strong preference..
google-knative-gcp
go
@@ -2003,7 +2003,8 @@ Document.prototype.$__dirty = function() { // gh-2558: if we had to set a default and the value is not undefined, // we have to save as well all = all.concat(this.$__.activePaths.map('default', function(path) { - if (path === '_id' || !_this.getValue(path)) { + var pType = typeof _t...
1
'use strict'; /*! * Module dependencies. */ const EventEmitter = require('events').EventEmitter; const InternalCache = require('./internal'); const MongooseError = require('./error'); const MixedSchema = require('./schema/mixed'); const Schema = require('./schema'); const ObjectExpectedError = require('./error/obje...
1
13,765
This check is a little odd, and will still mess up with empty strings `''` because empty string is falsy. Can we change this to `|| _this.getValue(path) == null`?
Automattic-mongoose
js
@@ -0,0 +1,13 @@ +/** + * Note: + * Check + * - if element is focusable + * - if element is in focus order via `tabindex` + */ +const isFocusable = virtualNode.isFocusable; + +let tabIndex = virtualNode.actualNode.getAttribute('tabindex'); +tabIndex = + tabIndex && !isNaN(parseInt(tabIndex, 10)) ? parseInt(tabIndex) : ...
1
1
14,080
Just a minor suggestion: If you `parseInt` when you access the attribute then you shouldn't have to do it twice in the ternary.
dequelabs-axe-core
js
@@ -241,6 +241,7 @@ describe "BoltServer::TransportApp" do password: target[:password], port: target[:port] }) + body[:target]['host-key-check'] = false if transport == 'ssh' post(path, JSON.generate(...
1
# frozen_string_literal: true require 'spec_helper' require 'bolt_spec/bolt_server' require 'bolt_spec/conn' require 'bolt_spec/file_cache' require 'bolt_server/config' require 'bolt_server/transport_app' require 'json' require 'rack/test' describe "BoltServer::TransportApp" do include BoltSpec::BoltServer includ...
1
11,751
This change in particular is strange. I'm not sure why it would now be necessary. The previous default would've been true, and the default behavior without a new net-ssh version should be unchanged.
puppetlabs-bolt
rb
@@ -25,7 +25,7 @@ class BatchActionFormModel /** * @Assert\Type("boolean") */ - public bool $autoEndOnErrors = true; + public ?bool $autoEndOnErrors = true; /** * @Assert\Valid()
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\BatchAction\Application\Form\Model; use Ergonode\BatchAction\Application\Validator\AllFilterDisabled; use Symfony\Component\Validator\Constraints as Ass...
1
9,631
Why is that? Should be redundant as the default value exists.
ergonode-backend
php
@@ -252,6 +252,7 @@ type Config struct { DebugSimulateCalcGraphHangAfter time.Duration `config:"seconds;0"` DebugSimulateDataplaneHangAfter time.Duration `config:"seconds;0"` DebugPanicAfter time.Duration `config:"seconds;0"` + DebugSimulateDataRace bool `config:"bool;false"` ...
1
// Copyright (c) 2020 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
18,007
Are all fields beginning with "Debug" automatically `;local` ? (I guess so, but just checking.)
projectcalico-felix
c
@@ -115,6 +115,13 @@ public interface Table { */ UpdateSchema updateSchema(); + /** + * Create a new {@link UpdateNameMapping} to update name mapping of this table and commit the change. + * + * @return a new {@link UpdateNameMapping} + */ + UpdateNameMapping updateNameMapping(); + /** * Creat...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
18,141
While I think it makes sense to update the mapping programmatically, I don't see much value in exposing it as part of the table API. We want to keep the Table API small, so if we can handle this by using a separate API that consumes and produces JSON, then that is preferred. Also, we may have more than one mapping in t...
apache-iceberg
java
@@ -540,7 +540,7 @@ static Int64 SikGcInterval = -1; void SsmpGlobals::work() { - getIpcEnv()->getAllConnections()->waitOnAll(getStatsMergeTimeout()); + getIpcEnv()->getAllConnections()->waitOnAll(0); finishPendingSscpMessages(); // Cleanup IpcEnvironment
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
1
22,806
We would want ssmp to wake up every 3 seconds if there are no other requests to it and do some cleanup tasks. So, it is not clear why do you want to set this to 0.
apache-trafodion
cpp
@@ -252,6 +252,13 @@ func Compile(pkgName string, machine llvm.TargetMachine, config *compileopts.Con c.loadASTComments(lprogram) + // Forcibly preload special types. + runtimePkg := c.ir.Program.ImportedPackage("runtime") + c.getLLVMType(runtimePkg.Type("_interface").Type()) + c.getLLVMType(runtimePkg.Type("_str...
1
package compiler import ( "debug/dwarf" "errors" "fmt" "go/ast" "go/build" "go/constant" "go/token" "go/types" "os" "path/filepath" "strconv" "strings" "github.com/tinygo-org/tinygo/compileopts" "github.com/tinygo-org/tinygo/compiler/llvmutil" "github.com/tinygo-org/tinygo/goenv" "github.com/tinygo-or...
1
9,256
Is this really necessary? I would expect these types to be included with the loop below.
tinygo-org-tinygo
go
@@ -41,8 +41,17 @@ namespace OpenTelemetry.Exporter.Jaeger.Implementation traceId.CopyTo(bytes); - this.High = BitConverter.ToInt64(bytes, 0); - this.Low = BitConverter.ToInt64(bytes, 8); + if (BitConverter.IsLittleEndian) + { + Array.Reverse(b...
1
// <copyright file="Int128.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/l...
1
12,536
You could do span<byte> and it's magic of typecast to int for better efficiency
open-telemetry-opentelemetry-dotnet
.cs
@@ -87,8 +87,9 @@ Object.keys(rulesGroupByDocumentFragment).forEach(key => { return; } - // check if transform style exists - const transformStyleValue = cssRule.style.transform || false; + // check if transform style exists (don't forget vendor prefixes) + const transformStyleValue = + cssRule.st...
1
/* global context */ // extract asset of type `cssom` from context const { cssom = undefined } = context || {}; // if there is no cssom <- return incomplete if (!cssom || !cssom.length) { return undefined; } // combine all rules from each sheet into one array const rulesGroupByDocumentFragment = cssom.reduce( (out...
1
14,518
Looks like you've covered `-webkit-transform`, but what about `-ms-transform`?
dequelabs-axe-core
js
@@ -241,15 +241,10 @@ namespace MvvmCross.Droid.Support.V7.RecyclerView protected virtual void OnItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - if (Looper.MainLooper == Looper.MyLooper()) - { - NotifyDataSetChanged(e); - ...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; using System.Collections; using System.Collections.Specialized; using System.Windows.Input; using A...
1
14,876
Is there something missing from the message here?
MvvmCross-MvvmCross
.cs
@@ -48,3 +48,14 @@ from luigi import event from luigi.event import Event from .tools import range # just makes the tool classes available from command line + + +__all__ = [ + 'task', 'Task', 'Config', 'ExternalTask', 'WrapperTask', 'namespace', + 'target', 'Target', 'File', 'LocalTarget', 'rpc', 'RemoteSched...
1
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
1
12,824
Hmm, what does this syntax mean?
spotify-luigi
py
@@ -98,7 +98,12 @@ func (r *nDCActivityReplicatorImpl) SyncActivity( RunId: request.RunId, } - context, release, err := r.historyCache.getOrCreateWorkflowExecution(ctx, namespaceID, execution) + context, release, err := r.historyCache.getOrCreateWorkflowExecution( + ctx, + namespaceID, + execution, + ca...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
11,844
should this be callerTypeTask?
temporalio-temporal
go
@@ -56,6 +56,10 @@ class PlanPolicy < ApplicationPolicy @plan.administerable_by?(@user.id) end + def set_test? + @plan.administerable_by?(@user.id) + end + # TODO: These routes are no lonmger used =begin def section_answers?
1
class PlanPolicy < ApplicationPolicy attr_reader :user attr_reader :plan def initialize(user, plan) raise Pundit::NotAuthorizedError, "must be logged in" unless user @user = user @plan = plan end def show? @plan.readable_by?(@user.id) end def edit? @plan.readable_by?(@user.id) end...
1
16,784
Currently update is set as @plan.editable_by?(@user.id) Which one is the correct behavior? I can see a case for only owners/co-owners to be able to set visibility, test status, and other plan details
DMPRoadmap-roadmap
rb
@@ -47,8 +47,7 @@ namespace Nethermind.Blockchain private readonly LruCache<Keccak, BlockHeader> _headerCache = new LruCache<Keccak, BlockHeader>(CacheSize); private readonly LruCache<long, ChainLevelInfo> _blockInfoCache = new LruCache<long, ChainLevelInfo>(CacheSize); - private const int Ma...
1
/* * Copyright (c) 2018 Demerzel Solutions Limited * This file is part of the Nethermind library. * * The Nethermind library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the...
1
22,573
Maybe make it configurable? Or store the actual level index in DB, making this binary search obsolete?
NethermindEth-nethermind
.cs
@@ -66,6 +66,7 @@ public class HiveTableBaseTest extends HiveMetastoreTest { tableLocation.getFileSystem(hiveConf).delete(tableLocation, true); catalog.dropTable(TABLE_IDENTIFIER, false /* metadata only, location was already deleted */); } + private static String getTableBasePath(String tableName) { ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
22,085
Nit: this file doesn't need to change. Can you revert this to avoid git conflicts?
apache-iceberg
java
@@ -66,7 +66,7 @@ function HelpMenu( { children } ) { const handleMenuSelected = useCallback( () => { toggleMenu( false ); - } ); + }, [] ); return ( <div className="googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu googlesitekit-help-menu mdc-menu-surface--anchor">
1
/** * HelpMenu component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * ...
1
37,754
There's no reason for this to be a callback now technically but as per our tech decision, we want all handlers to use `useCallback` now
google-site-kit-wp
js
@@ -33,6 +33,7 @@ const ( BalanceRecord HashID = "BR" Credential HashID = "CR" Genesis HashID = "GE" + Logic HashID = "LO" Message HashID = "MX" NetPrioResponse HashID = "NPR" OneTimeSigKey1 HashID = "OT1"
1
// Copyright (C) 2019 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
1
36,072
This isn't strictly part of this PR, but could you move `multiSigString` from `crypto/multisig.go` into this list of `HashID` values? Now that we have other things being hashed into addresses (specifically, these new logic addresses), it's important that the hash input for multisig addrs is domain-separated from logic ...
algorand-go-algorand
go
@@ -0,0 +1,8 @@ +from django.test import TestCase +from graphite.worker_pool.pool import stop_pool + + +class BaseTestCase(TestCase): + + def tearDown(self): + stop_pool()
1
1
11,375
nit: you could have named it just "TestCase" (if django's TestCase was imported differently)
graphite-project-graphite-web
py
@@ -47,6 +47,12 @@ module Selenium @bridge.send_command(cmd: cmd, params: params) end + def print_page(**options) + options[:page_ranges] &&= Array(options[:page_ranges]) + + bridge.print_page(options) + end + private def debugger_address
1
# frozen_string_literal: true # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0...
1
18,367
the bridge here isn't defined as an accessor / reader to try mask it better. So you need to directly call the iVar `@bridge` here.
SeleniumHQ-selenium
py
@@ -42,7 +42,6 @@ std::string lldb_private::formatters::swift::SwiftOptionalSummaryProvider:: // retrieve the value of the Some case.. static PointerOrSP ExtractSomeIfAny(ValueObject *optional, - lldb::DynamicValueType dynamic_value = lldb::eNoDynamicValues, bool synthetic_value = f...
1
//===-- SwiftOptional.cpp ---------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
1
16,367
All the callers of `ExtractSomeIfAny`, always pass `true` to `synthetic_value`. Can we get rid of the extra argument?
apple-swift-lldb
cpp
@@ -109,7 +109,8 @@ def main(): logger.info('Environment info:\n' + dash_line + env_info + '\n' + dash_line) meta['env_info'] = env_info - + meta['config_dict'] = dict(cfg) + meta['config_file'] = args.config # log some basic info logger.info(f'Distributed training: {distribut...
1
import argparse import copy import os import os.path as osp import time import mmcv import torch from mmcv import Config, DictAction from mmcv.runner import init_dist from mmdet import __version__ from mmdet.apis import set_random_seed, train_detector from mmdet.datasets import build_dataset from mmdet.models import ...
1
20,978
Better to use the absolute path.
open-mmlab-mmdetection
py
@@ -45,8 +45,8 @@ const ( // VoucherInterval defines how many block pass before creating a new voucher VoucherInterval = 1000 - // ChannelExpiryBuffer defines how long the channel remains open past the last voucher - ChannelExpiryBuffer = 2000 + // ChannelExpiryInterval defines how long the channel remains open p...
1
package storage import ( "context" "fmt" "math/big" "sync" "time" "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid" cbor "gx/ipfs/QmRoARq3nkUb13HSKZGepCZSWe5GrVPwx7xURJGZ7KWv9V/go-ipld-cbor" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72Em...
1
16,849
this is 16 hours, is that enough?
filecoin-project-venus
go
@@ -0,0 +1,16 @@ +package tracing + +import ( + "context" + + "go.opencensus.io/trace" +) + +// AddErrorEndSpan will end `span` and adds `err` to `span` iff err is not nil. +// This is a helper method to cut down on boiler plate. +func AddErrorEndSpan(ctx context.Context, span *trace.Span, err *error) { + if *err != ni...
1
1
18,687
removing boilerplate. You could also add a `StartSpan` with varargs to inline string attributes.
filecoin-project-venus
go
@@ -71,9 +71,10 @@ func (b *EthAPIBackend) GetEthContext() (uint64, uint64) { return bn, ts } -func (b *EthAPIBackend) GetRollupContext() (uint64, uint64) { +func (b *EthAPIBackend) GetRollupContext() (uint64, uint64, uint64) { i := uint64(0) q := uint64(0) + v := uint64(0) index := b.eth.syncService.GetLate...
1
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
1
14,987
Can you replace these single letter variables with full names?
ethereum-optimism-optimism
go
@@ -1,13 +1,16 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; +using Microsoft.AspNet.Http.Features; namespace Microsoft.AspNet.Server.Kestrel.Filter { ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; namespace Microsoft.AspNet.Server.Kestrel.Filter { public class ConnectionFilterContext { public ServerAddress Addres...
1
6,820
At first I wasn't sure, but now I think I'm sold on making PrepareRequest an action over adding a state object to the context.
aspnet-KestrelHttpServer
.cs
@@ -679,9 +679,9 @@ class Upgrade // Eliminate obsolete config override settings: unset($newConfig['Extra_Config']); - // Update generator if it is default value: + // Update generator if it contains a version number: if (isset($newConfig['Site']['generator']) - && ...
1
<?php /** * VF Configuration Upgrade Tool * * PHP version 7 * * Copyright (C) Villanova University 2010. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * This program ...
1
32,762
Would it be too greedy to preg_replace `VuFind (\d+\.?)+` with `'VuFind ' . $this->to` anywhere in the string? This would update something like 'Finna (VuFind 7.1.0)' as well. Just a thought, please disregard if you'd like to keep it as is.
vufind-org-vufind
php
@@ -91,7 +91,7 @@ public abstract class ManagedResourceStorage { zkClient = ((ZkSolrResourceLoader)resourceLoader).getZkController().getZkClient(); try { zkConfigName = ((ZkSolrResourceLoader)resourceLoader).getZkController(). - getZkStateReader().readConfigName(collection); + ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
40,392
BTW for brevity, you can remove `getZkStateReader().` here and elsewhere since ZkController has a convenience method for the cluster state.
apache-lucene-solr
java
@@ -191,7 +191,10 @@ public class FindFiles { Snapshot snapshot = snapshotId != null ? ops.current().snapshot(snapshotId) : ops.current().currentSnapshot(); - CloseableIterable<ManifestEntry> entries = new ManifestGroup(ops, snapshot.manifests()) + // snapshot could be null when the table ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
16,063
If there are no manifests, then entries should be `CloseableIterable.empty()`, not the manifest iterable. That doesn't need to be closeable.
apache-iceberg
java
@@ -0,0 +1,11 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.java.rule.codestyle; + +import net.sourceforge.pmd.testframework.PmdRuleTst; + +public class ArrayInitializationVerbosenessRuleTest extends PmdRuleTst { + // no additional uni...
1
1
15,398
this class should be named `ArrayInitializationVerbosenessTest` to work
pmd-pmd
java
@@ -338,9 +338,17 @@ module Bolt private def update_logs(logs) logs.each_with_object({}) do |(key, val), acc| - next unless val.is_a?(Hash) + # Remove any disabled logs + next if val == 'disable' name = normalize_log(key) + + # But otherwise it has to be a Hash + ...
1
# frozen_string_literal: true require 'etc' require 'logging' require 'pathname' require 'bolt/project' require 'bolt/logger' require 'bolt/util' require 'bolt/config/options' module Bolt class UnknownTransportError < Bolt::Error def initialize(transport, uri = nil) msg = uri.nil? ? "Unknown transport #{t...
1
15,817
Do we want to allow users to disable `console` as well? The schema currently says that it only permits a hash for `console`.
puppetlabs-bolt
rb
@@ -44,6 +44,7 @@ func TestAddrsNewAndList(t *testing.T) { func TestWalletBalance(t *testing.T) { tf.IntegrationTest(t) + t.Skip("not working") ctx := context.Background() builder := test.NewNodeBuilder(t)
1
package commands_test import ( "context" "os" "strings" "testing" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-filecoin/fixtures" "github.com/filecoin-project/go-filecoin/internal/app/go-filecoin/node" "github.com/fileco...
1
22,630
It would be very helpful to describe succinctly either inline or by linking to an issue going into depth why each test is not working. If we merge like this your knowledge of what is going on is lost and other people in the code need to do a ton of reading before understanding when/how/if we should unskip.
filecoin-project-venus
go
@@ -85,9 +85,13 @@ export default function LegacyAdSenseDashboardWidgetOverview( props ) { } } }, [ - currentDataLoaded && previousDataLoaded, // All reports are fetched. - !! currentError || !! previousError, // Whether there is an error or not. - JSON.stringify( currentRangeData ), + currentDataLoaded, +...
1
/** * LegacyAdSenseDashboardWidgetOverview component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org...
1
37,760
As this is a `useEffect` this could be a cause for concern! Note that `useEffect` re-runs when a dependency changes **not** when a dependency is truthy (the previous code does look a bit like it's expecting that)
google-site-kit-wp
js
@@ -47,12 +47,13 @@ namespace lbann { -lbann_comm* initialize(int& argc, char**& argv, int seed) { +world_comm_ptr initialize(int& argc, char**& argv, int seed) { // Initialize Elemental. El::Initialize(argc, argv); // Create a new comm object. // Initial creation with every process in one model. - au...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
13,636
Should we be doing this with `make_unique` or something?
LLNL-lbann
cpp
@@ -35,9 +35,11 @@ class ProposalMailer < ApplicationMailer ) end - def proposal_updated_no_action_required(user, proposal, modifier = nil) + def proposal_updated_no_action_required(user = User.last, proposal = Proposal.last, modifier = nil) @proposal = proposal.decorate @modifier = modifier || Nu...
1
class ProposalMailer < ApplicationMailer def proposal_created_confirmation(proposal) @proposal = proposal.decorate assign_threading_headers(@proposal) mail( to: @proposal.requester.email_address, subject: subject(@proposal), from: default_sender_email, reply_to: reply_email(@propo...
1
16,828
we don't want to set default values for this. Since it is the actual email, we want to make sure we are always passing in the `user` and `proposal` . we have a default value of `nil` for modifier because sometimes will update a proposal via `rails console` in which case there will be no recorded modifier.
18F-C2
rb
@@ -14,9 +14,10 @@ import ( "strconv" "strings" + "go/parser" + "github.com/aykevl/go-llvm" "github.com/aykevl/tinygo/ir" - "go/parser" "golang.org/x/tools/go/loader" "golang.org/x/tools/go/ssa" )
1
package compiler import ( "errors" "fmt" "go/build" "go/constant" "go/token" "go/types" "os" "path/filepath" "regexp" "runtime" "strconv" "strings" "github.com/aykevl/go-llvm" "github.com/aykevl/tinygo/ir" "go/parser" "golang.org/x/tools/go/loader" "golang.org/x/tools/go/ssa" ) func init() { llvm.I...
1
6,016
Yes this import was in the wrong place, but should ideally be in the first list of imports (among `go/build`, `go/token`, etc.). You may move it there, or just revert this change as it's actually unrelated.
tinygo-org-tinygo
go
@@ -106,7 +106,7 @@ import javax.lang.model.element.Name; @AutoService(BugChecker.class) @BugPattern( name = "StrictUnusedVariable", - altNames = {"unused", "StrictUnusedVariable"}, + altNames = {"unused", "UnusedVariable"}, link = "https://github.com/palantir/gradle-baseline#baseline-...
1
/* * Copyright 2018 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
1
8,127
It's unnecessary to duplicate the `name`.
palantir-gradle-baseline
java
@@ -68,7 +68,7 @@ final class MediaType extends AbstractType implements LoggerAwareInterface $builder->addModelTransformer($dataTransformer); $builder->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event): void { - if ($event->getForm()->has('unlink') && null !== $event...
1
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Form\Type...
1
12,518
this was a mistake when adding phpstan strict plugin
sonata-project-SonataMediaBundle
php
@@ -197,6 +197,14 @@ export function diffChildren( newParentVNode._nextDom = oldDom; } + } else if ( + oldDom && + oldVNode._dom == oldDom && + oldDom.parentNode != parentDom + ) { + // The above condition is handle null placeholders. See test in placeholder.test.js: + // `effic...
1
import { diff, unmount, applyRef } from './index'; import { createVNode } from '../create-element'; import { EMPTY_OBJ, EMPTY_ARR } from '../constants'; import { removeNode } from '../util'; import { getDomSibling } from '../component'; /** * Diff the children of a virtual node * @param {import('../internal').Preact...
1
15,313
Nit: I think it should be `to handle` here.
preactjs-preact
js
@@ -2810,7 +2810,7 @@ public class MessagingController implements Runnable { LocalMessage message = localFolder.getMessage(uid); if (message == null - || message.getId() == 0) { + || message.getId() == 0) { ...
1
package com.fsck.k9.controller; import java.io.CharArrayWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.EnumSet; import java.util.HashMap; import java....
1
13,533
Please don't make unrelated changes or let your tools make unrelated changes.
k9mail-k-9
java
@@ -18,7 +18,7 @@ import ( "github.com/iotexproject/iotex-core/pkg/log" ) -var numAccounts int +var numAccounts uint // accountCreateCmd represents the account create command var accountCreateCmd = &cobra.Command{
1
// Copyright (c) 2019 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
16,125
`numAccounts` is a global variable (from `gochecknoglobals`)
iotexproject-iotex-core
go
@@ -855,6 +855,9 @@ class PluginManager if ($pluginPath = self::instance()->getPluginPath($id)) { File::deleteDirectory($pluginPath); } + + // actually remove the plugin from our internal container + unset($this->plugins[$id]); } /**
1
<?php namespace System\Classes; use Db; use App; use Str; use Log; use File; use Lang; use View; use Config; use Schema; use SystemException; use RecursiveIteratorIterator; use RecursiveDirectoryIterator; /** * Plugin manager * * @package october\system * @author Alexey Bobkov, Samuel Georges */ class PluginMana...
1
19,039
Is the ID correctly normalized at this point?
octobercms-october
php
@@ -0,0 +1,11 @@ +package commands + +import ( + "context" + + "github.com/ledgerwatch/erigon/p2p" +) + +func (api *ErigonImpl) NodeInfo(ctx context.Context) ([]p2p.NodeInfo, error) { + return api.ethBackend.NodeInfo(ctx, 0) +}
1
1
22,770
if 0 is a special constant meaning "no limit" let's make it a constant and name it correctly :)
ledgerwatch-erigon
go
@@ -140,8 +140,8 @@ func run(ctx context.Context) { } else { setOsConfig(resp) setPatchPolicies(resp.PatchPolicies) - runInventory() } + runInventory() select { case <-ticker.C:
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
7,999
Curious about the reason behind this change
GoogleCloudPlatform-compute-image-tools
go
@@ -18,7 +18,7 @@ func (node *Node) AddNewBlock(ctx context.Context, b *types.Block) (err error) { // Put block in storage wired to an exchange so this node and other // nodes can fetch it. log.Debugf("putting block in bitswap exchange: %s", b.Cid().String()) - blkCid, err := node.OnlineStore.Put(ctx, b) + blkCid...
1
package node import ( "context" "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" "github.com/filecoin-project/go-filecoin/net/pubsub" "github.com/filecoin-project/go-filecoin/types" ) // BlockTopic is the pubsub topic identifier on ...
1
17,156
wait, i thought the cborstore was for state tree?
filecoin-project-venus
go
@@ -1101,7 +1101,19 @@ class Package(object): self._fix_sha256() pkg = self._materialize(dest) + + def physical_key_is_temp_file(pk): + if not file_is_local(pk): + return False + return pathlib.Path(parse_file_url(urlparse(pk))).parent == APP_DIR_TEMPFILE_...
1
from collections import deque import copy import hashlib import io import json import pathlib import os import time from multiprocessing import Pool from urllib.parse import quote, urlparse, unquote import uuid import warnings import jsonlines from .data_transfer import ( calculate_sha256, copy_file, copy_file_li...
1
17,865
This logic is now duplicated here and in `_delete_temporary_files`... Maybe do it all at once - find temp files, delete them, and fix the logical keys?
quiltdata-quilt
py
@@ -25,6 +25,11 @@ import io.swagger.converter.ModelConverters; import io.swagger.models.properties.Property; public class DefaultResponseTypeProcessor implements ResponseTypeProcessor { + @Override + public Class<?> getResponseType() { + // not care for this. + return null; + } @Override public Pr...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
8,145
How about name it with NullResponseTypeProcessor
apache-servicecomb-java-chassis
java
@@ -580,6 +580,8 @@ Dataset* DatasetLoader::CostructFromSampleData(double** sample_values, BinType bin_type = BinType::NumericalBin; if (categorical_features_.count(i)) { bin_type = BinType::CategoricalBin; + bool feat_is_unconstrained = ((config_.monotone_constraints.size() == 0) || (conf...
1
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #include <LightGBM/dataset_loader.h> #include <LightGBM/network.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/utils/log.h> #include <...
1
20,726
Maybe `Log::Fatal` here? `[LightGBM] [Fatal] Check failed: feat_is_unconstrained at ...` (and kernel death in case of Jupyter Notebook) seems to be not so informative and user-friendly.
microsoft-LightGBM
cpp