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
@@ -36,7 +36,17 @@ const env = envFromArgs(process.argv); const profilePath = profileFromArgs(process.argv); const isDebugMode = !!process.argv && process.argv.indexOf('--debug') >= 0; -const wrapper = new ElectronAppWrapper(electronApp, env, profilePath, isDebugMode); +if (env === 'dev' && process.platform === 'wi...
1
// This is the basic initialization for the Electron MAIN process const electronApp = require('electron').app; const ElectronAppWrapper = require('./ElectronAppWrapper').default; const { initBridge } = require('./bridge'); const Logger = require('@joplin/lib/Logger').default; const FsDriverNode = require('@joplin/lib/...
1
17,712
Should start with joplin://x-callback-url/. Also maybe create a helper function to check if a url is valid?
laurent22-joplin
js
@@ -3,7 +3,7 @@ export default [ { created_at: '2015-09-11T09:44:30.805Z', created_by: 1, - id: 1, + id: 7, key: 'title', type: 'blog', updated_at: '2015-10-04T16:26:05.195Z',
1
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */ export default [ { created_at: '2015-09-11T09:44:30.805Z', created_by: 1, id: 1, key: 'title', type: 'blog', updated_at: '2015-10-04T16:26:05.195Z', updated_by: 1, uuid: '39e16daf-43fa-4bf0-87d4...
1
7,745
PR works great. Just out of curiosity: why all the id changes?
TryGhost-Admin
js
@@ -56,6 +56,14 @@ struct flb_service_config service_configs[] = { FLB_CONF_TYPE_INT, offsetof(struct flb_config, grace)}, + {FLB_CONF_STR_BACKOFF_BASE, + FLB_CONF_TYPE_INT, + offsetof(struct flb_config, backoff_base)}, + + {FLB_CONF_STR_BACKOFF_CAP, + FLB_CONF_TYPE_INT, + offsetof(s...
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2020 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
13,316
config map first value is wrong, it aims to define the "value type", that value will lead to an undefined behavior.
fluent-fluent-bit
c
@@ -13,7 +13,7 @@ // limitations under the License. // Package fileblob provides a blob implementation that uses the filesystem. -// Use OpenBucket to construct a blob.Bucket. +// Use OpenBucket to construct a *blob.Bucket. // // Blob keys are escaped before being used as filenames, and filenames are // unescape...
1
// Copyright 2018 The Go Cloud 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
1
13,638
This doesn't make sense. The thing being constructed is a blob.Bucket. "Constructing" the pointer is trivial.
google-go-cloud
go
@@ -2,7 +2,9 @@ # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE import functools +import optparse # pylint: disable=deprecated-module +from pylint.lint import PyLinter from pylint.testutils.checker_test_case import CheckerTestCase
1
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE import functools from pylint.testutils.checker_test_case import CheckerTestCase def set_config(**kwargs): """Decorator for setting config values on a checker. Pa...
1
16,274
Outch. A configuration/parsing refactor is on the radar but this seems more pressing.
PyCQA-pylint
py
@@ -18,7 +18,9 @@ export default Component.extend({ stats: null, chartData: null, chartOptions: null, - startDateLabel: '', + startDateLabel: computed('membersStats.days', function () { + return moment(new Date()).add(-this.membersStats.days + 1, 'days').format(DATE_FORMAT); + }), ...
1
/* global Chart */ import Component from '@ember/component'; import moment from 'moment'; import {action} from '@ember/object'; import {computed, get} from '@ember/object'; import {inject as service} from '@ember/service'; import {task} from 'ember-concurrency'; const DATE_FORMAT = 'D MMM YYYY'; export default Compon...
1
9,449
Unfortunately this won't work when the "All time" range is chosen because `memberStats.days` will be `"all-time"` and not a number. What you could do instead is to use `memberStats.stats` as the dependent key and use `Object.keys(memberStats.stats.total_on_date)[0]` to grab the first date in the range and build the lab...
TryGhost-Admin
js
@@ -1,10 +1,11 @@ require "rails_helper" -feature "subscriber views video trail" do +feature "user views video trail" do scenario "and marks a video as complete" do trail = create_video_trail - sign_in_as_user_with_subscription + sign_in + click_on I18n.t("pages.landing.hero_call_to_action") ...
1
require "rails_helper" feature "subscriber views video trail" do scenario "and marks a video as complete" do trail = create_video_trail sign_in_as_user_with_subscription click_on trail.name within trail_steps_list do expect(first_video).to have_status("next-up") expect(second_video).to ...
1
18,764
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -206,7 +206,6 @@ describe('Configure Options', function() { iframe.src = '/test/mock/frames/context.html'; iframe.onload = function() { axe.configure(config); - iframe.contentWindow.axe.configure(config); axe.run( '#target',
1
describe('Configure Options', function() { 'use strict'; var target = document.querySelector('#target'); afterEach(function() { axe.reset(); target.innerHTML = ''; }); describe('Check', function() { describe('aria-allowed-attr', function() { it('should allow an attribute supplied in optio...
1
17,220
We need this left in as `axe.configure` is for the top-level page `axe` and we still need to configure the axe script inside the iframe as well (so both have to be configured),
dequelabs-axe-core
js
@@ -26,6 +26,11 @@ namespace AutoRest.Swagger.Validation /// </summary> public override ValidationCategory ValidationCategory => ValidationCategory.RPCViolation; + /// <summary> + /// What kind of change implementing this rule can cause. + /// </summary> + public override...
1
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Collections.Generic; using System.Text.RegularExpressions; using AutoRest.Core.Logging; using AutoRest.Core.Properties; using AutoRest.Swagger.Valid...
1
24,908
is this rule serviceimpacting? I'm thinking it's mostly around the modeling of pageable in the swagger, thoughts?
Azure-autorest
java
@@ -141,7 +141,7 @@ func (ts *TriggerStatus) MarkDependencyNotConfigured() { "DependencyNotConfigured", "Dependency has not yet been reconciled.") } -func (ts *TriggerStatus) PropagateDependencyStatus(ks *duckv1.KResource) { +func (ts *TriggerStatus) PropagateDependencyStatus(ks *duckv1.Source) { kc := ks.Statu...
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
18,742
same here, replace `ks` and `kc` to something more related to Source.
google-knative-gcp
go
@@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Globalization; + +namespace MvvmCross.Platform.Converters +{ + public class MvxDictionaryValueConverter<TKey, TValue> : MvxValueConverter<TKey, TValue> + { + protected override TValue Convert(TKey value, Type targetType, objec...
1
1
13,518
We should probably ask here if `dict` contains a key with the appropiate value, and leave a trace in case it doesn't, to make it easier to debug for developers.
MvvmCross-MvvmCross
.cs
@@ -147,6 +147,11 @@ module Beaker } } } let(:subcommand_file) {@subcommand_file || {:level => 'fifth'}} + let(:homedir_file) {@homedir_file || {:level => 'sixth', + :ssh => { + ...
1
require "spec_helper" module Beaker module Options describe Parser do let(:parser) { Parser.new } let(:opts_path) { File.join(File.expand_path(File.dirname(__FILE__)), "data", "opts.txt") } let(:hosts_path) { File.join(File.expand_path(File.dirname(__FILE__)), "data", "hosts.cfg") } it ...
1
15,092
this should only be indented 2 spaces
voxpupuli-beaker
rb
@@ -84,7 +84,10 @@ func TestLoadEnvConfig_Creds(t *testing.T) { os.Setenv(k, v) } - cfg := loadEnvConfig() + cfg, err := loadEnvConfig() + if err != nil { + t.Errorf("failed to load env config, %v", err) + } if !reflect.DeepEqual(c.Val, cfg.Creds) { t.Errorf("expect credentials to match.\...
1
// +build go1.7 package session import ( "os" "reflect" "strconv" "testing" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/awstesting" "github.com/aws/aws-sdk-go/internal/sdktesting" "github.com/aws/aws-sdk-go/internal/shareddefaults" ) func TestLoadEnvConfig_Creds(t *testing.T) { c...
1
9,844
Nit, these Err not nils should be `t.Fatalf` not error. We want to the test to stop if this error occurs.
aws-aws-sdk-go
go
@@ -262,6 +262,10 @@ public class DatasetPage implements java.io.Serializable { private Boolean hasRsyncScript = false; + private Boolean hasTabular = false; + + private Boolean downloadOriginalTracker = false; + List<ExternalTool> configureTools = new ArrayList<>(); List<Extern...
1
package edu.harvard.iq.dataverse; import edu.harvard.iq.dataverse.provenance.ProvPopupFragmentBean; import edu.harvard.iq.dataverse.api.AbstractApiBean; import edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean; import edu.harvard.iq.dataverse.authorization.Permission; import edu.harvard.iq.dataverse.aut...
1
38,419
shouldn't every `Boolean` in this pr be `boolean`?
IQSS-dataverse
java
@@ -619,6 +619,14 @@ class WebDriver(object): else: return self.execute(Command.GET_WINDOW_HANDLES)['value'] + def minimize_window(self): + """ + Miniimizes the current window that webdriver is using + """ + if self.w3c: + command = Command.W3C_MINIMIZE_...
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 may not...
1
14,687
This `if` is not necessary
SeleniumHQ-selenium
rb
@@ -45,5 +45,7 @@ namespace Datadog.Trace.ClrProfiler public const string GenericParameterTask = "System.Threading.Tasks.Task`1<T>"; public const string ObjectTask = "System.Threading.Tasks.Task`1<System.Object>"; public const string Int32Task = "System.Threading.Tasks.Task`1<System.Int32>"; ...
1
// <copyright file="ClrNames.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> namespace Datadog.Trace.ClrPr...
1
22,016
Are you using this anywhere? (I couldn't find it.)
DataDog-dd-trace-dotnet
.cs
@@ -250,7 +250,14 @@ func (s *Step) populate(ctx context.Context) dErr { return err } +func (s *Step) recordStepTime(startTime time.Time) { + endTime := time.Now() + s.w.recordStepTime(s.name, startTime, endTime) +} + func (s *Step) run(ctx context.Context) dErr { + startTime := time.Now() + defer s.recordStepTim...
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
8,974
Can be inlined
GoogleCloudPlatform-compute-image-tools
go
@@ -3,6 +3,6 @@ require 'spec_helper' describe Api::V1::CompletionsController, '#show' do it 'returns a 401 when users are not authenticated' do get :index - response.code.should eq '401' + expect(response.code).to eq '401' end end
1
require 'spec_helper' describe Api::V1::CompletionsController, '#show' do it 'returns a 401 when users are not authenticated' do get :index response.code.should eq '401' end end
1
9,666
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -1,3 +1,4 @@ +import json import warnings import colander
1
import warnings import colander from kinto.core.schema import (Any, HeaderField, QueryField, HeaderQuotedInteger, FieldList, TimeStamp, URL) from kinto.core.errors import ErrorSchema from kinto.core.utils import native_value POSTGRESQL_MAX_INTEGER_VALUE = 2**63 positive_big_integer = ...
1
11,654
Please use `kinto.core.utils.json`
Kinto-kinto
py
@@ -204,6 +204,16 @@ func (h *Handler) Provision(ctx caddy.Context) error { // set up upstreams for _, upstream := range h.Upstreams { + addr, err := caddy.ParseNetworkAddress(upstream.Dial) + if err != nil { + return err + } + if addr.PortRangeSize() != 1 { + h.logger.Error("multiple addresses (upstream ...
1
// Copyright 2015 Matthew Holt and The Caddy 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 applicab...
1
15,506
Since we're returning the error with the same content, we don't need to log it here; it will get bubbled up and emitted that way.
caddyserver-caddy
go
@@ -0,0 +1,11 @@ +"""Tests for the use of typing.final whenever the py-version is set < 3.8""" +# pylint: disable=missing-class-docstring, too-few-public-methods, missing-function-docstring, no-name-in-module + +from typing import final + + +@final # [using-final-in-unsupported-version] +class MyClass: + @final # [u...
1
1
16,656
What happens if someone import `typing` and thus uses `@typing.final` instead?
PyCQA-pylint
py
@@ -76,7 +76,7 @@ def get_test_dependencies(): # Test dependencies exposed as extras, based on: # https://stackoverflow.com/questions/29870629 return [ - "pandas", + "pandas==0.20.0", "pytest>=3.1", "pytest-cov", "pytest-benchmark>=3.1",
1
#!/usr/bin/env python3 # © H2O.ai 2018; -*- encoding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #--------------------------------------------------...
1
10,923
Better remove this dependency altogether
h2oai-datatable
py
@@ -944,4 +944,7 @@ void h2o_cleanup_thread(void) h2o_mem_clear_recycle(&h2o_mem_pool_allocator); h2o_mem_clear_recycle(&h2o_http2_wbuf_buffer_prototype.allocator); h2o_mem_clear_recycle(&h2o_socket_buffer_prototype.allocator); + + extern __thread h2o_buffer_prototype_t h2o__http2client_wbuf_buffer_pr...
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Satoh Hiroh * * 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 * rights to ...
1
13,876
Could you please move the declaration to httpclient.h? I think we have a consistent pattern in declaring global variables in header files.
h2o-h2o
c
@@ -61,11 +61,12 @@ public interface DataFile extends ContentFile<DataFile> { "Splittable offsets"); Types.NestedField EQUALITY_IDS = optional(135, "equality_ids", ListType.ofRequired(136, IntegerType.get()), "Equality comparison field IDs"); + Types.NestedField SORT_ORDER_ID = optional(140, "sort_ord...
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
30,844
We will also need to add this to the spec.
apache-iceberg
java
@@ -68,15 +68,8 @@ func makeRoundCowState(b roundCowParent, hdr bookkeeping.BlockHeader, prevTimest lookupParent: b, commitParent: nil, proto: config.Consensus[hdr.CurrentProtocol], - mods: ledgercore.StateDelta{ - Accts: make(map[basics.Address]basics.AccountData), - Txids: make(ma...
1
// Copyright (C) 2019-2021 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) ...
1
41,465
In startEvaluator, we have the paysetHint; we should use it to preinitialize the state delta allocation. The number of transactions and the deltas are typically growing in a linear fashion, so preallocating twice as much in the array initializer would be a good idea.
algorand-go-algorand
go
@@ -44,6 +44,10 @@ import java.util.List; * </code> */ public abstract class By { + static { + WebDriverException.scheduleIpHostResolving(); + } + /** * @param id The value of the "id" attribute to search for * @return a By which locates elements by the value of the "id" attribute.
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,103
we shouldn't add a bunch of static initializers 'everywhere' in the code. Probably just one would be good, during the construction of the 'RemoteWebDriver' class.
SeleniumHQ-selenium
js
@@ -54,6 +54,10 @@ namespace System.Text.Json.Serialization.Tests await JsonSerializer.SerializeAsync(_memoryStream, _value); } + [BenchmarkCategory(Categories.CoreFX, Categories.JSON)] + [Benchmark] + public string SerializeObjectProperty() => JsonSerializer.Serialize(new {...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; using MicroBenchmarks; using MicroBenchmarks.Serializers; using System.Collection...
1
10,278
Would it be possible to move the creation of the `new { Prop = (object)_value }` out of the benchmark? In the current version, the benchmark includes the cost of creating and serializing the object, while if possible it should be the cost of serialization only.
dotnet-performance
.cs
@@ -23,4 +23,6 @@ return [ Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], Translation\Bundle\TranslationBundle::class => ['all' => true], Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], + Translation\PlatformAdapter\Loco\Bridge\Symfony\TranslationAdapterLocoB...
1
<?php return [ ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle:...
1
10,915
only dev and local
bolt-core
php
@@ -30,7 +30,7 @@ class DbJobsFailedJobsUpdate extends Migration public function down() { Schema::table($this->getTableName(), function (Blueprint $table) { - $table->tinyInteger('reserved')->unsigned(); + $table->tinyInteger('reserved')->unsigned()->nullable(); $ta...
1
<?php use October\Rain\Database\Schema\Blueprint; use October\Rain\Database\Updates\Migration; class DbJobsFailedJobsUpdate extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table($this->getTableName(), function (Blueprint $table) ...
1
12,718
This should not be nullable, instead it should be `->default(0);`
octobercms-october
php
@@ -65,8 +65,8 @@ public class IcebergGenerics { return this; } - public ScanBuilder select(String... columns) { - this.columns = ImmutableList.copyOf(columns); + public ScanBuilder select(String... selectColumns) { + this.columns = ImmutableList.copyOf(selectColumns); return this; ...
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
13,500
What about `selectedColumns`? I believe it is frequently used throughout the project.
apache-iceberg
java
@@ -43,6 +43,7 @@ import org.apache.solr.uninverting.UninvertingReader.Type; public class TextField extends FieldType { protected boolean autoGeneratePhraseQueries; protected boolean enableGraphQueries; + protected boolean synonymBoostByPayload; protected SolrQueryParserBase.SynonymQueryStyle synonymQuerySty...
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
26,933
I thought we switched the approach from a payload to boost attribute? Besides; it's not clear we need this toggle at all since the user could arrange for this behavior simply by having the new DelimitedBoost filter thing in the chain.
apache-lucene-solr
java
@@ -233,15 +233,8 @@ module Unix::Exec def environment_string env return '' if env.empty? env_array = self.environment_variable_string_pair_array( env ) - environment_string = env_array.join(' ') - command = 'env' - punctuation = '' - if self[:platform] =~ /cisco-5/ - command = 'export' ...
1
module Unix::Exec include Beaker::CommandFactory def reboot if self['platform'] =~ /solaris/ exec(Beaker::Command.new("reboot"), :expect_connection_failure => true) else exec(Beaker::Command.new("/sbin/shutdown -r now"), :expect_connection_failure => true) end sleep(10) #if we attempt a...
1
12,273
the previous code used 'export' when platform is cisco-5, presumably because 'env' cannot be used to load variables? I have no idea if that's the case but this env vs export logic is not here
voxpupuli-beaker
rb
@@ -104,11 +104,15 @@ type CloudInit struct { // +optional EnableSecureSecretsManager bool `json:"enableSecureSecretsManager,omitempty"` - // SecretARN is the Amazon Resource Name of the secret. This is stored + // SecretCount is the number of secrets used to form the complete secret + // +optional + SecretCount ...
1
/* Copyright 2019 The Kubernetes 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, ...
1
13,624
I'm wondering if we need to add some type of validation here that the SecretCount != 0... Or do we think it would be valid to have a SecretCount of 0?
kubernetes-sigs-cluster-api-provider-aws
go
@@ -3752,7 +3752,7 @@ describe('Cursor', function () { db.s.topology, db.s.namespace, {}, - { limit: 0, skip: 0, slaveOk: false, readPreference: 42 } + { limit: 0, skip: 0, secondaryOk: false, readPreference: 42 } ); cursor.hasNext(err => {
1
'use strict'; const { assert: test, filterForCommands, withClient, withMonitoredClient } = require('./shared'); const { setupDatabase } = require('./shared'); const fs = require('fs'); const os = require('os'); const path = require('path'); const { expect } = require('chai'); const BSON = require('bson'); const sinon =...
1
21,739
This test is being skipped. I unskipped it, and it failed in the same way for both `slaveOk: false` and `secondaryOk: false`. I'm not sure how else to test this broken test.
mongodb-node-mongodb-native
js
@@ -33,6 +33,8 @@ import ( // ResponseHeaders. type OutboundCall struct { // request attributes to fill if non-nil + to *Identifier + from *Identifier headers []keyValuePair shardKey *string routingKey *string
1
// Copyright (c) 2018 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
18,077
I don't believe that we need a pointer to an interface for the `to` side of this since we're just assigning a value to the to field.
yarpc-yarpc-go
go
@@ -74,13 +74,18 @@ def later(ms: int, command, win_id): @cmdutils.register(maxsplit=1, no_cmd_split=True, no_replace_variables=True) @cmdutils.argument('win_id', win_id=True) -def repeat(times: int, command, win_id): +@cmdutils.argument('count', count=True) +def repeat(times: int, command, win_id, count=None): ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
21,881
No blank line after the docstring.
qutebrowser-qutebrowser
py
@@ -17,8 +17,11 @@ package blobvar import ( "context" "errors" + "github.com/google/go-cmp/cmp" + "io/ioutil" "os" "path" + "path/filepath" "testing" "gocloud.dev/blob"
1
// Copyright 2019 The Go Cloud Development Kit 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
15,144
nit: move this to the group below.
google-go-cloud
go
@@ -3045,8 +3045,11 @@ short Sort::generateTdb(Generator * generator, CostScalar bufferSize = getDefault(GEN_SORT_MAX_BUFFER_SIZE); - ULng32 bufferSize_as_ulong = - (ULng32)(MINOF(CostScalar(UINT_MAX), bufferSize)).getValue(); + UInt32 bufferSize_as_ulong = + (UInt32)(MINOF(CostScalar(UINT_MAX), buf...
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
16,394
This is fine, but maybe we should change the variable name to "bufferSize_as_uint"? Or "...uint32"?
apache-trafodion
cpp
@@ -57,9 +57,10 @@ module Blacklight::SolrResponse::Spelling # origFreq => # suggestion => [{ frequency =>, word => }] # for extended results # suggestion => ['word'] # for non-extended results - if suggestions.index("correctlySpelled") + ...
1
# A mixin for making access to the spellcheck component data easy. # # response.spelling.words # module Blacklight::SolrResponse::Spelling def spelling @spelling ||= Base.new(self) end class Base attr :response def initialize(response) @response = response end # returns an array of ...
1
5,746
Use snake_case for variable names.
projectblacklight-blacklight
rb
@@ -1095,7 +1095,7 @@ namespace pwiz.SkylineTestA return count; } - [TestMethod] + //[TestMethod] public void ConsoleBadRawFileImportTest() { // Run this test only if we can read Thermo's raw files
1
/* * Original author: John Chilton <jchilton .at. u.washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2011 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compl...
1
12,383
Obviously, don't merge this to master.
ProteoWizard-pwiz
.cs
@@ -160,6 +160,18 @@ module RSpec::Core end end + describe "#exit_early" do + it "returns the passed exit code" do + expect(reporter.exit_early(42)).to eq(42) + end + + it "reports zero examples" do + allow(reporter).to receive(:report) + reporter.exit_early(42) + ...
1
module RSpec::Core RSpec.describe Reporter do include FormatterSupport let(:config) { Configuration.new } let(:world) { World.new(config) } let(:reporter) { Reporter.new config } let(:start_time) { Time.now } let(:example) { super() } describe "finish" do let(:formatter) { dou...
1
17,088
Nearly there! This should assert on the output, take the result of "start" and "finish" as an example :)
rspec-rspec-core
rb
@@ -63,11 +63,11 @@ func NewDriverSub() *driverSub { return ds } -func (s *driverSub) ReceiveBatch(ctx context.Context) ([]*driver.Message, error) { +func (s *driverSub) ReceiveBatch(ctx context.Context, maxMessages int) ([]*driver.Message, error) { for { select { case <-s.sem: - ms := s.grabQueue() + ...
1
// Copyright 2018 The Go Cloud 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
1
12,338
This loop is going to burn CPU if len(s.q) == 0. Maybe a small sleep?
google-go-cloud
go
@@ -30,7 +30,10 @@ import com.pingcap.tikv.exception.TiClientInternalException; import com.pingcap.tikv.key.Key; import com.pingcap.tikv.util.ConcreteBackOffer; import com.pingcap.tikv.util.Pair; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Ma...
1
/* * * Copyright 2017 PingCAP, 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 agre...
1
9,206
can you give a reason why session should be contained in RegionManager?
pingcap-tispark
java
@@ -37,6 +37,16 @@ func TestAuthenticate_WhenSignatureIsCorrect(t *testing.T) { assert.Exactly(t, originalSignerID, signerID, "Original signer should be extracted") } +func TestAuthenticate_WhenBase64MessageSignatureIsCorrect(t *testing.T) { + message := []byte("MystVpnSessionId:Boop!") + signature := SignatureBas...
1
/* * Copyright (C) 2017 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
11,061
You are comparing two signerIDs here, error message should be "Signers should match"
mysteriumnetwork-node
go
@@ -57,6 +57,15 @@ type IAMRoleCredentials struct { type TaskIAMRoleCredentials struct { ARN string IAMRoleCredentials IAMRoleCredentials + lock sync.RWMutex +} + +// GetIAMRoleCredentials returns the IAM role credentials in the task IAM role struct +func (role *TaskIAMRoleCredentials)...
1
// Copyright 2014-2016 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/ // // or in the "license...
1
16,456
Who's acquiring this lock for writes?
aws-amazon-ecs-agent
go
@@ -248,10 +248,10 @@ PublicKey.fromX = function(odd, x) { * @param {String} [compressed] - If the public key is compressed * @returns {null|Error} An error if exists */ -PublicKey.getValidationError = function(data, compressed) { +PublicKey.getValidationError = function(data) { var error; try { - new Pu...
1
'use strict'; var Point = require('./crypto/point'); var BN = require('./crypto/bn'); var Address = require('./address'); /** * * Instantiate a PublicKey from a 'PrivateKey', 'Point', 'string', 'Buffer'. * * @example * * // instantiate from a private key * var key = PublicKey(privateKey, true); * * // export...
1
13,238
This throws a linter error, don't use object creation for side effects. I feel like it's kinda messed up that the errors are thrown by the constructor and not that the constructor will throw them
bitpay-bitcore
js
@@ -43,6 +43,18 @@ describe Trail do end end + describe ".by_topic" do + it "returns trails sorted by their topic's name" do + create(:trail, topic: create(:topic, name: "A")) + create(:trail, topic: create(:topic, name: "C")) + create(:trail, topic: create(:topic, name: "B")) + + resu...
1
require "rails_helper" describe Trail do it { should validate_presence_of(:name) } it { should validate_presence_of(:description) } it { should validate_presence_of(:topic) } it { should belong_to(:topic) } it { should have_many(:repositories).dependent(:destroy) } it { should have_many(:statuses).depende...
1
14,959
Should there be a `trail.topic_name` method so we don't annoy Demeter?
thoughtbot-upcase
rb
@@ -281,7 +281,7 @@ def _file_to_data_frame(ext, path, target, handler_args): return dataframe -def build_package(username, package, yaml_path, checks_path=None, dry_run=False, env='default'): +def build_package(team, username, package, yaml_path, checks_path=None, dry_run=False, env='default'): """ ...
1
""" parse build file, serialize package """ from collections import defaultdict, Iterable import importlib import json from types import ModuleType import os import re from pandas.errors import ParserError from six import iteritems, itervalues, string_types import yaml from tqdm import tqdm from .const import DEFAUL...
1
15,703
instead of passing "None" it would be more readable to create a constant e.g. TEAM_PUBLIC = None and then call build_package(TEAM_PUBLIC, ...)
quiltdata-quilt
py
@@ -9,6 +9,8 @@ gc_disable(); // show all errors error_reporting(-1); +require_once __DIR__ . '/Psalm/Internal/exception_handler.php'; + $valid_short_options = [ 'h', 'v',
1
<?php require_once('command_functions.php'); use Psalm\Config; use Psalm\Internal\Analyzer\ProjectAnalyzer; gc_disable(); // show all errors error_reporting(-1); $valid_short_options = [ 'h', 'v', 'c:', 'r:', ]; $valid_long_options = [ 'clear-cache', 'config:', 'find-dead-code', 'he...
1
8,063
Would it make sense to include this file via composer files-autoloading instead?
vimeo-psalm
php
@@ -348,10 +348,12 @@ public class ExpectedConditions { final String text) { return new ExpectedCondition<Boolean>() { + private String elementText = null; + @Override public Boolean apply(WebDriver driver) { try { -...
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
18,003
Each `ExpectedCondition` implements `java.util.Function` These are expected to be stateless. This condition will leak previous `elementText` on the second usage, which doesn't seem ideal.
SeleniumHQ-selenium
js
@@ -1,9 +1,10 @@ package sql_test import ( - "github.com/influxdata/flux/plan" "testing" + "github.com/influxdata/flux/plan" + "github.com/DATA-DOG/go-sqlmock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts"
1
package sql_test import ( "github.com/influxdata/flux/plan" "testing" "github.com/DATA-DOG/go-sqlmock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" flux "github.com/influxdata/flux" _ "github.com/influxdata/flux/builtin" // We need to import the builtins for the tests to work. "github...
1
12,214
Extra newline here. Thanks for moving it under the `testing` import though. This just needs to be grouped with the other imports below it.
influxdata-flux
go
@@ -71,7 +71,11 @@ public class MimeBodyPart extends BodyPart { contentType += String.format(";\n name=\"%s\"", name); } setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType); - setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, "quoted-printable"); + ...
1
package com.fsck.k9.mail.internet; import com.fsck.k9.mail.Body; import com.fsck.k9.mail.BodyPart; import com.fsck.k9.mail.MessagingException; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; /** * TODO this is a close approximation of Messa...
1
12,149
Should we ignore case when doing the comparison?
k9mail-k-9
java
@@ -94,6 +94,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) { } } +#ifdef WLR_HAS_X11_BACKEND const char *x11_display = getenv("DISPLAY"); if (x11_display) { struct wlr_backend *x11_backend =
1
#include <assert.h> #include <errno.h> #include <libinput.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <wayland-server.h> #include <wlr/backend/drm.h> #include <wlr/backend/interface.h> #include <wlr/backend/libinput.h> #include <wlr/backend/multi.h> #include <wlr/backend/session.h> #include ...
1
10,236
The same `ifdef` should apply to `#include <wlr/backend/x11.h>` line 14
swaywm-wlroots
c
@@ -183,7 +183,14 @@ namespace Datadog.Trace.ClrProfiler.Integrations catch (Exception ex) { // profiled app will continue working as expected without this method - Log.ErrorException($"Error resolving {DiagnosticSourceTypeName}.{nameof(BeforeAction)}(...)", ex)...
1
using System; using System.Collections; using System.Collections.Generic; using Datadog.Trace.ClrProfiler.Emit; using Datadog.Trace.ClrProfiler.ExtensionMethods; using Datadog.Trace.Headers; using Datadog.Trace.Logging; namespace Datadog.Trace.ClrProfiler.Integrations { /// <summary> /// The ASP.NET Core MVC 2...
1
15,592
We're instrumenting a static method, so there's no instance in this case. `diagnosticSource` is the first argument.
DataDog-dd-trace-dotnet
.cs
@@ -194,6 +194,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, private Action action; private boolean requestReadReceipt = false; + private boolean isHighPriority = false; private TextView chooseIdentityButton; private EditText subjectView;
1
package com.fsck.k9.activity; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.AlertDialog; import android.app.AlertDialog.Bui...
1
15,534
I feel like this belongs in `RecipientPresenter` (which should really be `MetadataPresenter`), but I suppose having it next to requestReadReceipt makes sense as well. feel free to leave as is.
k9mail-k-9
java
@@ -1,6 +1,6 @@ Summary: Open Programmable Acceleration Engine (OPAE) SDK Name: opae -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?dist} License: BSD ExclusiveArch: x86_64
1
Summary: Open Programmable Acceleration Engine (OPAE) SDK Name: opae Version: 1.4.0 Release: 1%{?dist} License: BSD ExclusiveArch: x86_64 Group: Development/Libraries Vendor: Intel Corporation Requires: uuid, json-c, python URL: https://github.co...
1
19,485
Let's go back to 1.4.0 until the release is being prepared.
OPAE-opae-sdk
c
@@ -7337,6 +7337,7 @@ pre_system_call(dcontext_t *dcontext) size_t sigsetsize) */ /* we also need access to the params in post_system_call */ + uint errno_val = 0; dcontext->sys_param0 = sys_param(dcontext, 0); dcontext->sys_param1 = sys_param(dcontext, 1); ...
1
/* ******************************************************************************* * Copyright (c) 2010-2021 Google, Inc. All rights reserved. * Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * ****************************...
1
25,720
I would avoid the term "errno" as it implies the glibc variable. Use error_code or status or something.
DynamoRIO-dynamorio
c
@@ -69,7 +69,7 @@ func (i *inbound) Channel() *tchannel.Channel { return i.ch } -func (i *inbound) Start(h transport.Handler) error { +func (i *inbound) Start(h transport.Handler, d transport.Dependencies) error { sc := i.ch.GetSubChannel(i.ch.ServiceName()) existing := sc.GetHandlers() sc.SetHandler(handler...
1
// Copyright (c) 2016 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
10,408
@abhinav @kriskowal what do you think about putting the handler on `d`?
yarpc-yarpc-go
go
@@ -91,7 +91,7 @@ type BackupOptions struct { ExcludeLargerThan string Stdin bool StdinFilename string - Tags []string + Tags restic.TagList Host string FilesFrom []string TimeStamp string
1
package main import ( "bufio" "bytes" "context" "fmt" "io" "io/ioutil" "os" "path" "path/filepath" "runtime" "strconv" "strings" "time" "github.com/spf13/cobra" tomb "gopkg.in/tomb.v2" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/debug" "github.com/restic/restic/i...
1
12,335
Why `restic.TagLists` and no `restic.TagList` ? Because I'm using `restic.TagList` here and using `restic.TagLists` is a lot of changes
restic-restic
go
@@ -50,6 +50,8 @@ func TestWait(t *testing.T) { cancel() return ctx }(), + // Ensure the timer and context do not end simultaneously. + delay: 1 * time.Hour, expected: context.Canceled, }, }
1
// Copyright The 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
1
16,722
An hour seems a significant amount of time to wait for within a test, does it need to be that long?
open-telemetry-opentelemetry-go
go
@@ -204,7 +204,7 @@ func (d *RPCFactory) CreateFrontendGRPCConnection(hostName string) *grpc.ClientC } } - return d.dial(hostName, tlsClientConfig) + return d.dial(hostName, tlsClientConfig, false) } // CreateInternodeGRPCConnection creates connection for gRPC calls
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,946
Nit: (newish to golang, don't hesitate to tell me I'm wrong here, but ...) I'd have written this code, just for readability: keepAlive := false return d.dial(hostName, tlsClientConfig, keepAlive) ... or even return d.dial(hostName, tlsClientConfig, false) // keepAlive=false Personally I think Golang should have include...
temporalio-temporal
go
@@ -13,6 +13,7 @@ namespace Datadog.Trace.Configuration AspNetMvc, AspNetWebApi2, GraphQL, + Msmq, MongoDb, XUnit, NUnit,
1
// ReSharper disable InconsistentNaming - Name is used for integration names namespace Datadog.Trace.Configuration { internal enum IntegrationIds { HttpMessageHandler, HttpSocketsHandler, WinHttpHandler, CurlHandler, AspNetCore, AdoNet, AspNet, Asp...
1
20,392
I don't think it would cause any version conflict, but I'd feel safer if you declared it last, so that the numerical id of the existing integrations don't change
DataDog-dd-trace-dotnet
.cs
@@ -135,6 +135,9 @@ func (c *certificateRequestManager) updateCertificateStatus(ctx context.Context, ready = cmmeta.ConditionTrue reason = "Ready" message = "Certificate is up to date and has not expired" + case apiutil.CertificateRequestHasInvalidRequest(req): + reason = "InvalidRequest" + message = fmt.Spr...
1
/* Copyright 2019 The Jetstack cert-manager contributors. 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
20,128
Can we provide some more useful actionable info here? `fmt.Sprintf("The certificate request could not be completed due to invalid request options: %s", req.Status.Conditions[InvalidRequestCondition].Message)`
jetstack-cert-manager
go
@@ -155,6 +155,7 @@ var ( API: API{ UseRDS: false, Port: 14014, + Web3Port: 15014, // TODO: port 15014 is used for testing TpsWindow: 10, GasStation: GasStation{ SuggestBlockWindow: 20,
1
// Copyright (c) 2019 IoTeX Foundation // 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...
1
24,128
yeah, can change to 8545
iotexproject-iotex-core
go
@@ -16,6 +16,11 @@ use Ergonode\BatchAction\Domain\Entity\BatchActionId; use Ergonode\SharedKernel\Domain\AggregateId; use Symfony\Component\Messenger\Stamp\HandledStamp; use Ergonode\BatchAction\Domain\Repository\BatchActionRepositoryInterface; +use Ergonode\Core\Application\Security\User\CachedUser; +use Ergonode\...
1
<?php /** * Copyright © Ergonode Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\BatchAction\Application\Transport; use Symfony\Component\Messenger\Transport\TransportInterface; use Doctrine\DBAL\Connection; use Symfony\Component\Messenger\Enve...
1
9,624
As far as I can see you're not rollbacking transaction anywhere. This could potentially cause further issues(and very hard to debug ones) with not synchronized transactions between message handling. Is the transaction required in this place anyway? You seem only to be fetching data here. ack method is performing some u...
ergonode-backend
php
@@ -16,9 +16,14 @@ package io.servicecomb.transport.rest.vertx; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + import io.servicecomb.core.Const; import io.servicecomb.core.Invocation; import io.servicecomb.core.transport.AbstractTransport; +import ...
1
/* * Copyright 2017 Huawei Technologies Co., Ltd * * 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 l...
1
6,714
What's the meaning of null URIEndpointObject?
apache-servicecomb-java-chassis
java
@@ -4,14 +4,17 @@ import os import sys import logging import logging.config -from six.moves import input, configparser + from kinto.core import scripts from pyramid.scripts import pserve from pyramid.paster import bootstrap from kinto import __version__ from kinto.config import init -CONFIG_FILE = 'config/kin...
1
from __future__ import print_function import argparse import os import sys import logging import logging.config from six.moves import input, configparser from kinto.core import scripts from pyramid.scripts import pserve from pyramid.paster import bootstrap from kinto import __version__ from kinto.config import init CO...
1
9,521
Why did you remove the time? It can be useful if some actions are ran in jobs?
Kinto-kinto
py
@@ -32,7 +32,7 @@ import ( "github.com/ncw/rclone/lib/pacer" "github.com/ncw/rclone/lib/readers" "github.com/pkg/errors" - mega "github.com/t3rm1n4l/go-mega" + "github.com/t3rm1n4l/go-mega" ) const (
1
// Package mega provides an interface to the Mega // object storage system. package mega /* Open questions * Does mega support a content hash - what exactly are the mega hashes? * Can mega support setting modification times? Improvements: * Uploads could be done in parallel * Downloads would be more efficient done in...
1
8,103
File is not `goimports`-ed (from `goimports`)
rclone-rclone
go
@@ -7,12 +7,12 @@ import ( "math/big" "strings" - ethereum "github.com/sonm-io/go-ethereum" - "github.com/sonm-io/go-ethereum/accounts/abi" - "github.com/sonm-io/go-ethereum/accounts/abi/bind" - "github.com/sonm-io/go-ethereum/common" - "github.com/sonm-io/go-ethereum/core/types" - "github.com/sonm-io/go-ethereum...
1
// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package api import ( "math/big" "strings" ethereum "github.com/sonm-io/go-ethereum" "github.com/sonm-io/go-ethereum/accounts/abi" "github.com/sonm-io/go-ethereum/accounts/abi/bind" "github.com/sonm-io/go-e...
1
7,003
What the reason to change imports?
sonm-io-core
go
@@ -83,6 +83,15 @@ public class HiveClientPool extends ClientPool<HiveMetaStoreClient, TException> return client; } + @Override + protected boolean failureDetection(Exception e) { + if (super.failureDetection(e) || (e != null && e instanceof MetaException && + e.getMessage().contains("Got exce...
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
32,392
Nit: continuation indents are 2 indents / 4 spaces.
apache-iceberg
java
@@ -666,10 +666,15 @@ class JMX(object): parsed_url = parse.urlsplit(default_address) if parsed_url.scheme: cfg.append(JMX._string_prop("HTTPSampler.protocol", parsed_url.scheme)) - if parsed_url.hostname: - cfg.append(JMX._string_prop("HTTPSampler.do...
1
""" Module holds all stuff regarding JMX format Copyright 2015 BlazeMeter 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 app...
1
13,914
You can use `netloc.rsplit(":")` for that.
Blazemeter-taurus
py
@@ -143,7 +143,7 @@ func (w *watcher) run(ctx context.Context, repo git.Repo, repoCfg *config.PipedR continue } if !ok { - w.logger.Error("configuration file for Image Watcher not found", + w.logger.Info("configuration file for Image Watcher not found", zap.String("repo-id", repoCfg.RepoID), ...
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
12,406
nits, I don't get the point of this change
pipe-cd-pipe
go
@@ -0,0 +1,13 @@ +// +build !windows + +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package log + +// Log message prefixes. +const ( + successPrefix = "✔ Success!" + errorPrefix = "✘ Error!" + warningPrefix = "Note:" +)
1
1
10,427
`warningPrefix` looks the same on both platforms, we could move it up to `log.go`.
aws-copilot-cli
go
@@ -65,10 +65,10 @@ type Config struct { Inbounds Inbounds Outbounds Outbounds - // Filter and Interceptor that will be applied to all outgoing and incoming - // requests respectively. - Filter transport.Filter - Interceptor transport.Interceptor + // Filters and Interceptors that will be applied to all out...
1
// Copyright (c) 2016 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
11,372
What's the motivation behind switching to plural here? I think we want singular cc @abhinav
yarpc-yarpc-go
go
@@ -26,6 +26,19 @@ import ( "fmt" ) +// Wrap returns a new Status that wraps the original error. +// +// The Code should never be CodeOK, if it is, this will return nil. +func Wrap(code Code, err error) *Status { + if code == CodeOK { + return nil + } + return &Status{ + code: code, + err: &wrapError{err: err}...
1
// Copyright (c) 2021 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
19,725
What do you think about renaming this method `FromErrorAndCode(code Code, err error) *Status`? One of the benefits is that it will be consistent with the naming of `func FromError(err error) *Status {` which does something almost similar.
yarpc-yarpc-go
go
@@ -35,7 +35,7 @@ namespace Nethermind.JsonRpc [ConfigItem(Description = "Port number for JSON RPC calls. Ensure the firewall is configured when enabling JSON RPC.", DefaultValue = "8545")] int Port { get; set; } - [ConfigItem(Description = "Port number for JSON RPC web socket calls. ...
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...
1
23,089
we cannot state that by default the same value is used if we stopped using null - it would suggest that when you change JSON RPC and leave WS port default then they would be same.
NethermindEth-nethermind
.cs
@@ -142,7 +142,7 @@ func chromeTestImpl(version protocol.VersionNumber, url string, blockUntilDone f } utils.Infof("Running chrome: %s '%s'", getChromePath(), strings.Join(args, "' '")) command := exec.Command(path, args...) - session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) + session, err := gexe...
1
package chrome_test import ( "bytes" "fmt" "io" "io/ioutil" "net/http" "os" "os/exec" "runtime" "strconv" "strings" "sync/atomic" "time" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/protocol" ...
1
6,601
I'm still not convinced dropping Chrome logs is the right thing to do, but if you insist
lucas-clemente-quic-go
go
@@ -38,7 +38,7 @@ public class ReflectionParameterDeclaration implements ParameterDeclaration { @Override public String getName() { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Unable to get the name"); } @Override
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
14,156
It would be helpful to include some reasoning here. With the reflection model, it is often the case that names are not available.
javaparser-javaparser
java
@@ -82,6 +82,7 @@ func Run() { certmagic.UserAgent = appName + "/" + appVersion // Set up process log before anything bad happens + caddy.LogDestination = logfile switch logfile { case "stdout": log.SetOutput(os.Stdout)
1
// Copyright 2015 Light Code Labs, 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 agre...
1
13,082
Instead of setting this here, why not have the flag call in the init function set `caddy.LogDestination` directly, and switch on that?
caddyserver-caddy
go
@@ -20,6 +20,7 @@ * External dependencies */ import { get } from 'lodash'; +import { __ } from '@wordpress/i18n'; /** * Formats a number using the JS Internationalization Number Format API.
1
/** * Internationalization Utilities. * * Site Kit by Google, 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 * * https://www.apache.org/licenses/LICENS...
1
34,361
This belongs under "WordPress dependencies".
google-site-kit-wp
js
@@ -4,6 +4,8 @@ using Datadog.Trace.TestHelpers; using Xunit; using Xunit.Abstractions; +#if !NET452 + namespace Datadog.Trace.ClrProfiler.IntegrationTests { public class Elasticsearch5Tests : TestHelper
1
using System.Collections.Generic; using System.Linq; using Datadog.Trace.TestHelpers; using Xunit; using Xunit.Abstractions; namespace Datadog.Trace.ClrProfiler.IntegrationTests { public class Elasticsearch5Tests : TestHelper { public Elasticsearch5Tests(ITestOutputHelper output) : base("El...
1
14,966
Was there an issue on `net452`?
DataDog-dd-trace-dotnet
.cs
@@ -201,12 +201,17 @@ namespace Microsoft.Cci.Writers.CSharp WriteOutParameterInitializations(method); - if (_forCompilationThrowPlatformNotSupported) + if (_platformNotSupportedExceptionMessage != null) { Write("throw new "); if (_fo...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Linq; using Microsoft.Cci.Extensi...
1
12,567
Another option is to always write it without quotes. I always have to use SR. And why not?
dotnet-buildtools
.cs
@@ -1,7 +1,7 @@ import PropTypes from 'prop-types' +import deepmerge from 'deepmerge' // < 1kb payload overhead when lodash/merge is > 3kb. -export const defaultBreakpoints = [40, 52, 64].map(n => n + 'em') - +// PropTypes export const propType = PropTypes.oneOfType([ PropTypes.number, PropTypes.string,
1
import PropTypes from 'prop-types' export const defaultBreakpoints = [40, 52, 64].map(n => n + 'em') export const propType = PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.array, PropTypes.object, ]) export const cloneFunction = fn => (...args) => fn(...args) export const get = (obj, .....
1
5,050
This should use the `merge` function added in #473 instead of introducing a new dependency
styled-system-styled-system
js
@@ -14480,6 +14480,16 @@ bool CoreChecks::ValidateDescriptorUpdateTemplate(const char *func_name, func_name, pd_set, report_data->FormatHandle(pCreateInfo->pipelineLayout).c_str()); } } + } else if (VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET == pCreateIn...
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. * Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (t...
1
21,711
Shouldn't this say "a binding with descriptor type VK_DESCRIPTOR_TYPE_MUTABLE_VALVE"
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -12,6 +12,8 @@ #include <wlr/types/wlr_tablet_v2.h> #include <wlr/util/log.h> +static const struct wlr_tablet_tool_v2_grab_interface default_tool_interface; + static const struct wlr_surface_role tablet_tool_cursor_surface_role = { .name = "wp_tablet_tool-cursor", };
1
#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #endif #include "tablet-unstable-v2-protocol.h" #include "util/array.h" #include <assert.h> #include <stdlib.h> #include <types/wlr_tablet_v2.h> #include <wayland-util.h> #include <wlr/types/wlr_tablet_tool.h> #include <wlr/types/wlr_tablet_v2.h> #include <wlr/ut...
1
12,172
This variable name should probably contain `grab`
swaywm-wlroots
c
@@ -0,0 +1,10 @@ +# frozen_string_literal: true + +# These configuration settings are used to communicate with the +# Open Aire Research Project Registry API. For more information about +# the API and to verify that your configuration settings are correct, +Rails.configuration.x.open_aire.api_base_url = "https://api.op...
1
1
19,201
Which initializer should we be using for open_aire? The one in `external_apis` or this one in `initializers`?
DMPRoadmap-roadmap
rb
@@ -8,6 +8,7 @@ import ( inet "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net" pstore "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore" + routing "gx/ipfs/QmTiRqrF5zkdZyrdsL5qndG1UbeWi8k8N2pYxCtXWrahR2/go-libp2p-routing" peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY7...
1
package filnet import ( "context" "math/rand" "sync" "time" inet "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net" pstore "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore" peer "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer" host "gx/ipfs...
1
16,386
remove todo on line 28?
filecoin-project-venus
go
@@ -0,0 +1,17 @@ +_base_ = [ + '../_base_/models/retinanet_r50_fpn.py', '../common/mstrain_3x_coco.py' +] +# optimizer +model = dict( + pretrained='open-mmlab://resnext101_64x4d', + backbone=dict( + type='ResNeXt', + depth=101, + groups=64, + base_width=4, + num_stages=4, + ...
1
1
24,577
clean unnecessary arguments.
open-mmlab-mmdetection
py
@@ -30,6 +30,8 @@ public enum Status { SUCCEEDED(50), KILLING(55), KILLED(60), + // EXECUTION_STOPPED refers to a terminal flow status due to crashed executor/container + EXECUTION_STOPPED(65), FAILED(70), FAILED_FINISHING(80), SKIPPED(90),
1
/* * Copyright 2014 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 applicable law or agreed to i...
1
22,159
Could the name of the status be confusing to users? It says the execution stopped but is it a temporary stop? Will it continue to run at some point? To me the name does not suggest a final status but a transition one. WDYT @sshardool @jakhani @djaiswal83 @aditya1105
azkaban-azkaban
java
@@ -20,7 +20,8 @@ import testtools -import molecule.provisioners as provisioners +from molecule.Provisioners import DockerProvisioner +import molecule.utilities from molecule.core import Molecule import yaml from molecule.ansible_playbook import AnsiblePlaybook
1
# Copyright (c) 2015 Cisco Systems # # 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 rights # to use, copy, modify, merge, publish, ...
1
6,219
Since we created a Provisioners directory, can we do the same with the tests, and follow the same structure as the code?
ansible-community-molecule
py
@@ -16,11 +16,12 @@ import ( ) var ( - sentryAddr string // Address of the sentry <host>:<port> - coreAddr string // Address of the core <host>:<port> - chaindata string // Path to chaindata - database string // Type of database (lmdb or mdbx) - mapSizeStr string // Map size for LMDB + sentryAdd...
1
package commands import ( "context" "fmt" "os" "os/signal" "syscall" "github.com/c2h5oh/datasize" "github.com/ledgerwatch/turbo-geth/cmd/utils" "github.com/ledgerwatch/turbo-geth/ethdb" "github.com/ledgerwatch/turbo-geth/internal/debug" "github.com/ledgerwatch/turbo-geth/log" "github.com/spf13/cobra" ) va...
1
22,051
We don't need that one anymore?
ledgerwatch-erigon
go
@@ -40,6 +40,7 @@ from graphite.render.attime import parseATTime from graphite.render.functions import PieFunctions from graphite.render.hashing import hashRequest, hashData from graphite.render.glyph import GraphTypes +from graphite.storage import STORE from django.http import HttpResponse, HttpResponseServerErr...
1
"""Copyright 2008 Orbitz WorldWide 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...
1
9,874
Since we're determining the local node's host info in the `Store()` init, we need to import the `STORE` object here. Is this OK, or should I be determining the host info earlier. (When parsing settings?)
graphite-project-graphite-web
py
@@ -15,7 +15,7 @@ public interface ASTAnyTypeBodyDeclaration extends JavaNode { /** * Returns the child of this declaration, * which can be cast to a more specific node - * type using {@link #getKind()} as a cue. + * type using #getKind() as a cue. * * <p>Returns null if this is an ...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.ast; /** * Marker interface for type body declarations, such as annotation members, field or method declarations. * * @author Clément Fournier */ public interface ASTAnyTypeBodyDeclaration...
1
16,953
I think, there is no `#getKind()` method anymore, is it? The approach would now be testing with instanceof. Or could we return a more specific type than JavaNode now?
pmd-pmd
java
@@ -60,6 +60,15 @@ module.exports = (props) => { title: props.title })} </div> + <button class="UppyButton--circular UppyButton--blue Browser-doneBtn" + type="button" + aria-label="Done picking files" + title="Done picking files" + oncl...
1
const html = require('yo-yo') const Breadcrumbs = require('./Breadcrumbs') const Table = require('./Table') module.exports = (props) => { let filteredFolders = props.folders let filteredFiles = props.files if (props.filterInput !== '') { filteredFolders = props.filterItems(props.folders) filteredFiles =...
1
10,198
can we localise these? not sure if we have easy access to a translator instance from `generic-provider-views`
transloadit-uppy
js
@@ -94,3 +94,14 @@ const ( NFC1_PIN Pin = 9 NFC2_PIN Pin = 10 ) + +// USB CDC identifiers +const ( + usb_STRING_PRODUCT = "Particle Argon" + usb_STRING_MANUFACTURER = "Particle" +) + +var ( + usb_VID uint16 = 0x239A + usb_PID uint16 = 0x8029 +)
1
// +build particle_argon package machine const HasLowFrequencyCrystal = true // More info: https://docs.particle.io/datasheets/wi-fi/argon-datasheet/ // Board diagram: https://docs.particle.io/assets/images/argon/argon-block-diagram.png // LEDs const ( LED Pin = 44 LED_GREEN Pin = 14 LED_RED Pin = 13 LE...
1
8,823
This is the VID from Adafruit. Doesn't Particle have a different VID? (CC @suda).
tinygo-org-tinygo
go
@@ -97,8 +97,7 @@ static void parseBlock (lexerState *lexer, bool delim, int kind, vString *scope) /* Resets the scope string to the old length */ static void resetScope (vString *scope, size_t old_len) { - scope->length = old_len; - scope->buffer[old_len] = '\0'; + vStringTruncate (scope, old_len); } /* Adds a ...
1
/* * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for Rust files. */ /* * INCLUDE FILES */ #include "general.h" /* must always come first */ #inclu...
1
16,156
The function is only used once, and this body is now only 1 call with the same args (e.g. basically an alias for `vStringTruncate`), it could probably be simply removed. But if you wanna keep the naming for clarity, it also sounds reasonable.
universal-ctags-ctags
c
@@ -176,8 +176,8 @@ func (k *Kad) manage() { k.logger.Debugf("could not remove peer from addressbook: %s", peer.String()) } } - k.logger.Debugf("error connecting to peer from kademlia %s: %v", bzzAddr.String(), err) - k.logger.Warningf("connecting to peer %s: %v", bzzAddr.ShortString(), err...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package kademlia import ( "context" "encoding/json" "errors" "fmt" "sync" "time" "github.com/ethersphere/bee/pkg/addressbook" "github.com/ethersphe...
1
13,157
please change to `could not connect to peer: %s`. it is not relevant to say "from kademlia" in a warning
ethersphere-bee
go
@@ -103,8 +103,13 @@ StatusOr<DataSet> SubmitJobExecutor::buildResult(meta::cpp2::AdminJobOp jobOp, } Value SubmitJobExecutor::convertJobTimestampToDateTime(int64_t timestamp) { - return timestamp > 0 ? Value(time::TimeConversion::unixSecondsToDateTime(timestamp)) - : Value::kEmpty; + if (ti...
1
/* Copyright (c) 2020 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "graph/executor/admin/SubmitJobExecutor.h" #include <thrift/lib/cpp/util/EnumUtils.h> #include "common/time/ScopedTimer.h" #include "common/time/TimeUtils.h" #include "graph/context/QueryC...
1
33,316
Why need to remove this? Datetime has microseconds in fact.
vesoft-inc-nebula
cpp
@@ -105,7 +105,12 @@ func PrivateKeyBytes(key crypto.PrivateKey) []byte { case *rsa.PrivateKey: keyBytes = x509.MarshalPKCS1PrivateKey(key) case *ecdsa.PrivateKey: - keyBytes, _ = x509.MarshalECPrivateKey(key) + var err error + var t *testing.T + keyBytes, err = x509.MarshalECPrivateKey(key) + if err != nil...
1
package https import ( "bytes" "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/x509" "os" "runtime" "testing" ) func TestSaveAndLoadRSAPrivateKey(t *testing.T) { keyFile := "test.key" defer os.Remove(keyFile) privateKey, err := rsa.GenerateKey(rand.Reader, 128) // make tests...
1
8,123
What's up with this, isn't it nil? Why not use the real T value from the test function? @elcore @wmark
caddyserver-caddy
go
@@ -34,7 +34,9 @@ class TCallableObject extends TObject return false; } - public function getAssertionString(bool $exact = false): string + public function getAssertionString() + + /** @psalm-mutation-free */: string { return 'object'; }
1
<?php namespace Psalm\Type\Atomic; /** * Denotes an object that is also `callable` (i.e. it has `__invoke` defined). */ class TCallableObject extends TObject { public function __toString(): string { return 'callable-object'; } public function getKey(bool $include_extra = true): string {...
1
12,741
this feels weird
vimeo-psalm
php