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
@@ -481,6 +481,12 @@ func buildImage(mountPointMap, mountPointToFsTypeMap, mountPointToMountArgsMap m setupChrootPackages = append(setupChrootPackages, toolingPackage.Name) } + logger.Log.Infof("HidepidDisabled is %v.", systemConfig.HidepidDisable) + hidepidEnable := true + if systemConfig.HidepidDisable { + hi...
1
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. // Tool to create and install images package main import ( "fmt" "os" "path/filepath" "gopkg.in/alecthomas/kingpin.v2" "microsoft.com/pkggen/imagegen/configuration" "microsoft.com/pkggen/imagegen/diskutils" "microsoft.com/pkggen/image...
1
14,113
Let's be consistent everywhere: either "Disable"/"Enable" or "Disabled"/"Enabled". I'm voting for the latter.:)
microsoft-CBL-Mariner
go
@@ -2041,6 +2041,10 @@ public class BesuCommand implements DefaultCommandValues, Runnable { if (isPruningEnabled()) { throw new ParameterException(commandLine, String.format("%s %s", "Pruning", errorSuffix)); } + if (isGoQuorumCompatibilityMode) { + throw new ParameterException( + ...
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
24,491
this works and is the smallest possible change but we could definitely fail earlier
hyperledger-besu
java
@@ -1,3 +1,4 @@ +//go:build !arm64 // +build !arm64 package nodeps
1
// +build !arm64 package nodeps // MariaDBDefaultVersion is the default MariaDB version const MariaDBDefaultVersion = MariaDB103 // ValidMariaDBVersions is the versions of MariaDB that are valid var ValidMariaDBVersions = map[string]bool{ MariaDB55: true, MariaDB100: true, MariaDB101: true, MariaDB102: true, M...
1
15,789
Should not have snuck in here right? This is a golang 1.17 feature, wii definitely want to update these
drud-ddev
go
@@ -25,6 +25,8 @@ class NotesScreenComponent extends BaseScreenComponent { constructor() { super(); + this.prevFolderId_ = null; + this.onAppStateChange_ = async () => { // Force an update to the notes list when app state changes const newProps = Object.assign({}, this.props);
1
const React = require('react'); const { AppState, View, StyleSheet } = require('react-native'); const { stateUtils } = require('lib/reducer.js'); const { connect } = require('react-redux'); const { NoteList } = require('lib/components/note-list.js'); const Folder = require('lib/models/Folder.js'); const Tag = require(...
1
14,575
Could you explain the logic with prevFolderId?
laurent22-joplin
js
@@ -0,0 +1,13 @@ +package testutil + +import "github.com/facebookgo/clock" + +// TimestampNow get now timestamp from new clock +func TimestampNow() uint64 { + return TimestampNowFromClock(clock.New()) +} + +// TimestampNowFromClock get now timestamp from specific clock +func TimestampNowFromClock(c clock.Clock) uint64 ...
1
1
12,246
Please add license header
iotexproject-iotex-core
go
@@ -47,12 +47,13 @@ namespace lbann { -lbann_comm* initialize(int& argc, char**& argv, int seed) { +lbann_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,625
It bothers me that the user calls `initialize` without also calling `finalize`. It seems to me that we're essentially making `lbann_comm` a singleton object. Going further down this path, we would put `initialize` inside `lbann_comm`'s constructor and `finalize` in the destructor. This has it's own weirdness - the user...
LLNL-lbann
cpp
@@ -353,6 +353,7 @@ void test4() { smi = MolToSmiles(*m); CHECK_INVARIANT(smi == "c1cc[cH-]c1", smi); TEST_ASSERT(m->getConformer().is3D() == false); + delete m; BOOST_LOG(rdInfoLog) << " Finished <---------- " << std::endl; }
1
// // Copyright (C) 2002-2018 Greg Landrum and Rational Discovery LLC // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <RDGeneral/te...
1
18,997
We should probably make a unique_ptr<ROMol> typedef in ROMol.h and start using that liberally.
rdkit-rdkit
cpp
@@ -555,9 +555,13 @@ DefaultSettings.prototype = { * ``` * * @type {Boolean|String|Object} - * @default true + * @default fillHandle: { + autoInsertRow: false, + } */ - fillHandle: true, + fillHandle: { + autoInsertRow: false, + }, /** * Allows to specify the number of fixed...
1
import {isDefined} from './helpers/mixed'; import {isObjectEqual} from './helpers/object'; /** * @alias Options * @constructor * @description * ## Constructor options * * Constructor options are applied using an object literal passed as a second argument to the Handsontable constructor. * * ```js * var hot =...
1
14,822
Can you add missing asterisk?
handsontable-handsontable
js
@@ -243,7 +243,15 @@ public class Name { } public String toUpperCamelAndDigits() { - char[] upper = toUpperCamel().toCharArray(); + return capitalizeDigitsAfterNumbers(toUpperCamel()); + } + + public String toLowerCamelAndDigits() { + return capitalizeDigitsAfterNumbers(toLowerCamel()); + } + + pri...
1
/* Copyright 2016 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 * * Unless required by applicable law or agreed to in...
1
30,835
late to the party, but I bet it meant to be `capitalizeLettersAfterNumbers` :)
googleapis-gapic-generator
java
@@ -235,6 +235,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, private RecipientPresenter recipientPresenter; private MessageBuilder currentMessageBuilder; private boolean mFinishAfterDraftSaved; + private boolean firstTimeEmptyObject = true; @Override publi...
1
package com.fsck.k9.activity; import java.text.DateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.ann...
1
13,425
The Activity is recreated on configuration changes and the value of the field is lost. So, e.g. pressing 'send' once will display the error message. If you rotate the device and press 'send' again, the message will show another time. Use `onSaveInstanceState()` and `onRetainInstanceState()` to save and restore the valu...
k9mail-k-9
java
@@ -643,7 +643,7 @@ func (s *Server) reloadOptions(curOpts, newOpts *Options) error { if err != nil { return err } - // Create a context that is used to pass special info that we may need + // Create a ctx that is used to pass special info that we may need // while applying the new options. ctx := reloadCont...
1
// Copyright 2017-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
9,980
Looks like a "find and replace" unintended change here
nats-io-nats-server
go
@@ -590,12 +590,13 @@ class SPRegion(PyRegion): inputVector = numpy.array(rfInput[0]).astype('uint32') outputVector = numpy.zeros(self._sfdr.getNumColumns()).astype('uint32') - # Switch to using a random SP if learning mode is off and the SP hasn't - # learned anything yet. + # Don't strip unlearne...
1
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
1
18,930
haven't we got rid off `randomSP` recently? (I think `not learn` implied that)
numenta-nupic
py
@@ -97,6 +97,7 @@ func (in *{{.Type}}) GetChaos() *ChaosInstance { Kind: Kind{{.Type}}, StartTime: in.CreationTimestamp.Time, Action: "", + Status: string(in.GetStatus().Experiment.Phase), UID: string(in.UID), }
1
// Copyright 2020 Chaos Mesh 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
18,058
Why we need use `in.GetStatus()` function here? Can we use `in.Status.xxxx` directly?
chaos-mesh-chaos-mesh
go
@@ -93,7 +93,10 @@ func RenewManagedCertificates(allowPrompts bool) (err error) { continue } - // this works well because managed certs are only associated with one name per config + // This works well because managed certs are only associated with one name per config. + // Note, the renewal inside her...
1
package caddytls import ( "log" "time" "golang.org/x/crypto/ocsp" ) func init() { // maintain assets while this package is imported, which is // always. we don't ever stop it, since we need it running. go maintainAssets(make(chan struct{})) } const ( // RenewInterval is how often to check certificates for re...
1
8,575
@cretz Just a thought: what if another renewal process updates the certificate between the beginning of this for loop (above on line 67) and actually calling RenewCert? Even though we have a read lock on the certCache, something else could have renewed it by now, and finished, which would cause this certificate to be r...
caddyserver-caddy
go
@@ -57,13 +57,13 @@ PDEBUG_SYSTEM_OBJECTS g_ExtSystem; // Queries for all debugger interfaces. #ifndef FEATURE_PAL -extern "C" HRESULT +HRESULT ExtQuery(PDEBUG_CLIENT client) { HRESULT Status; g_ExtClient = client; #else -extern "C" HRESULT +HRESULT ExtQuery(ILLDBServices* services) { // Ini...
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. // ==++== // // // ==--== #include "exts.h" #include "disasm.h" #ifndef FEATURE_PAL #define VER_PRODUCTVERSION_...
1
13,472
We don't need this for the PInvoke?
dotnet-diagnostics
cpp
@@ -661,6 +661,10 @@ func (s *scheduler) getMentionedAccounts(ctx context.Context, event model.Notifi return nil, err } + if ds.GenericDeploymentConfig.DeploymentNotification == nil { + return nil, nil + } + for _, v := range ds.GenericDeploymentConfig.DeploymentNotification.Mentions { if e := "EVENT_" + v...
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
20,483
nits, I think add a log (using s.logger) to show why does this return with no error is better.
pipe-cd-pipe
go
@@ -334,7 +334,10 @@ func (a *WebAPI) getPiped(ctx context.Context, pipedID string) (*model.Piped, er // It gives back error unless the piped belongs to the project. func (a *WebAPI) validatePipedBelongsToProject(ctx context.Context, pipedID, projectID string) error { pid, err := a.pipedProjectCache.Get(pipedID) - ...
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
11,134
Btw, It would be nice if we have some tests for those validation functions.
pipe-cd-pipe
go
@@ -23,6 +23,8 @@ public abstract class PathTemplateCheckView { public abstract String paramName(); + public abstract String methodName(); + public static Builder newBuilder() { return new AutoValue_PathTemplateCheckView.Builder(); }
1
/* Copyright 2016 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 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 ...
1
16,382
Should this be called something that indicates its function, rather than its content? validationMessagePrefix, or similar?
googleapis-gapic-generator
java
@@ -3,7 +3,8 @@ #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. -#Copyright (C) 2010-2015 NV Access Limited, Mesar Hameed +#Copyright (C) 2010-2019 NV Access Limited, Mesar Hameed, Takuya Nishimoto +#Copyright (C) 2018-2019 T...
1
# -*- coding: UTF-8 -*- #keyCommandsDoc.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2010-2015 NV Access Limited, Mesar Hameed """Utilities related to NVDA Key Commands documents. """ import os ...
1
25,409
Please remove this line
nvaccess-nvda
py
@@ -599,7 +599,7 @@ void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser) { #if (defined(__WXMAC__) && defined(_DEBUG)) parser.AddLongOption("NSDocumentRevisionsDebugMode", _("Not used: workaround for bug in XCode 4.2")); #endif - parser.AddSwitch("nd", "no-daemon", _("Not run the daemon")); + parser.A...
1
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2017 University of California // // BOINC 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 Licens...
1
9,156
You could change the name of the command line switch too. Short options are typically one character after hyphen. wxWidgets' command line parser seems to handle `-nd` without confusing it with `-n` or `-d` but I'm not sure if that's by design or by accident. I'd remove the short option. `--no-daemon` is with hyphen but...
BOINC-boinc
php
@@ -69,8 +69,8 @@ func AddFlags(flagSet *pflag.FlagSet) { flags.BoolVarP(flagSet, &fs.Config.IgnoreCaseSync, "ignore-case-sync", "", fs.Config.IgnoreCaseSync, "Ignore case when synchronizing") flags.BoolVarP(flagSet, &fs.Config.NoTraverse, "no-traverse", "", fs.Config.NoTraverse, "Don't traverse destination file sy...
1
// Package configflags defines the flags used by rclone. It is // decoupled into a separate package so it can be replaced. package configflags // Options set by command line flags import ( "log" "net" "path/filepath" "strings" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclo...
1
9,853
File is not `goimports`-ed (from `goimports`)
rclone-rclone
go
@@ -439,7 +439,7 @@ func (r *RpmRepoCloner) clonePackage(baseArgs []string, enabledRepoOrder ...stri logger.Log.Debugf("stderr: %s", stderr) if err != nil { - logger.Log.Errorf("tdnf error (will continue if the only errors are toybox conflicts):\n '%s'", stderr) + logger.Log.Debugf("tdnf error (will continu...
1
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. package rpmrepocloner import ( "fmt" "io" "os" "path/filepath" "regexp" "strings" "microsoft.com/pkggen/internal/buildpipeline" "microsoft.com/pkggen/internal/logger" "microsoft.com/pkggen/internal/packagerepo/repocloner" "microsoft...
1
12,174
Why are we mentioning toybox in this message? AND it still says "tdnf error". What's the actual error? Should it be resolved instead of flagged?
microsoft-CBL-Mariner
go
@@ -473,6 +473,7 @@ describe('GridFS Stream', function () { // Fail if user tries to abort an aborted stream uploadStream.abort().then(null, function (error) { expect(error.toString()).to.equal( + // TODO(NODE-3405): Replace with Mo...
1
'use strict'; const { Double } = require('bson'); const stream = require('stream'); const { EJSON } = require('bson'); const fs = require('fs'); const { setupDatabase, withClient } = require('./shared'); const { expect } = require('chai'); const { GridFSBucket, ObjectId } = require('../../src'); describe('GridFS Stre...
1
20,706
You can remove these if they've been resolved in NODE-3405 and this isn't depending on it
mongodb-node-mongodb-native
js
@@ -1,7 +1,7 @@ <%# locals: { phase } %> <div class="row" id="<%= dom_id(phase) %>"> <div class="col-xs-12"> - <h4> + <h4 class=''> <%= _('Instructions') %> <a href="<%= edit_plan_path(plan_id, phase_id: phase.id) %>" class="btn btn-default pull-right"><%= _('Write plan') %></a> </h4>
1
<%# locals: { phase } %> <div class="row" id="<%= dom_id(phase) %>"> <div class="col-xs-12"> <h4> <%= _('Instructions') %> <a href="<%= edit_plan_path(plan_id, phase_id: phase.id) %>" class="btn btn-default pull-right"><%= _('Write plan') %></a> </h4> <p class="text-justify"> <div clas...
1
18,894
don't need the class here if its empty
DMPRoadmap-roadmap
rb
@@ -4,11 +4,15 @@ import Ember from 'ember'; import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; +const { computed } = Ember; + export default AppointmentIndexRoute.extend(DateFormat, { editReturn: 'appointments.search', filterParams: ['appointmentType', 'provider', 'status'], ...
1
import AppointmentIndexRoute from 'hospitalrun/appointments/index/route'; import DateFormat from 'hospitalrun/mixins/date-format'; import Ember from 'ember'; import moment from 'moment'; import { translationMacro as t } from 'ember-i18n'; export default AppointmentIndexRoute.extend(DateFormat, { editReturn: 'appoint...
1
13,691
This should be computed('i18n.locale'....
HospitalRun-hospitalrun-frontend
js
@@ -348,8 +348,8 @@ class BigQueryClient: status = self.client.jobs().get(projectId=project_id, jobId=job_id).execute(num_retries=10) if status['status']['state'] == 'DONE': if status['status'].get('errorResult'): - raise Exception('BigQuery job failed: {}'....
1
# -*- coding: utf-8 -*- # # Copyright 2015 Twitter 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 ...
1
19,865
Please add return and return type description to docstring of this method.
spotify-luigi
py
@@ -51,8 +51,10 @@ class ContributionsController < ApplicationController private def set_contributor - @contributor = ContributorFact.where(names: { id: params[:id] }).where(analysis_id: @project.best_analysis_id) - .eager_load(:name).first + id = params[:id].to_i + @contributor = Con...
1
class ContributionsController < ApplicationController COMMITS_SPARK_IMAGE = 'app/assets/images/bot_stuff/contribution_commits_spark.png' COMMITS_COMPOUND_SPARK_IMAGE = 'app/assets/images/bot_stuff/position_commits_compound_spark.png' helper :kudos, :projects helper MapHelper before_action :set_project_or_fa...
1
8,003
What does 1 << 32 do? In irb typing this yields 4294967296. I didn't find the append operator in Numeric or Integer.
blackducksoftware-ohloh-ui
rb
@@ -79,6 +79,16 @@ module RSpec RSpec.configuration.format_docstrings_block.call(description) end + # @attr_accessor + # + # Holds the completion status of the example (nil if not completed) + attr_accessor :succeeded + + # Convenience method for getting success status of exam...
1
module RSpec module Core # Wrapper for an instance of a subclass of {ExampleGroup}. An instance of # `RSpec::Core::Example` is returned by example definition methods # such as {ExampleGroup.it it} and is yielded to the {ExampleGroup.it it}, # {Hooks#before before}, {Hooks#after after}, {Hooks#around a...
1
13,031
We generally use metadata for this sort of thing, indeed there is a `metadata[:execution_result]`.
rspec-rspec-core
rb
@@ -483,6 +483,8 @@ class SpreadPlot(ElementPlot): style_opts = line_properties + fill_properties _plot_methods = dict(single='patch') + _stream_data = False # Plot does not support streaming data + def get_data(self, element, ranges, style): mapping = dict(x='x', y='y') xvals = ...
1
from collections import defaultdict import numpy as np import param from bokeh.models import CategoricalColorMapper, CustomJS, Whisker, Range1d from bokeh.models.tools import BoxSelectTool from bokeh.transform import jitter from ...core import Dataset, OrderedDict from ...core.util import max_range, basestring, dimen...
1
21,492
This was very confusing until I realized this might refer to the *bokeh* use of the word 'streaming'.
holoviz-holoviews
py
@@ -47,6 +47,10 @@ type TaskHandler struct { tasksToEvents map[string]*eventList // tasksToEventsLock for locking the map tasksToEventsLock sync.RWMutex + // batchMap is used to collect container events + // between task transitions + batchMap map[string][]api.ContainerStateChange + batchMapLock sync.RWMutex ...
1
// Copyright 2014-2017 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,144
Can you rename this as `tasksToContainerStates` ? If you do that, you can rename the lock as well
aws-amazon-ecs-agent
go
@@ -177,7 +177,7 @@ public class UserAccountManager { */ public Account getCurrentAccount() { final Account[] accounts = accountManager.getAccountsByType(accountType); - if (accounts == null || accounts.length == 0) { + if (accounts.length == 0) { return null; }
1
/* * Copyright (c) 2014-present, 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 noti...
1
16,955
Fixing `lint` warnings that have existed for a while.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -452,6 +452,18 @@ public interface Iterator<T> extends java.util.Iterator<T>, Traversable<T> { return io.vavr.collection.Collections.fill(n, s); } + /** + * Returns a Iterator containing {@code n} times the given {@code element} + * + * @param <T> Component type of the Iterator + ...
1
/* __ __ __ __ __ ___ * \ \ / / \ \ / / __/ * \ \/ / /\ \ \/ / / * \____/__/ \__\____/__/ * * Copyright 2014-2018 Vavr, http://vavr.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
1
12,927
An iterator **of {\@code n} sequential elements,** where each element ~are~ **is the** given {\@code element}.
vavr-io-vavr
java
@@ -3,11 +3,13 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> +using Datadog.Trace.Configuration; + namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.AdoNet.MySql { internal static class MySqlConstants { - ...
1
// <copyright file="MySqlConstants.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...
1
22,240
If all of the `SqlCommandIntegrationName` values are the same, can we just remove it from `IAdoNetClientData` entirely and put the constant there?
DataDog-dd-trace-dotnet
.cs
@@ -17,6 +17,8 @@ limitations under the License. package venafi import ( + "github.com/go-logr/logr" + logf "github.com/jetstack/cert-manager/pkg/logs" corelisters "k8s.io/client-go/listers/core/v1" apiutil "github.com/jetstack/cert-manager/pkg/api/util"
1
/* Copyright 2018 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
22,893
Maybe regroup this import with the other cert-manager packages.
jetstack-cert-manager
go
@@ -167,6 +167,8 @@ public class UserPreferences { int theme = getTheme(); if (theme == R.style.Theme_AntennaPod_Dark) { return R.style.Theme_AntennaPod_Dark_NoTitle; + }else if (theme == R.style.Theme_AntennaPod_TrueBlack){ + return R.style.Theme_AntennaPod_TrueBlack_No...
1
package de.danoeh.antennapod.core.preferences; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.SystemClock; import android.preference.PreferenceManager; import android.support.a...
1
13,687
There are spaces missing ;) Just have a look at the code style of the `if` statement above
AntennaPod-AntennaPod
java
@@ -55,6 +55,9 @@ func (w *DefaultWorker) Generate( mq := NewMessageQueue(pending) candidateMsgs := orderMessageCandidates(mq.Drain()) candidateMsgs = w.filterPenalizableMessages(ctx, candidateMsgs) + if len(candidateMsgs) > block.BlockMessageLimit { + candidateMsgs = candidateMsgs[:block.BlockMessageLimit] + } ...
1
package mining // Block generation is part of the logic of the DefaultWorker. // 'generate' is that function that actually creates a new block from a base // TipSet using the DefaultWorker's many utilities. import ( "context" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-acto...
1
23,748
We should pass the size limit as a parameter to Drain so that we don't take messages out of the pool and then drop them. It's ok to merge as is, I will file an issue.
filecoin-project-venus
go
@@ -1059,7 +1059,16 @@ encode_with_patch_list(dcontext_t *dcontext, patch_list_t *patch, instrlist_t *i instr_encode_to_copy(dcontext, inst, vmcode_get_writable_addr(pc), pc); byte *nxt_pc = vmcode_get_executable_addr(nxt_writable_pc); ASSERT(nxt_pc != NULL); +#ifdef AARCH64 + /* U...
1
/* ********************************************************** * Copyright (c) 2010-2021 Google, Inc. All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
24,882
Patch lists are used in many places so this is going to break other updates. This should just be a local change in emit_special_ibl_xfer() to pass the second-to-last instruction instead of the last instruction.
DynamoRIO-dynamorio
c
@@ -38,7 +38,7 @@ char const * test_genesis_data = R"%%%({ "source": "B0311EA55708D6A53C75CDBF88300259C6D018522FE3D4D0A242E431F9E8B6D0", "representative": "xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpiij4txtdo", "account": "xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpiij4txtdo", - "work": "9...
1
#include <nano/secure/common.hpp> #include <nano/crypto_lib/random_pool.hpp> #include <nano/lib/interface.h> #include <nano/lib/numbers.hpp> #include <nano/node/common.hpp> #include <nano/secure/blockstore.hpp> #include <nano/secure/versioning.hpp> #include <boost/endian/conversion.hpp> #include <boost/property_tree/...
1
15,543
@argakiig previous work was above live threshold, causing the high difficulty to bleed into other blocks when genesis open was processed in tests.
nanocurrency-nano-node
cpp
@@ -1,4 +1,4 @@ -class RemoveDiscountPercentageAndDiscountTitleFromProducts < ActiveRecord::Migration +class RemoveDiscountPercentageAndDiscountTitleFromProducts < ActiveRecord::Migration[4.2] def change remove_column :products, :discount_percentage, :integer remove_column :products, :discount_title, :stri...
1
class RemoveDiscountPercentageAndDiscountTitleFromProducts < ActiveRecord::Migration def change remove_column :products, :discount_percentage, :integer remove_column :products, :discount_title, :string end end
1
18,645
Metrics/LineLength: Line is too long. [89/80]
thoughtbot-upcase
rb
@@ -30,6 +30,7 @@ type SystemConfig struct { Encryption RootEncryption `json:"Encryption"` RemoveRpmDb bool `json:"RemoveRpmDb"` ReadOnlyVerityRoot ReadOnlyVerityRoot `json:"ReadOnlyVerityRoot"` + HidepidDisable bool `json:"HidepidDisable"` } // GetRootPa...
1
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. // Parser for the image builder's configuration schemas. package configuration import ( "encoding/json" "fmt" "strings" "microsoft.com/pkggen/internal/logger" ) // SystemConfig defines how each system present on the image is supposed to...
1
14,117
Please also extend the config tests now to include the new field.
microsoft-CBL-Mariner
go
@@ -53,6 +53,7 @@ namespace NLog.Layouts public JsonLayout() { this.Attributes = new List<JsonAttribute>(); + this.RenderEmptyLiteral = true; } /// <summary>
1
// // Copyright (c) 2004-2016 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
13,591
I think it's wise to keep the behavior backwards-compatible (so `false` as default)
NLog-NLog
.cs
@@ -47,7 +47,7 @@ module Selenium opts[:path] ||= '/' opts[:secure] ||= false - + opts[:sameSite] obj = opts.delete(:expires) opts[:expiry] = seconds_from(obj).to_i if obj
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
17,469
We don't need this line, do we?
SeleniumHQ-selenium
rb
@@ -0,0 +1,4 @@ +# Proprietary German backlinks service. +# They keep requesting invalid formats. +User-agent: SEOkicks-Robot +Disallow: /
1
1
17,372
I don't know if we've actually had this problem on Upcase. I'd lean towards having a blank file unless (like on robots) we see multiple errors per week from this crawler.
thoughtbot-upcase
rb
@@ -179,7 +179,13 @@ static void render_decorations(struct roots_view *view, float matrix[16]; wlr_matrix_project_box(&matrix, &project_box, WL_OUTPUT_TRANSFORM_NORMAL, view->rotation, &output->transform_matrix); - float color[4] = { 0.2, 0.2, 0.2, 1 }; + float color[4] = { 0.2, 0.2, 0.2, 1 }; + if (view_get_act...
1
#define _POSIX_C_SOURCE 200809L #include <time.h> #include <stdlib.h> #include <stdbool.h> #include <GLES2/gl2.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_wl_shell.h> #include <wlr/types/wlr_xdg_shell_v6.h> #include <wlr/render/matrix.h> #include <wlr/util/l...
1
9,716
I'm not good at picking colors, if anyone else has a preference.
swaywm-wlroots
c
@@ -50,6 +50,10 @@ class FoldersScreenUtils { this.refreshFolders(); }, 1000); } + + static cancelTimers() { + if (this.scheduleRefreshFoldersIID_) clearTimeout(this.scheduleRefreshFoldersIID_); + } } module.exports = { FoldersScreenUtils };
1
const Folder = require('lib/models/Folder.js'); const Setting = require('lib/models/Setting.js'); class FoldersScreenUtils { static async allForDisplay(options = {}) { const orderDir = Setting.value('folders.sortOrder.reverse') ? 'DESC' : 'ASC'; const folderOptions = Object.assign( {}, { caseInsensitiv...
1
11,762
Note that even if you cancel the timer, the refreshFolders function might still be running since it's async. Could that be a problem for the test units? One big issue I had with tests is they sometimes would work and sometimes fail randomly, and that's because there are still code running in the background. One example...
laurent22-joplin
js
@@ -0,0 +1,16 @@ +'use strict'; + +const tsd = require('tsd').default; +const { expect } = require('chai'); + +describe('Exported Types', () => { + it('should be as expected', async () => { + const diagnostics = await tsd(); + if (diagnostics.length !== 0) { + const messages = diagnostics + .map(d =>...
1
1
19,698
can we make this something more descriptive? like... types should compile? I'm still not sure exactly what this is testing... this says "Exported types" - but what does tsd actually look at?
mongodb-node-mongodb-native
js
@@ -48,17 +48,12 @@ public class BridgeWebChromeClient extends WebChromeClient { callback.onCustomViewHidden(); super.onShowCustomView(view, callback); } - - @Override - public void onHideCustomView() { - super.onHideCustomView(); - } @Override public void onPermissionRequest(final Permissi...
1
package com.getcapacitor; import android.Manifest; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.provider.MediaStore; import android.webkit.ConsoleMessage; import android.web...
1
8,775
this method is need for full screen video button to appear in players
ionic-team-capacitor
js
@@ -26,6 +26,7 @@ type HeadersCfg struct { penalize func(context.Context, []headerdownload.PenaltyItem) wakeUpChan chan struct{} batchSize datasize.ByteSize + increment *uint64 } func StageHeadersCfg(
1
package stagedsync import ( "context" "fmt" "runtime" "time" "github.com/c2h5oh/datasize" "github.com/ledgerwatch/turbo-geth/common" "github.com/ledgerwatch/turbo-geth/core/rawdb" "github.com/ledgerwatch/turbo-geth/core/types" "github.com/ledgerwatch/turbo-geth/eth/stagedsync/stages" "github.com/ledgerwatch...
1
22,178
Why is this a pointer?
ledgerwatch-erigon
go
@@ -30,12 +30,16 @@ import org.apache.iceberg.expressions.Expression; import org.apache.iceberg.expressions.Expressions; import org.apache.iceberg.expressions.UnboundPredicate; import org.apache.iceberg.relocated.com.google.common.base.Objects; +import org.apache.iceberg.relocated.com.google.common.base.Precondition...
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
26,025
nit: Space after comma
apache-iceberg
java
@@ -853,6 +853,11 @@ class XLongField(LongField): return lhex(self.i2h(pkt, x)) +class XLELongField(LELongField, XLongField): + def i2repr(self, pkt, x): + return XLongField.i2repr(self, pkt, x) + + class IEEEFloatField(Field): def __init__(self, name, default): Field.__init__(self...
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Fields: basic data structures that make up parts of packets. """ from __future__ import absolute_import import collection...
1
13,861
A similar field is already define in `scapy/layers/bluetooth.py`. Can you merge both definitions ?
secdev-scapy
py
@@ -204,6 +204,19 @@ class CppGenerator : public BaseGenerator { if (num_includes) code_ += ""; } + void GenExtraIncludes() { + if(parser_.opts.cpp_includes.empty()) { + return; + } + // non-const copy needed for std::strtok + std::string data = parser_.opts.cpp_includes; + for(char* pch ...
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
16,009
`std::strtok` isn't necessary. The `std::string::find_first_of` is better C++ alternative to `std::strtok`. For example, see `CheckedError Parser::ParseEnumFromString` method.
google-flatbuffers
java
@@ -3,9 +3,6 @@ namespace Psalm\CodeLocation; class DocblockTypeLocation extends \Psalm\CodeLocation { - /** @var int */ - public $raw_line_number; - public function __construct( \Psalm\FileSource $file_source, int $file_start,
1
<?php namespace Psalm\CodeLocation; class DocblockTypeLocation extends \Psalm\CodeLocation { /** @var int */ public $raw_line_number; public function __construct( \Psalm\FileSource $file_source, int $file_start, int $file_end, int $line_number ) { $this->file_st...
1
9,153
This property is already declared in a parent with the same visibility/type/value. This one is redundant.
vimeo-psalm
php
@@ -78,6 +78,8 @@ def autorun_get_interactive_session(cmds, **kargs): self.s = "" def write(self, x): self.s += x + def flush(self): + pass sw = StringWriter() sstdout,sstderr = sys.stdout,sys.stderr
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Run commands when the Scapy interpreter starts. """ import code,sys from scapy.config import conf from scapy.themes ...
1
9,409
This is required, otherwise multiprocessing will (for some reason) crash
secdev-scapy
py
@@ -19,6 +19,7 @@ package main import ( "encoding/base64" "fmt" + "github.com/algorand/go-algorand/data/basics" "io" "io/ioutil" "os"
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
35,302
Please put in a separate line-separated block
algorand-go-algorand
go
@@ -100,7 +100,7 @@ func (cmd *Command) Wait() error { func (cmd *Command) Kill() error { err := cmd.connectionManager.Disconnect() if err != nil { - return err + fmt.Printf("Disconnect error: %s\n", err) } cmd.httpApiServer.Stop()
1
package client import ( "fmt" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/mysterium/node/client_connection" "github.com/mysterium/node/communication" nats_dialog "github.com/mysterium/node/communication/nats/dialog" nats_discovery "github.com/mysterium/node/communication/nats/discovery" "git...
1
10,447
Should error be eaten? If so, not clear why
mysteriumnetwork-node
go
@@ -145,4 +145,7 @@ class AuthorizationPolicy(core_authorization.AuthorizationPolicy): class RouteFactory(core_authorization.RouteFactory): - pass + def __init__(self, request): + super(RouteFactory, self).__init__(request) + if self.on_collection and self.resource_name == 'bucket': + ...
1
from kinto.core import authorization as core_authorization from pyramid.security import IAuthorizationPolicy from zope.interface import implementer # Vocab really matters when you deal with permissions. Let's do a quick recap # of the terms used here: # # Object URI: # An unique identifier for an object. # for ...
1
9,166
This attribute is not defined if the condition is not met. Instead, you could define another RouteFactory (e.g. `BucketRouteFactory` with a class attribute like `allow_empty_list`)
Kinto-kinto
py
@@ -103,6 +103,13 @@ func WithCondition(cond hivev1.ClusterDeploymentCondition) Option { } } +// WithInstalledTimestamp adds the specified InstalledTimestamp to ClusterDeployment.Status +func WithInstalledTimestamp(timestamp metav1.Time) Option { + return func(clusterDeployment *hivev1.ClusterDeployment) { + clus...
1
package clusterdeployment import ( "time" configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" hivev1 "github.com/openshift/hive/pkg/apis/hive/v1" "github.com/openshift/hive/pkg/test/generic" ) // Option defines a function signature for ...
1
14,647
Can we use the existing `InstalledTimestamp` function?
openshift-hive
go
@@ -975,14 +975,15 @@ public class AddProductActivity extends AppCompatActivity { if (!editionMode) { if (addProductOverviewFragment.areRequiredFieldsEmpty()) { viewPager.setCurrentItem(0, true); - } else if (isNutritionDataAvailable() && addProductNutritionFactsFragmen...
1
package openfoodfacts.github.scrachx.openfood.views; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view....
1
67,817
weird naming: `is` but `fields` (plural or singular ?) . If the method checks if the fragment has an invalid value, then "hasInvalidValue" or "containsInvalidValue" is fine no ?
openfoodfacts-openfoodfacts-androidapp
java
@@ -28,7 +28,7 @@ LISTENS_PER_PAGE = 25 user_bp = Blueprint("user", __name__) -@user_bp.route("/<user_name>") +@user_bp.route("/<user_name>/") def profile(user_name): # Which database to use to showing user listens. db_conn = webserver.timescale_connection._ts
1
import listenbrainz.db.stats as db_stats import listenbrainz.db.user as db_user import urllib import ujson import psycopg2 import datetime import time from flask import Blueprint, render_template, request, url_for, Response, redirect, flash, current_app, jsonify from flask_login import current_user, login_required fro...
1
17,025
Does this mean that `listenbrainz.org/user/iliekcomputers` will start getting 404s?
metabrainz-listenbrainz-server
py
@@ -23,7 +23,11 @@ module Blacklight # CatalogController.include ModuleDefiningNewMethod # CatalogController.search_params_logic += [:new_method] # CatalogController.search_params_logic.delete(:we_dont_want) - self.search_params_logic = [:default_solr_parameters, :add_query_to_solr, :add_facet...
1
module Blacklight ## # This module contains methods that are specified by SearchHelper.search_params_logic # They transform user parameters into parameters that are sent as a request to Solr when # RequestBuilders#solr_search_params is called. # module RequestBuilders extend ActiveSupport::Concern e...
1
5,981
Line is too long. [82/80]
projectblacklight-blacklight
rb
@@ -28,6 +28,7 @@ CAN_INV_FILTER = 0x20000000 class CANSocket(SuperSocket): desc = "read/write packets at a given CAN interface using PF_CAN sockets" + async_select_unrequired = True def __init__(self, iface=None, receive_own_messages=False, can_filters=None, remove_padding=True, bas...
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.description = Native CANSocket # scapy.contrib.status = loads """ Native CANSocket. """ import struct import socket...
1
15,378
That's a strange name =)
secdev-scapy
py
@@ -48,6 +48,17 @@ describe CommunicartMailer do end end + context 'custom templates' do + it 'renders a default template when an origin is not indicated' do + expect(mail.body.encoded).to include('Purchase Request') + end + + it 'renders a custom template when origin is indicated...
1
require 'ostruct' describe CommunicartMailer do let(:approval_group) { FactoryGirl.create(:approval_group_with_approvers_and_requester, name: "anotherApprovalGroupName") } let(:approver) { FactoryGirl.create(:user) } let(:cart) { FactoryGirl.create(:cart_with_approvals, name: "TestCart") } def expect_csvs_to_...
1
12,230
Thoughts on this? I'm not crazy about the brittleness of this but haven't found a good way to test more generically that a specific (custom) template has been rendered.
18F-C2
rb
@@ -30,6 +30,7 @@ createMethods(Results.prototype, objectTypes.RESULTS, [ 'filtered', 'sorted', 'snapshot', + 'subscribe', 'isValid', 'indexOf', 'min',
1
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm 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/li...
1
16,829
Have we reached binding-level agreement on the `subscribe` terminology? My only concern is that it doesn't seem descriptive enough and may be confused with subscribing for notifications.
realm-realm-js
js
@@ -138,7 +138,9 @@ func (tr *tracer) newRecordingSpan(psc, sc trace.SpanContext, name string, sr Sa } for _, l := range config.Links() { - s.addLink(l) + if l.SpanContext.IsValid() { + s.addLink(l) + } } s.SetAttributes(sr.Attributes...)
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,674
would it not be safer to move this condition to the `addLink` method?
open-telemetry-opentelemetry-go
go
@@ -611,6 +611,13 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, di Dia rw.WriteHeader(res.StatusCode) + // for some apps which need a correct response header to start http2 streaming, + // it's important to explicit flush headers to the client before copy streaming data. + if req.Pr...
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,242
I think this might read better: > some apps need the response headers before starting to stream content with http2, so it's important to explicitly flush the headers to the client before streaming the data.
caddyserver-caddy
go
@@ -47,6 +47,13 @@ public interface FileScanTask extends ScanTask { */ PartitionSpec spec(); + /** + * The partition data for the file of this task. + * + * @return the partition data for the file of this task + */ + StructLike partition(); + /** * The starting position of this scan range in t...
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
34,212
What does this return if there is no partition? I think that we should consider adding a struct type that describes this tuple. That way, we can use an empty struct for unpartitioned and a non-empty struct for tasks that are combined by partition. We could also support more combinations, like combining across day parti...
apache-iceberg
java
@@ -493,7 +493,16 @@ func DeleteRepo( _, _, err = kbfsOps.Lookup(ctx, repoNode, normalizedRepoName) if err != nil { - return err + // For the common "repo doesn't exist" case, use an error type that the + // client can recognize. + switch errors.Cause(err).(type) { + case libkbfs.NoSuchNameError: + return ...
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 libgit import ( "context" "fmt" "io/ioutil" "os" "path" "regexp" "strconv" "strings" "time" "github.com/keybase/client/go/libkb" "github.com/keybase...
1
18,104
Also, it might be worth returning this for the above lookup on `kbfsRepoDir` as well, which could happen if someone tries to delete a repo in a TLF that has never had any repos at all.
keybase-kbfs
go
@@ -171,6 +171,12 @@ var ( Usage: "IP address to bind API to", Value: "127.0.0.1", } + // FlagTequilapiAllowedHostnames Restrict hostnames in requests' Host header to following domains. + FlagTequilapiAllowedHostnames = cli.StringFlag{ + Name: "tequilapi.allowed-hostnames", + Usage: "Comma separated list of ...
1
/* * Copyright (C) 2019 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
17,301
Can this be `Hidden: true` as we already have a bunch of flags that are printed on `--help` and this seems like an average person should not care about it.
mysteriumnetwork-node
go
@@ -488,11 +488,13 @@ class Controller $useCache = !Config::get('cms.twigNoCache'); $isDebugMode = Config::get('app.debug', false); + $strictVariables = (Config::get('cms.enableTwigStrictVariables', null) !== null) ?: $isDebugMode; $forceBytecode = Config::get('cms.forceBytecodeInval...
1
<?php namespace Cms\Classes; use Cms; use Url; use Str; use App; use File; use View; use Lang; use Flash; use Config; use Session; use Request; use Response; use Exception; use BackendAuth; use Twig_Environment; use Twig_Cache_Filesystem; use Cms\Twig\Loader as TwigLoader; use Cms\Twig\DebugExtension; use Cms\Twig\Ext...
1
13,026
Wouldn't this set $strictVariables = true when Config::get returns false?
octobercms-october
php
@@ -16,6 +16,7 @@ import javax.json.JsonReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import static junit.framework.Assert.assertEquals; +import org.junit.Ignore; import org.junit.Test; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource;
1
package edu.harvard.iq.dataverse.export; import com.jayway.restassured.path.xml.XmlPath; import edu.harvard.iq.dataverse.DatasetVersion; import edu.harvard.iq.dataverse.util.xml.XmlPrinter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.InputStream; impor...
1
43,568
was this meant to be checked in?
IQSS-dataverse
java
@@ -156,4 +156,8 @@ const ( // attempt to reconnect a route, gateway or leaf node connection. // The default is to report every attempt. DEFAULT_RECONNECT_ERROR_REPORTS = 1 + + // DEFAULT_RTT_MEASUREMENT_INTERVAL is how often we want to measure RTT from + // this server to clients, routes, gateways or leafnode co...
1
// Copyright 2012-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
9,127
check spaces after const name...
nats-io-nats-server
go
@@ -67,7 +67,10 @@ func (agent *ecsAgent) appendVolumeDriverCapabilities(capabilities []*ecs.Attrib func (agent *ecsAgent) appendNvidiaDriverVersionAttribute(capabilities []*ecs.Attribute) []*ecs.Attribute { if agent.resourceFields != nil && agent.resourceFields.NvidiaGPUManager != nil { - capabilities = appendNa...
1
// +build linux // Copyright 2014-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/ // // o...
1
21,771
If the GPU setting is enabled, resourceFields.NvidiaGPUManager will be nil, right?
aws-amazon-ecs-agent
go
@@ -363,7 +363,11 @@ HELP when 'command' executor.run_command(nodes, options[:object]) when 'script' - executor.run_script(nodes, options[:object], options[:leftovers]) + script = options[:object] + unless file_exist?(script) + ...
1
require 'uri' require 'optparse' require 'benchmark' require 'logger' require 'json' require 'bolt/node' require 'bolt/version' require 'bolt/executor' require 'bolt/config' require 'io/console' module Bolt class CLIError < RuntimeError attr_reader :error_code def initialize(msg, error_code: 1) super(...
1
6,831
We should probably verify that it's readable too
puppetlabs-bolt
rb
@@ -355,7 +355,7 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters throw new InvalidDataException("Expected key value before dictionary data."); } - string value = xmlReader.ReadElementContentAsString(); + ...
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.Xml; using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif....
1
10,967
See, here's an example where you removed the variable but kept the call, which makes sense.
microsoft-sarif-sdk
.cs
@@ -78,12 +78,12 @@ public class FeedParserTask implements Callable<FeedHandlerResult> { } if (successful) { - downloadStatus = new DownloadStatus(feed, feed.getHumanReadableIdentifier(), - DownloadError.SUCCESS, successful, reasonDetailed); + downloadStatus ...
1
package de.danoeh.antennapod.core.service.download.handler; import android.util.Log; import de.danoeh.antennapod.core.feed.Feed; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedPreferences; import de.danoeh.antennapod.core.feed.VolumeAdaptionSetting; import de.danoeh.antennapo...
1
15,788
Please use `request.getTitle()` instead of `feed.getHumanReadableIdentifier()`: In this case, `feed` does not have a human readable title yet
AntennaPod-AntennaPod
java
@@ -254,7 +254,7 @@ func waitForClef(logger logging.Logger, maxRetries uint64, endpoint string) (ext return nil, err } maxRetries-- - logger.Errorf("cannot connect to clef signer: %v", err) + logger.Warningf("failing to connect to clef signer: %v", err) time.Sleep(5 * time.Second) }
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 cmd import ( "bytes" "context" "crypto/ecdsa" "fmt" "io/ioutil" "os" "os/signal" "path/filepath" "strings" "syscall" "time" "github.co...
1
14,161
I think the wording on the left is better
ethersphere-bee
go
@@ -69,7 +69,7 @@ func Mux(pattern string, mux *http.ServeMux) InboundOption { // YARPC. func Interceptor(interceptor func(yarpcHandler http.Handler) http.Handler) InboundOption { return func(i *Inbound) { - i.interceptor = interceptor + i.interceptors = append(i.interceptors, interceptor) } }
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,757
Please update the method described to point out that it maintains a chain of interceptors and they will be called in the same order passed in the options.
yarpc-yarpc-go
go
@@ -37,9 +37,16 @@ namespace Datadog.Trace.ClrProfiler.Managed.Loader } var path = Path.Combine(ManagedProfilerDirectory, $"{assemblyName}.dll"); + if (File.Exists(path)) { - StartupLogger.Debug("Loading {0}", path); + if (args.Name.Sta...
1
// <copyright file="Startup.NetFramework.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> #if NETFRAMEWORK ...
1
23,877
Is this case purely hypothetical or did it solve an issue that occurred in your testing? I'm trying to understand this change a little better
DataDog-dd-trace-dotnet
.cs
@@ -431,7 +431,7 @@ func (p *ReplicationTaskProcessorImpl) putReplicationTaskToDLQ(replicationTask * p.metricsClient.Scope( metrics.ReplicationDLQStatsScope, metrics.TargetClusterTag(p.sourceCluster), - metrics.InstanceTag(strconv.Itoa(p.shard.GetShardID())), + metrics.InstanceTag(strconv.Itoa(int(p.shard.Get...
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
10,363
Use instead `convert.Int32ToString` that was added in #762 for this purpose.
temporalio-temporal
go
@@ -473,7 +473,7 @@ public final class HashSet<T> implements Kind1<HashSet<?>, T>, Set<T>, Serializa @Override public HashSet<T> add(T element) { - return new HashSet<>(tree.put(element, element)); + return contains(element) ? this : new HashSet<>(tree.put(element, element)); } @Ov...
1
/* / \____ _ _ ____ ______ / \ ____ __ _______ * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2017 Javaslang, http://javaslang.io * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ...
1
11,910
If key is present, tree.put(k,v) needs to return a new instance for Maps and the same instance for Sets. Therefore we currently perform an additional 'contains' check for Sets. A future optimization may add an additional flag `replace` to the backing HAMT.put() / RedBlackTree.insert() methods. Sets set it to replace=fa...
vavr-io-vavr
java
@@ -0,0 +1,18 @@ +"""Test to see we don't crash on this code in pandas. +See: https://github.com/pandas-dev/pandas/blob/master/pandas/core/arrays/sparse/array.py +Code written van G van Rossum here: https://github.com/python/typing/issues/684""" +# pylint: disable=no-member, redefined-builtin, invalid-name, missing-cla...
1
1
17,809
This is a regression test for code I found while working on this.
PyCQA-pylint
py
@@ -6503,8 +6503,15 @@ ex_expr::exp_return_type ex_function_json_object_field_text::eval(char *op_data[ Int32 prec2 = ((SimpleType *)getOperand(2))->getPrecision(); len2 = Attributes::trimFillerSpaces( op_data[2], prec2, len2, cs ); } + char *rltStr = NULL; - JsonReturnType ret = json_ext...
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. T...
1
19,938
I'm wondering if we need to delete jsonStr and jsonAttr after the json_extract_path_text call to avoid unnecessary heap pressure. Though if json_extract_path_text itself does new's on the same heap, we'd get heap fragmentation. Another approach would be to allocate these on the stack instead, avoiding both concerns: ch...
apache-trafodion
cpp
@@ -67,14 +67,14 @@ def lambda_handler(request): user_size = request.args.get('size', DEFAULT_SIZE) user_source = request.args.get('_source', []) # 0-indexed starting position (for pagination) - user_from = request.args.get('from', 0) + user_from = int(request.args.get('from', 0)) terminate_af...
1
""" Sends the request to ElasticSearch. TODO: Implement a higher-level search API. """ import os from copy import deepcopy from itertools import filterfalse, tee from aws_requests_auth.boto_utils import BotoAWSRequestsAuth from elasticsearch import Elasticsearch, RequestsHttpConnection from t4_lambda_shared.decorato...
1
19,421
Does it come as `str`?
quiltdata-quilt
py
@@ -290,7 +290,7 @@ public class IngredientsProductFragment extends BaseFragment implements IIngredi substanceProduct.append(" "); String allergen; - for (int i = 0; i < allergens.size() - 1; i++) { + for (int i = 0; i <= allergens.size() - 1; i++) { al...
1
package openfoodfacts.github.scrachx.openfood.views.product.ingredients; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.Typeface; import android.net.Uri; import android.os.Build; import android.os.Bundle; ...
1
65,709
This should actually read as the following `for (int i = 0; i < allergens.size(); i++)`
openfoodfacts-openfoodfacts-androidapp
java
@@ -1192,6 +1192,10 @@ func (b *ColListTableBuilder) SetValue(i, j int, v values.Value) error { } func (b *ColListTableBuilder) AppendValue(j int, v values.Value) error { + if v.IsNull() { + return b.AppendNil(j) + } + switch v.Type() { case semantic.Bool: return b.AppendBool(j, v.Bool())
1
package execute import ( "errors" "fmt" "sort" "sync/atomic" "github.com/apache/arrow/go/arrow/array" "github.com/google/go-cmp/cmp" "github.com/influxdata/flux" "github.com/influxdata/flux/arrow" "github.com/influxdata/flux/memory" "github.com/influxdata/flux/semantic" "github.com/influxdata/flux/values" ...
1
9,477
This is so useful and safety, I want to propose making AppendBool, AppendInt, etc. all private functions, and forcing us to use AppendValue(j, values.New(false)), etc.
influxdata-flux
go
@@ -140,7 +140,9 @@ export function useImperativeHandle(ref, createHandle, args) { const state = getHookState(currentIndex++); if (argsChanged(state._args, args)) { state._args = args; - ref.current = createHandle(); + if (ref) { + ref.current = createHandle(); + } } }
1
import { options } from 'preact'; /** @type {number} */ let currentIndex; /** @type {import('./internal').Component} */ let currentComponent; /** @type {Array<import('./internal').Component>} */ let afterPaintEffects = []; let oldBeforeRender = options.render; options.render = vnode => { if (oldBeforeRender) oldBe...
1
13,582
Really, really small nit I believe there's 3x tabs in here? And should it be just 2x?
preactjs-preact
js
@@ -748,6 +748,17 @@ Use this only if v4 signatures don't work, eg pre Jewel/v10 CEPH.`, See: [AWS S3 Transfer acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration-examples.html)`, Default: false, Advanced: true, + }, { + Name: "leave_parts_on_error", + Provider: "AWS",...
1
// Package s3 provides an interface to Amazon S3 oject storage package s3 // FIXME need to prevent anything but ListDir working for s3:// /* Progress of port to aws-sdk * Don't really need o.meta at all? What happens if you CTRL-C a multipart upload * get an incomplete upload * disappears when you delete the b...
1
9,036
Perhaps note that rclone can't do this yet?
rclone-rclone
go
@@ -285,3 +285,14 @@ func (c *client) doRequest( return res, requestError{} } + +// ConfigureTransports converts an net/http HTTP/1 Transport to a http3.RoundTripper +// Uses the original TLS config, if present, relying on the clone created on a +// new connection. +func ConfigureTransports(t1 *http.Transport) *Ro...
1
package http3 import ( "bytes" "crypto/tls" "errors" "fmt" "io" "net/http" "strconv" "sync" "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/qtls" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/marten-see...
1
9,372
You probably don't need to set an empty config here.
lucas-clemente-quic-go
go
@@ -12,6 +12,19 @@ from ..element import Element from .grid import GridInterface from .interface import Interface, DataError, dask_array_module +try: + import cftime + cftime_types = ( + cftime._cftime.DatetimeGregorian, + cftime._cftime.Datetime360Day, + cftime._cftime.DatetimeJulian, + ...
1
from __future__ import absolute_import import sys import types from collections import OrderedDict import numpy as np from .. import util from ..dimension import Dimension, asdim, dimension_name from ..ndmapping import NdMapping, item_check, sorted_context from ..element import Element from .grid import GridInterface...
1
21,109
I think you are missing `cftime.DatetimeAllLeap` here. That said, all of these are subclasses of `cftime.datetime`, so I think you could get away with just using `cftime.datetime` here, rather than enumerating all of the different subclasses (since `cftime_types` is only used for instance checks).
holoviz-holoviews
py
@@ -37,6 +37,11 @@ const ( StoragePoolClaimCPK CasPoolKey = "openebs.io/storage-pool-claim" // CStorPoolClusterCPK is the CStorPoolcluster label CStorPoolClusterCPK CasPoolKey = "openebs.io/cstor-pool-cluster" + // CStorPoolInstanceCPK is the CStorPoolInstance label + CStorPoolInstanceCPK CasPoolKey = "openebs.io...
1
/* Copyright 2017 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
17,781
don't we need to set this label on pool pods? I don't see them being set
openebs-maya
go
@@ -27,7 +27,7 @@ struct train_kernel_cpu<Float, method::brute_force> { train_result operator()(const context_cpu& ctx, const descriptor_base& desc, const train_input& input) const { - throw unimplemented_error("k-NN brute force method is not impleme...
1
/******************************************************************************* * Copyright 2020 Intel Corporation * * 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.o...
1
23,205
can remove, it isn't reachable.
oneapi-src-oneDAL
cpp
@@ -160,7 +160,7 @@ describe Cancellation do subscription = build_stubbed(:subscription, plan: subscribed_plan) cancellation = Cancellation.new(subscription) - expect(cancellation.can_downgrade_instead?).to be_true + expect(cancellation.can_downgrade_instead?).to be true end it 're...
1
require 'spec_helper' describe Cancellation do describe "#process" do before :each do subscription.stubs(:stripe_customer_id).returns("cus_1CXxPJDpw1VLvJ") mailer = stub(deliver: true) SubscriptionMailer.stubs(:cancellation_survey). with(subscription.user).returns(mailer) update...
1
10,554
`expect(cancellation).to be_can_downgrade_instead` would be preferred :rainbow: :rainbow:
thoughtbot-upcase
rb
@@ -65,6 +65,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal } } + if (_socket.IsClosed) + { + break; + } + if (result.IsCancelled) ...
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; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines; using Microsoft.AspNetCore.Server.K...
1
13,101
Gross. The OS should timeout writes for completely unresponsive clients to begin with. Long term, the better solution is to enforce a minimum minimum data rate for responses. This might require a way to cancel LibuvAwaitables, but it definitely not OK to immediately kill the socket and any ongoing writes just because t...
aspnet-KestrelHttpServer
.cs
@@ -66,7 +66,8 @@ void mesh_reader::load() { select_subset_of_data(); } -bool mesh_reader::fetch_datum(CPUMat& X, int data_id, int mb_idx, int tid) { +bool mesh_reader::fetch_datum(CPUMat& X, int data_id, int mb_idx, thread_pool& io_thread_pool) { + // int tid = io_thread_pool.get_local_thread_id(); if (m_ra...
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
12,835
If this is not used, we should just delete the line.
LLNL-lbann
cpp
@@ -89,11 +89,7 @@ func defaultExec( // for transporting shell-style streams exec, err := remotecommand.NewSPDYExecutor(config, "POST", req.URL()) if err != nil { - return nil, errors.Wrapf( - err, - "failed to exec into pod {%s}: failed to connect to the provided server", - name, - ) + return nil, err ...
1
// Copyright © 2018-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 o...
1
17,306
Are there other callers to this function. How will they be impacted.
openebs-maya
go
@@ -23,7 +23,7 @@ Defines an interface which all Auth handlers need to implement. """ -from plugin import Plugin +from .plugin import Plugin class NotReadyToAuthenticate(Exception): pass
1
# Copyright 2010 Google 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, publish, dis- # trib...
1
10,149
Let's be consistent. The majority of boto code does not use relative imports. Let's just stick to the existing standard of "from boto.package.subpackage import Thing".
boto-boto
py
@@ -207,6 +207,12 @@ public class BesuCommand implements DefaultCommandValues, Runnable { // CLI options defined by user at runtime. // Options parsing is done with CLI library Picocli https://picocli.info/ + @Option( + names = "--identity", + paramLabel = "<String>", + description = "Identifica...
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
20,300
Suggestion: specify `arity` for this option.
hyperledger-besu
java
@@ -264,6 +264,9 @@ class SpikesPlot(PathPlot): position = param.Number(default=0., doc=""" The position of the lower end of each spike.""") + show_legend = param.Boolean(default=True, doc=""" + Whether to show legend for the plot.""") + style_opts = (['color', 'cmap', 'palette'] + line_pro...
1
import numpy as np from bokeh.charts import Bar, BoxPlot as BokehBoxPlot from bokeh.models import Circle, GlyphRenderer, ColumnDataSource, Range1d import param from ...element import Raster, Points, Polygons, Spikes from ...core.util import max_range from ..util import compute_sizes, get_sideplot_ranges, match_spec fr...
1
14,252
This is a parameter available for the matplotlib backend IIRC. In which case, it is good to see this support added to the Bokeh backend.
holoviz-holoviews
py
@@ -641,7 +641,7 @@ public final class Span implements Serializable { // for Spark and Flink jobs */ public static String normalizeTraceId(String traceId) { if (traceId == null) throw new NullPointerException("traceId == null"); - int length = traceId.length(); + int length = traceId.trim().length(); ...
1
/* * Copyright 2015-2019 The OpenZipkin 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 a...
1
16,751
trim has performance impact and this is the lowest level library... seems the trim if occurs should happen in the UI or Query controller instead..
openzipkin-zipkin
java
@@ -80,6 +80,7 @@ class Request(testprocess.Line): '/500-inline': [http.client.INTERNAL_SERVER_ERROR], } + # pylint: enable=no-member for i in range(15): path_to_statuses['/redirect/{}'.format(i)] = [http.client.FOUND] for suffix in ['', '1', '2', '3', '4', ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 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
19,423
Probably also needed for the `http.client.FOUND` below?
qutebrowser-qutebrowser
py