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
@@ -10,6 +10,7 @@ import ( "bytes" "context" "encoding/hex" + "github.com/iotexproject/iotex-core/db" "sync" "time"
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
13,519
File is not `goimports`-ed (from `goimports`)
iotexproject-iotex-core
go
@@ -375,6 +375,8 @@ const char *get_parameter(char *cmd, SERVER_CONN *server_conn) { const char *set_parameter(char *cmd, SERVER_CONN *server_conn, CLIENT_CONN *client_conn) { const char *param_name = strstr(cmd, SET_PARAM_CMD) + SET_PARAM_CMD_LEN; const char *param_value; + if (!param_name) + return SET_...
1
// Copyright(c) 2020, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions an...
1
19,965
If strstr returns NULL, the check on 378 won't fire, because param_name will be at least SET_PARAM_CMD_LEN.
OPAE-opae-sdk
c
@@ -47,13 +47,12 @@ services::Status buildProgram(ClKernelFactoryIface & kernelFactory, const TypeId return status; } -services::Status sum_singlepass(ExecutionContextIface & context, ClKernelFactoryIface & kernelFactory, Layout vectorsLayout, - const UniversalBuffer & vectors, ui...
1
/* file: sum_reducer.cpp */ /******************************************************************************* * Copyright 2014-2021 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 Licen...
1
27,689
Does this change affect the performance of other algorithms, except KMeans?
oneapi-src-oneDAL
cpp
@@ -142,13 +142,13 @@ func TestListenerAddrEqual(t *testing.T) { addr string expect bool }{ - {ln1, ":1234", false}, - {ln1, "0.0.0.0:1234", false}, + {ln1, ":" + ln2port, false}, + {ln1, "0.0.0.0:" + ln2port, false}, {ln1, "0.0.0.0", false}, {ln1, ":" + ln1port, true}, {ln1, "0.0.0.0:" + ln1port...
1
package caddy import ( "net" "strconv" "testing" ) /* // TODO func TestCaddyStartStop(t *testing.T) { caddyfile := "localhost:1984" for i := 0; i < 2; i++ { _, err := Start(CaddyfileInput{Contents: []byte(caddyfile)}) if err != nil { t.Fatalf("Error starting, iteration %d: %v", i, err) } client := h...
1
11,002
What do these changes have to do with the request ID?
caddyserver-caddy
go
@@ -48,11 +48,11 @@ #include <cstdio> #include <cstdlib> -typedef Kokkos::DefaultExecutionSpace Device; -typedef Kokkos::HostSpace::execution_space Host; +using Device = Kokkos::DefaultExecutionSpace; +using Host = Kokkos::HostSpace::execution_space; -typedef Kokkos::TeamPolicy<Device> team_policy; -typedef tea...
1
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
1
24,406
I'm kind of surprised this doesn't require `typename`?
kokkos-kokkos
cpp
@@ -17,6 +17,7 @@ package agreement import ( + "github.com/algorand/go-algorand/logging" "time" "github.com/algorand/go-algorand/config"
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
42,411
nit: move this one down.
algorand-go-algorand
go
@@ -137,8 +137,14 @@ class Bars(Chart): class BoxWhisker(Chart): """ - BoxWhisker represent data as a distributions highlighting - the median, mean and various percentiles. + BoxWhisker allows representing the distribution of data grouped + into one or more groups by summarizing the data using quart...
1
import numpy as np import param from ..core import util from ..core import Dimension, Dataset, Element2D from .util import compute_edges class Chart(Dataset, Element2D): """ The data held within Chart is a numpy array of shape (N, D), where N is the number of samples and D the number of dimensions. C...
1
19,581
maybe 'standard Tukey boxplot definition' if it is standard? Otherwise sounds like it is just *a* definition for boxplots...
holoviz-holoviews
py
@@ -55,9 +55,11 @@ var ( // NOTE: The $Format strings are replaced during 'git archive' thanks to the // companion .gitattributes file containing 'export-subst' in this same // directory. See also https://git-scm.com/docs/gitattributes - gitVersion = "v0.0.0-master+$Format:%h$" + gitVersion = Default gitCo...
1
/* Copyright 2014 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
24,125
I feel we should not fix this.
kubeedge-kubeedge
go
@@ -25,9 +25,9 @@ #include <fastdds/rtps/reader/RTPSReader.h> #include <fastdds/rtps/writer/RTPSWriter.h> -#include <fastdds/rtps/transport/UDPv4Transport.h> -#include <fastdds/rtps/transport/UDPv6Transport.h> -#include <fastdds/rtps/transport/test_UDPv4Transport.h> +#include <rtps/transport/UDPv4Transport.h> +#inc...
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // 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 re...
1
20,499
I think these are not necessary
eProsima-Fast-DDS
cpp
@@ -476,7 +476,8 @@ Cross-TU analysis. By default, no CTU analysis is run when action='store_true', dest='ctu_reanalyze_on_failure', default=argparse.SUPPRESS, - help="If Cross-TU analysis is enable...
1
# ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # ---------------------------------------------------...
1
12,119
Please update the user guide too.
Ericsson-codechecker
c
@@ -459,8 +459,9 @@ class Folio extends AbstractAPI implements foreach ($this->getPagedResults( 'locations', '/locations' ) as $location) { - $locationMap[$location->id] - = $location->discoveryDisplayName ?? $location->name; + ...
1
<?php /** * FOLIO REST API driver * * PHP version 7 * * Copyright (C) Villanova University 2018. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * This program is distr...
1
31,447
If you use `compact('name', 'code')` here, you'll get an associative array, which might make the rest of the code more readable (instead of using hard-coded 0/1 indexes).
vufind-org-vufind
php
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, salesforce.com, inc. + * Copyright (c) 2014, 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
1
/* * Copyright (c) 2011, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright notice, this...
1
14,165
Should it be 2011-14 instead ;-)
forcedotcom-SalesforceMobileSDK-Android
java
@@ -51,6 +51,10 @@ func New(cfg *any.Any, logger *zap.Logger, scope tally.Scope) (service.Service, return nil, err } + if pgcfg.MaxIdleConnections > 2 { + sqlDB.SetMaxIdleConns(int(pgcfg.MaxIdleConnections)) + } + return &client{logger: logger, scope: scope, sqlDB: sqlDB}, nil }
1
package postgres // <!-- START clutchdoc --> // description: Provides a connection to the configured PostgreSQL database. // <!-- END clutchdoc --> import ( "database/sql" "errors" "fmt" "strings" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/any" _ "github.com/lib/pq" "github.com/ub...
1
10,401
I want to write some type of test for this but there are not Getter methods to assert this value. I tried to extract the value via the stats that are exposed without luck.
lyft-clutch
go
@@ -574,6 +574,15 @@ class ApiClient(object): group_key (str): key of the group to get. """ + @abc.abstractmethod + def iter_gsuite_group_settings(self, gsuite_id): + """Iterate Gsuite group settings from GCP API. + + Args: + gsuite_id (str): Gsuite id. + ""...
1
# Copyright 2017 The Forseti Security Authors. 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 ap...
1
33,388
This needs to take the group id, not the gsuite id.
forseti-security-forseti-security
py
@@ -47,8 +47,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters } private const string EmptyResult = @"{ - ""$schema"": ""http://json.schemastore.org/sarif-1.0.0-beta.5"", - ""version"": ""1.0.0-beta.5"", + ""$schema"": ""http://json.schemastore.org/sarif-1.0.0"", + ""version"": ""1.0.0"", ...
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.Collections.Immutable; using System.IO; using System.Linq; using System.Xml; using FluentAssertions; usin...
1
10,873
These should use the constants defined in JsonTests.cs
microsoft-sarif-sdk
.cs
@@ -67,7 +67,7 @@ function DashboardClicksWidget() { if ( error ) { trackEvent( 'plugin_setup', 'search_console_error', error.message ); - return getDataErrorComponent( __( 'Search Console', 'google-site-kit' ), error.message ); + return getDataErrorComponent( 'search-console', error ); } if ( ! data || ...
1
/** * DashboardClicksWidget component. * * 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/LICEN...
1
31,967
Kind of unrelated to this PR, but let's update this to `getDataErrorComponent( 'search-console', error.message, false, false, false, error )` so that everything is passed as expected.
google-site-kit-wp
js
@@ -38,6 +38,15 @@ class LoadImageFromFile(object): self.file_client = None def __call__(self, results): + """Call functions to load image and get image meta information. + + Args: + results (dict): Result dict from :obj:`dataset`. + + Returns: + dict: The dict...
1
import os.path as osp import mmcv import numpy as np import pycocotools.mask as maskUtils from mmdet.core import BitmapMasks, PolygonMasks from ..builder import PIPELINES @PIPELINES.register_module() class LoadImageFromFile(object): """Load an image from file. Required keys are "img_prefix" and "img_info" ...
1
20,549
:obj:\`dataset\` cannot be correctly rendered
open-mmlab-mmdetection
py
@@ -28,4 +28,10 @@ module Blacklight::User def existing_bookmark_for(document) bookmarks_for_documents([document]).first end + + ## + # @return [String] a user-displayable login/identifier for the user account + def to_s + email + end end
1
# frozen_string_literal: true module Blacklight::User # This gives us an is_blacklight_user method that can be included in # the containing applications models. # SEE ALSO: The /lib/blacklight/engine.rb class for how when this # is injected into the hosting application through ActiveRecord::Base extend def s...
1
8,269
I think `email` is something we get from devise, and I think the goal of putting it in the generator was not to tie others to that particular implementation?
projectblacklight-blacklight
rb
@@ -108,15 +108,16 @@ func NewBatchSpanProcessor(e export.SpanBatcher, opts ...BatchSpanProcessorOptio bsp.stopWait.Add(1) go func(ctx context.Context) { defer ticker.Stop() + batch := make([]*export.SpanData, 0, bsp.o.MaxExportBatchSize) for { select { case <-bsp.stopCh: - bsp.processQueue() + ...
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
11,709
If the span producers pushing to the queue do so faster than the this can drain, it will cause this to hang. I'm guessing we can update the `enqueue` method to check if the `stopCh` is closed and not send any more spans while this flushes what has already been pushed.
open-telemetry-opentelemetry-go
go
@@ -106,9 +106,9 @@ abstract class Gallery implements GalleryInterface return $this->defaultFormat; } - final public function setGalleryItems(Collection $galleryItems): void + final public function setGalleryItems(iterable $galleryItems): void { - $this->galleryItems = new ArrayCollect...
1
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Model; u...
1
12,846
Not sure about that, an array is iterable right? But if I pass array, that clear method wont work
sonata-project-SonataMediaBundle
php
@@ -6,9 +6,14 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" + "fmt" + "io/ioutil" + "path/filepath" + "sync" "testing" - "github.com/spiffe/sri/pkg/server/ca" + "github.com/spiffe/go-spiffe" + iface "github.com/spiffe/sri/pkg/common/plugin" "github.com/stretchr/testify/assert" "github.com/st...
1
package main import ( "crypto/rand" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "testing" "github.com/spiffe/sri/pkg/server/ca" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" upca "github.com/spiffe/sri/plugin/server/upstreamca-memory/pkg" ) func TestMemory_Con...
1
8,277
make sure the config changes stuck. are there any invalid config values? maybe write tests around empty `trust_domain`, negative/missing `ttl`, invalid `key_size`, etc...
spiffe-spire
go
@@ -5,7 +5,7 @@ var WebDriver = require('selenium-webdriver'); module.exports = function(grunt) { /** - * Keep injecting scripts until window.mochaResults is set + * Keep injecting scripts until `window.__mochaResult__` is set */ function collectTestResults(driver) { // inject a script that waits half a ...
1
/*global window */ 'use strict'; var WebDriver = require('selenium-webdriver'); module.exports = function(grunt) { /** * Keep injecting scripts until window.mochaResults is set */ function collectTestResults(driver) { // inject a script that waits half a second return driver .executeAsyncScript(function(...
1
14,575
Why are you changing this?
dequelabs-axe-core
js
@@ -29,6 +29,10 @@ module Ncr validates :expense_type, inclusion: {in: EXPENSE_TYPES}, presence: true validates :vendor, presence: true validates :building_number, presence: true + validates :rwa_number, format: { + with: /[a-zA-Z][0-9]{7}/, + message: "one letter followed by 7 numbers" + ...
1
module Ncr # Make sure all table names use 'ncr_XXX' def self.table_name_prefix 'ncr_' end DATA = YAML.load_file("#{Rails.root}/config/data/ncr.yaml") EXPENSE_TYPES = %w(BA61 BA80) BUILDING_NUMBERS = DATA['BUILDING_NUMBERS'] OFFICES = DATA['OFFICES'] class WorkOrder < ActiveRecord::Base incl...
1
13,041
@phirefly Can we look at a list of RWAs, or ask someone to double-check that this format is correct? Otherwise :shipit:
18F-C2
rb
@@ -72,6 +72,7 @@ public class Spark3BinPackStrategy extends BinPackStrategy { .format("iceberg") .option(SparkWriteOptions.REWRITTEN_FILE_SCAN_TASK_SET_ID, groupID) .option(SparkWriteOptions.TARGET_FILE_SIZE_BYTES, writeMaxFileSize()) + .option(SparkWriteOptions.DISTRIBUTION_M...
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
45,576
Still request a local sort for bin-packing based on the defined table sort order.
apache-iceberg
java
@@ -151,13 +151,16 @@ def request_model(rank, itr, lmbda, alpha): @click.option("--days", type=int, default=7, help="Request recommendations to be generated on history of given number of days") @click.option("--top", type=int, default=20, help="Calculate given number of top artist.") @click.option("--similar", type=...
1
import sys import click import listenbrainz.utils as utils import os import pika import ujson from flask import current_app from listenbrainz.webserver import create_app QUERIES_JSON_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'request_queries.json') cli = click.Group() class InvalidSparkRequ...
1
16,671
As with the other PR, user name is better.
metabrainz-listenbrainz-server
py
@@ -125,6 +125,12 @@ func (s *Service) Pay(ctx context.Context, peer swarm.Address, amount uint64) er if err != nil { return err } + + balance, err := s.chequebook.AvailableBalance(ctx) + if err != nil { + return err + } + s.metrics.AvailableBalance.Set(float64(balance.Int64())) s.metrics.TotalSent.Add(float6...
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 swap import ( "context" "errors" "fmt" "math/big" "github.com/ethereum/go-ethereum/common" "github.com/ethersphere/bee/pkg/crypto" "github.c...
1
13,715
a peer's accounting lock is held during `Pay`. we should avoid adding additional blockchain calls here if possible.
ethersphere-bee
go
@@ -66,6 +66,12 @@ module.exports = function(realmConstructor) { setConstructorOnPrototype(realmConstructor.Sync.User); setConstructorOnPrototype(realmConstructor.Sync.Session); + } else { + Object.defineProperty(realmConstructor, 'Sync', { + get: function () { + ...
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
15,939
Maybe wording could be improved. Is this "not enabled" or it is "not available". Not sure about that.
realm-realm-js
js
@@ -120,7 +120,11 @@ func (it *TaskReconciler) Reconcile(ctx context.Context, request reconcile.Reque // update the status about conditional tasks if len(pods) > 0 && (pods[0].Status.Phase == corev1.PodFailed || pods[0].Status.Phase == corev1.PodSucceeded) { - if !conditionalBranchesEvaluated(node) { + evaluate...
1
// Copyright 2021 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 agreed to...
1
25,006
I looked at the new `conditionalBranchesEvaluated` function and it looks like the part added is a duplicate of the line above?
chaos-mesh-chaos-mesh
go
@@ -53,6 +53,9 @@ import ( // May be missing, but should be present when data is. // - refs: The list of references to the block, encoded as a serialized // blockRefInfo. May be missing. +// - f: Presence of this file indicates the block has been successfully +// flushed to the s...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "path/filepath" "strings" "github.com/keybase/go-codec/codec" "github.com/keybase/kbfs/ioutil" "github.com/keybase/kbfs/kbfscodec" "gith...
1
14,780
can you put this flag in `blockRefInfo` instead? It would be a shame to add one more file per block, especially since we've run into inode limits. I guess `blockRefInfo` should maybe then be renamed to `blockInfo` or something. But we're stuck with the filename.
keybase-kbfs
go
@@ -43,5 +43,9 @@ func (c *ConsumerConfigParser) Parse(config json.RawMessage) (ip string, port in if err != nil { return "", 0, "", errors.Wrap(err, "parsing consumer address:port failed") } - return cfg.IP, cfg.Port, openvpn.ServiceType, nil + + if cfg.IP == nil { + return "", 0, "", nil + } + return *cfg.IP,...
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
14,178
Shouldn't we keep other parameters if only IP is empty? Or maybe return an error if it's a mandatory argument?
mysteriumnetwork-node
go
@@ -118,7 +118,8 @@ class NdIndexableMappingTest(ComparisonTestCase): data = [((0, 0.5), 'a'), ((1, 0.5), 'b')] ndmap = MultiDimensionalMapping(data, kdims=[self.dim1, self.dim2]) redimmed = ndmap.redim(intdim='Integer') - self.assertEqual(redimmed.kdims, [Dimension('Integer'), Dimensi...
1
from collections import OrderedDict from holoviews.core import Dimension from holoviews.core.ndmapping import MultiDimensionalMapping from holoviews.element.comparison import ComparisonTestCase from holoviews import HoloMap, Dataset import numpy as np class DimensionTest(ComparisonTestCase): def test_dimension_i...
1
15,962
Was this just wrong before? The names indicated types but type wasn't specified. I guess the tests passed as comparison worked with ``type=None``?
holoviz-holoviews
py
@@ -146,7 +146,8 @@ public class OrcMetrics { if (icebergColOpt.isPresent()) { final Types.NestedField icebergCol = icebergColOpt.get(); final int fieldId = icebergCol.fieldId(); - final MetricsMode metricsMode = effectiveMetricsConfig.columnMode(icebergCol.name()); + final String...
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
40,782
icebergCol.name() is the unqualified column name
apache-iceberg
java
@@ -45,7 +45,7 @@ class MetricAlarm(object): def __init__(self, connection=None, name=None, metric=None, namespace=None, statistic=None, comparison=None, threshold=None, period=None, evaluation_periods=None, unit=None, description='', - dimensions=[]): + ...
1
# Copyright (c) 2010 Reza Lotun http://reza.lotun.name # # 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, m...
1
7,943
It's generally a bad idea to use mutable types like lists as default values for parameters. Lots of strange, difficult to debug side effects can occur. I see that there was already one example of this prior to this commit which probably explains why it seemed innocuous to add more but I'm going to rework this before co...
boto-boto
py
@@ -10,6 +10,7 @@ module.exports = { 'prettier', 'prettier/@typescript-eslint', 'plugin:prettier/recommended', + 'eslint-config-prettier' ], globals: { Atomics: 'readonly',
1
module.exports = { env: { browser: true, es6: true, 'jest/globals': true, }, extends: [ 'airbnb', 'plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint', 'plugin:prettier/recommended', ], globals: { Atomics: 'readonly', SharedArrayBuffer: 're...
1
14,727
We run prettier as an eslint plugin, so this harmful
HospitalRun-hospitalrun-frontend
js
@@ -39,7 +39,7 @@ using namespace eprosima::fastrtps::types; HelloWorldPublisher::HelloWorldPublisher() : mp_participant(nullptr) , mp_publisher(nullptr) - , m_DynType(nullptr) + , m_DynType(DynamicType_ptr(nullptr)) { }
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // 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 re...
1
16,024
Check if the TypeDescriptor and MemberDescriptor includes are necessary
eProsima-Fast-DDS
cpp
@@ -4,10 +4,11 @@ import ( gocontext "context" "encoding/json" "fmt" - "k8s.io/apimachinery/pkg/api/errors" "os" "syscall" + "k8s.io/apimachinery/pkg/api/errors" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types"
1
package leaderelection import ( gocontext "context" "encoding/json" "fmt" "k8s.io/apimachinery/pkg/api/errors" "os" "syscall" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util...
1
16,755
delete the empty line here.
kubeedge-kubeedge
go
@@ -302,6 +302,16 @@ describe Subscription do end end + describe "#reactivate" do + it "unsets scheduled_for_deactivation_on" do + subscription = create(:subscription, scheduled_for_deactivation_on: 1.day.from_now) + subscription.reactivate + subscription.reload + + expect(subscription...
1
require "rails_helper" describe Subscription do it { should have_one(:team).dependent(:destroy) } it { should belong_to(:plan) } it { should belong_to(:user) } it { should delegate(:stripe_customer_id).to(:user) } it { should validate_presence_of(:plan_id) } it { should validate_presence_of(:plan_type) }...
1
16,874
Line is too long. [89/80]
thoughtbot-upcase
rb
@@ -200,7 +200,7 @@ public class JsonHttpRemoteConfig { } } - private UrlMapper getUrlMapper(String method) { + protected UrlMapper getUrlMapper(String method) { if ("DELETE".equals(method)) { return deleteMapper; } else if ("GET".equals(method)) {
1
/* Copyright 2012 Selenium committers Copyright 2012 Software Freedom Conservancy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
1
10,333
You don't need to expose this method to do what you want. There are already public addNewGetMapping, addNewPostMapping, and addNewDeleteMapping methods.
SeleniumHQ-selenium
java
@@ -782,7 +782,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests } [Fact] - public async Task HeadResponseCanContainContentLengthHeaderButBodyNotWritten() + public async Task HeadResponseBodyNotWritten() { using (var server = new TestServer(async ...
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.Linq; using System.Net; using System.Net.Http; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; usi...
1
10,779
This test passes in `dev`. Why wouldn't this work?
aspnet-KestrelHttpServer
.cs
@@ -1,6 +1,14 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 +""" +Purpose + +Shows how to use the AWS SDK for Python (Boto3) with PyTest and the AWS Device Farm +browser testing feature. +""" + +# snippet-start:[python.example_code.device-farm.Scenario...
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import datetime import os import subprocess import boto3 import pytest from selenium import webdriver from selenium.webdriver import DesiredCapabilities from selenium.webdriver.common.action_chains impo...
1
21,549
ARN -> Amazon Resource Number (ARN)
awsdocs-aws-doc-sdk-examples
rb
@@ -153,10 +153,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests var hostBuilder = new WebHostBuilder() .UseKestrel() - .ConfigureServices(services => - { - services.AddSingleton<ILoggerFactory>(new KestrelTestLoggerFactory(t...
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.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.NetworkInformation; using System....
1
12,628
Why not use the overload that takes an instance?
aspnet-KestrelHttpServer
.cs
@@ -7,16 +7,13 @@ package account import ( - "context" "fmt" + "strings" "github.com/spf13/cobra" "go.uber.org/zap" - grpc "google.golang.org/grpc" - "github.com/iotexproject/iotex-core/cli/ioctl/cmd/config" "github.com/iotexproject/iotex-core/pkg/log" - pb "github.com/iotexproject/iotex-core/protogen/i...
1
// Copyright (c) 2019 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
15,873
`Blockchian` is a misspelling of `Blockchain` (from `misspell`)
iotexproject-iotex-core
go
@@ -44,7 +44,7 @@ type NvidiaGPUManager struct { DriverVersion string `json:"DriverVersion"` GPUIDs []string `json:"GPUIDs"` GPUDevices []*ecs.PlatformDevice `json:"-"` - lock sync.RWMutex `json:"-"` + lock sync.RWMutex } const (
1
// +build linux // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in ...
1
21,841
`agent/gpu/nvidia_gpu_manager_unix.go:47: struct field lock has json tag but is not exported`
aws-amazon-ecs-agent
go
@@ -11,6 +11,9 @@ from localstack.utils.aws.aws_models import LambdaFunction from localstack.constants import LAMBDA_TEST_ROLE +TEST_ARN = 'arn:aws:sqs:eu-west-1:000000000000:testq' + + class TestLambdaAPI(unittest.TestCase): CODE_SIZE = 50 CODE_SHA_256 = '/u60ZpAA9bzZPVwb8d4390i5oqP1YAObUwV03CZvsWA='
1
import os import re import json import unittest import mock import time import datetime from localstack.utils.common import save_file, new_tmp_dir, mkdir from localstack.services.awslambda import lambda_api, lambda_executors from localstack.utils.aws.aws_models import LambdaFunction from localstack.constants import LAM...
1
10,813
nit: better rename to `TEST_QUEUE_ARN` or `TEST_EVENT_SOURCE_ARN`
localstack-localstack
py
@@ -1097,9 +1097,9 @@ func (c *Operator) sync(key string) error { return err } - // If no service monitor selectors are configured, the user wants to - // manage configuration themselves. - if p.Spec.ServiceMonitorSelector != nil { + // If no service monitor selectors or additional scrape configs are configured,...
1
// Copyright 2016 The prometheus-operator 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 ...
1
13,476
Would this mean that podMonitorSelectors suffer from the same issue if they are the only configuration set?
prometheus-operator-prometheus-operator
go
@@ -110,6 +110,17 @@ func (c *fakeClient) ReportPipedMeta(ctx context.Context, req *pipedservice.Repo return &pipedservice.ReportPipedMetaResponse{}, nil } +// GetEnvironment finds and returns the environment for the specified ID. +func (c *fakeClient) GetEnvironment(ctx context.Context, req *pipedservice.GetEnvir...
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
8,789
`ctx` is unused in GetEnvironment
pipe-cd-pipe
go
@@ -89,6 +89,11 @@ namespace pwiz.Skyline.FileUI } } + public void OKDialog() + { + DialogResult = DialogResult.OK; + } + private void cbShowText_CheckedChanged(object sender, System.EventArgs e) { LineText.Visible = cbShowText.Check...
1
/* * Original author: Dario Amodei <damodei .at. stanford.edu>, * Mallick Lab, Department of Radiology, Stanford * * Copyright 2013 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance...
1
14,903
We usually use OkDialog()
ProteoWizard-pwiz
.cs
@@ -970,6 +970,12 @@ public class BesuCommand implements DefaultCommandValues, Runnable { description = "Enable flexible (onchain) privacy groups (default: ${DEFAULT-VALUE})") private final Boolean isFlexiblePrivacyGroupsEnabled = false; + @Option( + names = {"--privacy-unrestricted-enabled"}, + ...
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
25,217
could we please change that to something that indicates that this feature is not "production" ready!
hyperledger-besu
java
@@ -0,0 +1,5 @@ +_base_ = './mask_rcnn_swim-t-p4-w7_fpn_fp16_ms-crop-3x_coco.py' +model = dict( + pretrained=\ + 'https://download.openmmlab.com/mmclassification/v0/swin-transformer/swin_small_224_b16x64_300e_imagenet_20210615_110219-7f9d988b.pth', # noqa + backbone=dict(depths=[2, 2, 18, 2]))
1
1
24,725
swim -> swin. Other configs and file names also should be modified.
open-mmlab-mmdetection
py
@@ -47,7 +47,7 @@ class BigQueryClient(_base_client.BaseClient): return RateLimiter(FLAGS.max_bigquery_api_calls_per_100_seconds, self.DEFAULT_QUOTA_TIMESPAN_PER_SECONDS) - def get_bigquery_projectids(self): + def get_bigquery_projectids(self, key='projects'): """Re...
1
# Copyright 2017 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 writing, s...
1
26,227
nit: arg description for "key"?
forseti-security-forseti-security
py
@@ -244,6 +244,15 @@ func (tlf *TLF) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus return dir.Setattr(ctx, req, resp) } +// Fsync implements the fs.NodeFsyncer interface for TLF. +func (tlf *TLF) Fsync(ctx context.Context, req *fuse.FsyncRequest) (err error) { + dir, err := tlf.loadDir(ctx) + if...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libfuse import ( "os" "sync" "time" "bazil.org/fuse" "bazil.org/fuse/fs" "github.com/keybase/client/go/logger" "github.com/keybase/kbfs/libfs" "github....
1
16,514
If we don't have a `dir` yet, we wouldn't need to do a sync right? If so, perhaps we can just `getStoredDir()` like `Attr()`?
keybase-kbfs
go
@@ -1637,10 +1637,13 @@ privload_mem_is_elf_so_header(byte *mem) /* libdynamorio should be ET_DYN */ if (elf_hdr->e_type != ET_DYN) return false; - /* ARM or X86 */ + /* ARM or X86 */ +# ifndef DR_HOST_NOT_TARGET if (elf_hdr->e_machine != - IF_X86_ELSE(IF_X64_ELSE(EM_X86_...
1
/* ******************************************************************************* * Copyright (c) 2011-2020 Google, Inc. All rights reserved. * Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved. * *******************************************************************************/ /* * Re...
1
20,953
I still don't seem to fully understand this. Why are we testing the host if DR_HOST_NOT_TARGET is not set?
DynamoRIO-dynamorio
c
@@ -34,9 +34,9 @@ import ( func TestBzzFiles(t *testing.T) { var ( - fileUploadResource = "/bzz" + fileUploadResource = "/v1/bzz" targets = "0x222" - fileDownloadResource = func(addr string) string { return "/bzz/" + addr } + fileDownloadResource = func(addr string) string { return "/v1/bzz...
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 api_test import ( "bytes" "context" "fmt" "io" "mime" "mime/multipart" "net/http" "strconv" "strings" "testing" "github.com/ethersphere/...
1
16,006
in the current implementation, both schemes are supported (you can call either `/bzz` or `/v1/bzz`). i would suggest to keep it this way
ethersphere-bee
go
@@ -44,9 +44,12 @@ module.exports = class Client { body: data }).then((response) => response.json()).then((assembly) => { if (assembly.error) { - const error = new Error(assembly.error) + const error = new Error(assembly) error.message = assembly.error - error.details = ...
1
/** * A Barebones HTTP API client for Transloadit. */ module.exports = class Client { constructor (opts = {}) { this.opts = opts this._reportError = this._reportError.bind(this) this._headers = { 'Transloadit-Client': this.opts.client } } /** * Create a new assembly. * * @param...
1
12,707
hmm, I think we can just do `new Error(assembly.error)` and that should set `error.message` correctly too. I don't know why it was done this way with a separate `.message` assignment before :sweat_smile: Should we do `error.assembly = assembly` so the template editor can access it that way, rather than parsing `error.d...
transloadit-uppy
js
@@ -315,7 +315,10 @@ class Typo3PageIndexer $document->setField('rootline', $rootline); // access - $document->setField('access', (string)$this->pageAccessRootline); + $access = (string)$this->pageAccessRootline; + if (trim($access) !== "") { + $document->setField('ac...
1
<?php namespace ApacheSolrForTypo3\Solr; /*************************************************************** * Copyright notice * * (c) 2009-2015 Ingo Renner <ingo@typo3.org> * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/o...
1
5,872
This should never be empty. The access field always needs a value of at least `c:0` or `r:0`
TYPO3-Solr-ext-solr
php
@@ -6,11 +6,16 @@ import ( "encoding/json" "github.com/influxdata/flux/ast" + "github.com/influxdata/flux/internal/parser" "github.com/influxdata/flux/internal/token" "github.com/influxdata/flux/libflux/go/libflux" ) func parseFile(f *token.File, src []byte) (*ast.File, error) { + if !useRustParser() { + ...
1
// +build libflux package parser import ( "encoding/json" "github.com/influxdata/flux/ast" "github.com/influxdata/flux/internal/token" "github.com/influxdata/flux/libflux/go/libflux" ) func parseFile(f *token.File, src []byte) (*ast.File, error) { astFile := libflux.Parse(string(src)) defer astFile.Free() d...
1
13,212
Another question is, do we want to call `os.Getenv()` every time we parse a file? That seems a lot.
influxdata-flux
go
@@ -33,6 +33,10 @@ public interface Tuple { */ Seq<?> toSeq(); + <A> Tuple append(A v); + + <A> Tuple prepend(A v); + // -- factory methods /**
1
/* / \____ _ _ ____ ______ / \ ____ __ _______ * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ...
1
9,085
minor: please rename all occurrences of `A` to `T`. please also rename `v` to `value`.
vavr-io-vavr
java
@@ -52,11 +52,13 @@ namespace Nethermind.Synchronization.ParallelSync add { } remove { } } - + + public int FastSyncLag => (Current & SyncMode.Beam) == SyncMode.Beam ? SyncModeSelectorConstants.BeamSyncFastSyncLag : SyncModeSelectorConstants.NotBeamSyncFastSyncLag; + ...
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
24,794
Do we want it to be so dynamic? My first idea was to base it on SyncConfig.BeamSync .
NethermindEth-nethermind
.cs
@@ -42,7 +42,7 @@ public class RemoteNetworkConnection implements NetworkConnection { @Override public ConnectionType setNetworkConnection( ConnectionType type) { - Map<String, ConnectionType> mode = ImmutableMap.of("type", type); + Map<String, Integer> mode = ImmutableMap.of("type", type.getBitMask(...
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
13,854
can you change this instead to just `type.toString()` and then you wouldn't have to expose the getBitMask in the enum. (Alternatively you could have used `type.hashCode()` but that doesn't feel as nice)
SeleniumHQ-selenium
js
@@ -68,6 +68,13 @@ def test_plot_importance(params, breast_cancer_split, train_data): assert ax2.patches[2].get_facecolor() == (0, .5, 0, 1.) # g assert ax2.patches[3].get_facecolor() == (0, 0, 1., 1.) # b + ax3 = lgb.plot_importance(gbm0, title='t @importance_type@', xlabel='x @importance_type@', ylab...
1
# coding: utf-8 import pytest from sklearn.model_selection import train_test_split import lightgbm as lgb from lightgbm.compat import GRAPHVIZ_INSTALLED, MATPLOTLIB_INSTALLED if MATPLOTLIB_INSTALLED: import matplotlib matplotlib.use('Agg') if GRAPHVIZ_INSTALLED: import graphviz from .utils import load_br...
1
31,403
I'm confused by these tests. Shouldn't the template string `@importance_type@` have been replaced with the actual value of `importance_type`?
microsoft-LightGBM
cpp
@@ -25,7 +25,7 @@ import ( type harness struct{} func (h *harness) MakeDriver(ctx context.Context) (driver.Keeper, error) { - return NewKeeper(ByteKey("very secret secret")), nil + return &keeper{secretKey: ByteKey("very secret secret")}, nil } func (h *harness) Close() {}
1
// Copyright 2018 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
13,930
Let's keep using NewKeeper so that it got covered by tests.
google-go-cloud
go
@@ -70,6 +70,9 @@ import org.apache.solr.core.CoreContainer; import org.apache.solr.handler.admin.CollectionsHandler; import org.apache.solr.handler.component.HttpShardHandler; import org.apache.solr.logging.MDCLoggingContext; +import org.apache.solr.store.blob.process.BlobDeleteManager; +import org.apache.solr.stor...
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
32,207
I only see new imports. Is there any functional change in this file?
apache-lucene-solr
java
@@ -1141,6 +1141,18 @@ func (bc *blockchain) pickAndRunActions(ctx context.Context, actionMap map[strin executedActions = append(executedActions, grant) } + if raCtx.BlockHeight == 1 { + tsf, err := bc.createMemorialTransfer(raCtx.Producer.String(), raCtx.ActionGasLimit) + receipt, err = ws.RunAction(raCtx, ts...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
17,401
ineffectual assignment to `err` (from `ineffassign`)
iotexproject-iotex-core
go
@@ -198,6 +198,10 @@ class Driver extends webdriver.WebDriver { * @return {!Driver} A new driver instance. */ static createSession(options, service = getDefaultService()) { + if (!service) { + service = getDefaultService(); + } + let client = service.start().then(url => new http.HttpClien...
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
15,395
Would you mind removing the default parameter above? (I doubt I'll ever use defaults again since you still have to protect against callers explicitly passing `null` or `undefined`)
SeleniumHQ-selenium
py
@@ -163,6 +163,18 @@ def FindMolChiralCenters(mol, force=True, includeUnassigned=False, includeCIP=Tr centers.append((idx, code)) return centers +import warnings +def WrapLogs(): + warnings.warn("Deprecated: use the rdkit.rdBase.LogTo*() functions instead.", DeprecationWarning) + rdBase.LogToPythonStder...
1
# # Copyright (C) 2000-2017 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. # """ A module for molecules a...
1
23,890
Make sure the old logging functions still work, but add deprecation warnings (unfortunately Python suppresses deprecation warnings by default, so I'm not sure if anyone'll notice).
rdkit-rdkit
cpp
@@ -252,14 +252,17 @@ public class ManagementAuthorizationTest extends AuthorizationTest { public void testTelemetryEnabledAsCamundaAdmin() { // given + disableAuthorization(); + managementService.enableTelemetry(true); + enableAuthorization(); identityService.setAuthentication(userId, Collectio...
1
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
1
10,536
Not directly related to the topic of this ticket: I think this API design is a bit confusing. To disable delemetry, I would write `managementService.enableTelemetry(false)` which is not intuitive to read. Maybe `toggleTelemetry` instead of `enableTelemetry` is more clear.
camunda-camunda-bpm-platform
java
@@ -163,9 +163,11 @@ namespace Microsoft.Sarif.Viewer HelpLink = rule?.HelpUri?.ToString() }; - CaptureAnnotatedCodeLocationCollections(result.Stacks, AnnotatedCodeLocationKind.Stack, sarifError); + IEnumerable...
1
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysi...
1
10,491
Again I suggest returning `AnnotatedCodeLocation[][]`.
microsoft-sarif-sdk
.cs
@@ -16,11 +16,14 @@ package ec2 import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/golang/glog" "github.com/pkg/errors" "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig/v1alpha1" ) func (s *Service) reconcileInternetGateways(in *v1alpha1.Network) er...
1
// Copyright © 2018 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 ag...
1
6,287
We should probably require an increased verbosity to output for anything below the cluster itself to avoid spamming the logs. It would also be good to give additional context as to what we are attempting to reconcile since the controller has multiple workers.
kubernetes-sigs-cluster-api-provider-aws
go
@@ -32,5 +32,7 @@ type OptionsNetwork struct { EtherClientRPC string EtherPaymentsAddress string + EnableDNS bool + QualityOracle string }
1
/* * Copyright (C) 2018 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
14,890
Not needed anymore
mysteriumnetwork-node
go
@@ -80,6 +80,17 @@ namespace Datadog.Trace.ClrProfiler Log.Error(ex, "ByRef instrumentation cannot be enabled: "); } + try + { + Log.Debug("Enabling calltarget state by ref."); + NativeMethods.EnableCallTargetStateByRef(); + ...
1
// <copyright file="Instrumentation.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> using System; using Sy...
1
25,091
Am I right in thinking this completely avoids the situation where `enable_calltarget_state_by_ref` is `true`, but the managed integrations don't expect a by ref argument? For example, if there's an exception here, that seems like a fatal problem, as we would have a mismatch for jit rewriting? We should disable instrume...
DataDog-dd-trace-dotnet
.cs
@@ -40,6 +40,15 @@ const ( package {{ .Package }} +type ResourceTypes int + +const ( + Unknown ResourceTypes = iota + {{- range .KnownTypes }} + {{ . }} + {{- end }} +) + // Instance describes a single resource annotation type Instance struct { // The name of the annotation.
1
// Copyright 2019 Istio 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 i...
1
7,535
nit: spaces seem off
istio-tools
go
@@ -20,7 +20,7 @@ #include "PBFParser.h" -PBFParser::PBFParser(const char * fileName) : externalMemory(NULL){ +PBFParser::PBFParser(ExtractorCallbacks* em, ScriptingEnvironment& se, const char * fileName) : BaseParser( em, se ) { GOOGLE_PROTOBUF_VERIFY_VERSION; //TODO: What is the bottleneck here? Filling the ...
1
/* open source routing machine Copyright (C) Dennis Luxen, others 2010 This program 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 any later version. This progr...
1
12,312
shouldn't the em parameter be called ec?
Project-OSRM-osrm-backend
cpp
@@ -132,7 +132,7 @@ func validateTrustedOperators(o *Options) error { if o.TrustedKeys == nil { o.TrustedKeys = make([]string, 0, 4) } - o.TrustedKeys = append(o.TrustedKeys, opc.Issuer) + o.TrustedKeys = append(o.TrustedKeys, opc.Subject) o.TrustedKeys = append(o.TrustedKeys, opc.SigningKeys...) } f...
1
// Copyright 2018-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
11,556
Please change this to use o.DidSign(o) as implements this logic without performing any of these checks that duplicate something that JWT can do correctly. If the JWT deserialized properly, and DidSign returns true, the JWT was signed by one of the listed operator keys.
nats-io-nats-server
go
@@ -0,0 +1,19 @@ +package de.danoeh.antennapod.core.util.comparator; + +import java.util.Comparator; + +import de.danoeh.antennapod.core.feed.FeedItem; +import de.danoeh.antennapod.core.feed.SearchResult; + +public class InReverseChronologicalOrder implements Comparator<SearchResult> { + /** + * Compare items an...
1
1
14,711
Talking about style, IMO extracting either `getComponent()` or `getPubDate()` to variables would make this line easier to read.
AntennaPod-AntennaPod
java
@@ -0,0 +1,18 @@ +// Copyright 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 ...
1
1
25,263
package header missing
aws-amazon-ecs-agent
go
@@ -11,7 +11,11 @@ options._catchError = function(error, newVNode, oldVNode) { for (; (vnode = vnode._parent); ) { if ((component = vnode._component) && component._childDidSuspend) { // Don't call oldCatchError if we found a Suspense - return component._childDidSuspend(error, newVNode._component); + r...
1
import { Component, createElement, options } from 'preact'; import { assign } from './util'; const oldCatchError = options._catchError; options._catchError = function(error, newVNode, oldVNode) { if (error.then) { /** @type {import('./internal').Component} */ let component; let vnode = newVNode; for (; (vnod...
1
15,048
Just a thought (doesn't change the output or anything) - do you think we'll ever want to access the other properties of `oldVNode` from within `_childDidSuspend`? If so we could pass `oldVNode` here and then check these properties in the _childDidSuspend implementation. I don't have strong feelings either way, just occ...
preactjs-preact
js
@@ -0,0 +1,15 @@ +<?php + +namespace Sonata\MediaBundle\PHPCR; + +use Doctrine\ODM\PHPCR\DocumentRepository; +use Doctrine\ODM\PHPCR\Id\RepositoryIdInterface; + +class GalleryHasMediaRepository extends DocumentRepository implements RepositoryIdInterface +{ + public function generateId($document, $parent = null) + ...
1
1
6,386
We should be configuring the base paths somewhere..
sonata-project-SonataMediaBundle
php
@@ -311,6 +311,17 @@ def test_ssd_anchor_generator(): else: device = 'cpu' + # min_sizes max_sizes must set at the same time + with pytest.raises(AssertionError): + anchor_generator_cfg = dict( + type='SSDAnchorGenerator', + scale_major=False, + min_sizes=[4...
1
""" CommandLine: pytest tests/test_utils/test_anchor.py xdoctest tests/test_utils/test_anchor.py zero """ import pytest import torch def test_standard_points_generator(): from mmdet.core.anchor import build_prior_generator # teat init anchor_generator_cfg = dict( type='MlvlPointGenerator'...
1
24,355
May also need to test the normal functionality with min/max_sizes
open-mmlab-mmdetection
py
@@ -73,6 +73,7 @@ var MainnetDefinition = NetworkDefinition{ ChainID: 1, MystAddress: "0x4Cf89ca06ad997bC732Dc876ed2A7F26a9E7f361", EtherClientRPC: []string{ + "https://ethereum1.mysterium.network/", "https://main-light.eth.linkpool.io/", }, },
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
17,355
We can remove this one. It's just a random one I got for free for testing.
mysteriumnetwork-node
go
@@ -7,6 +7,7 @@ package blocksync import ( + "github.com/iotexproject/iotex-core/db" "sync" "github.com/iotexproject/iotex-core/actpool"
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
13,518
File is not `goimports`-ed (from `goimports`)
iotexproject-iotex-core
go
@@ -65,7 +65,11 @@ class AddFiles extends Component { renderMyDeviceAcquirer = () => { return ( - <div class="uppy-DashboardTab" role="presentation"> + <div + class="uppy-DashboardTab" + role="presentation" + data-acquirer-id="Local" + > <button type="bu...
1
const { h, Component } = require('preact') class AddFiles extends Component { triggerFileInputClick = () => { this.fileInput.click() } onFileInputChange = (event) => { this.props.handleInputChange(event) // We clear the input after a file is selected, because otherwise // change event is not fi...
1
13,167
(maybe this should be MyDevice or just removed entirely?)
transloadit-uppy
js
@@ -337,6 +337,10 @@ func (payloadHandler *payloadRequestHandler) handleUnrecognizedTask(task *ecsacs TaskARN: *task.Arn, Status: apitaskstatus.TaskStopped, Reason: UnrecognizedTaskError{err}.Error(), + // The real task cannot be extracted from payload message, so we send an empty task. + // This is necess...
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
20,456
Can you do a nil check here, as the task isn't always nil here?
aws-amazon-ecs-agent
go
@@ -30,9 +30,12 @@ import Layout from 'GoogleComponents/layout/layout'; */ import { isDataZeroForReporting, getTopPagesReportDataDefaults } from '../util'; -const { __ } = wp.i18n; -const { map } = lodash; -const { Component } = wp.element; +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'...
1
/** * AnalyticsDashboardWidgetPopularPagesTable component. * * Site Kit by Google, Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apach...
1
24,748
`lodash` shouldn't be grouped under WordPress dependencies
google-site-kit-wp
js
@@ -76,7 +76,11 @@ public class DiscoveryConfiguration { "enode://011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a@51.141.78.53:30303", "enode://176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9...
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
23,448
Does order matter? Should we sort by enode key to make duplication checking easier?
hyperledger-besu
java
@@ -132,11 +132,11 @@ func (ash *Handler) Provision(ctx caddy.Context) error { return err } - acmeAuth, err := acme.NewAuthority( - auth.GetDatabase().(nosql.DB), // stores all the server state - ash.Host, // used for directory links; TODO: not needed - strings.Trim(ash.PathPrefix...
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,759
Can you explain this too? This seems to go beyond linting.
caddyserver-caddy
go
@@ -151,12 +151,6 @@ describe('Components', () => { expect(scratch.innerHTML).to.equal(''); }); - // Test for #651 - it('should set enumerable boolean attribute', () => { - render(<input spellcheck={false} />, scratch); - expect(scratch.firstChild.spellcheck).to.equal(false); - }); - // Test for Issue #73 ...
1
import { h, cloneElement, render, rerender, Component } from '../../src/preact'; /** @jsx h */ let spyAll = obj => Object.keys(obj).forEach( key => sinon.spy(obj,key) ); function getAttributes(node) { let attrs = {}; if (node.attributes) { for (let i=node.attributes.length; i--; ) { attrs[node.attributes[i].na...
1
12,217
I just moved this into the render.js UT file since this test doesn't actually use an components
preactjs-preact
js
@@ -163,6 +163,8 @@ var ConfigCommand *cobra.Command = &cobra.Command{ util.Failed("Could not write ddev config file: %v", err) } + _,_ = app.CreateSettingsFile() + // If a provider is specified, prompt about whether to do an import after config. switch provider { case ddevapp.DefaultProviderName:
1
package cmd import ( "fmt" "os" "strings" "path/filepath" "github.com/drud/ddev/pkg/ddevapp" "github.com/drud/ddev/pkg/output" "github.com/drud/ddev/pkg/util" "github.com/spf13/cobra" ) // docrootRelPath is the relative path to the docroot where index.php is var docrootRelPath string // siteName is the nam...
1
12,367
We do have to capture and check the err here right? I don't think we need to capture the location of the file though for this context.
drud-ddev
php
@@ -8,7 +8,6 @@ import time import sys import logging from logging.handlers import RotatingFileHandler -import os from listenbrainz.listenstore import InfluxListenStore import redis
1
from redis import Redis from listenbrainz import config import requests from requests.exceptions import HTTPError import ujson import time import sys import logging from logging.handlers import RotatingFileHandler import os from listenbrainz.listenstore import InfluxListenStore import redis redis_connection = None L...
1
14,436
an unused import
metabrainz-listenbrainz-server
py
@@ -152,6 +152,9 @@ func parseTLS(h Helper) ([]ConfigValue, error) { // policy that is looking for any tag but the last one to be // loaded won't find it, and TLS handshakes will fail (see end) // of issue #3004) + + tlsCertTags := h.state["tlsCertTags"].(map[string]string) + tag, ok := tlsCertTags[ce...
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
14,232
If this value doesn't exist (do an `, ok := ...` check), we should initialize and store it
caddyserver-caddy
go
@@ -1,6 +1,3 @@ -import { or } from 'ramda'; - - -const MIN_SAFE_INTEGER = or(Number.MIN_SAFE_INTEGER, -(2 ** 53) - 1); +const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -(2 ** 53) - 1; export default MIN_SAFE_INTEGER;
1
import { or } from 'ramda'; const MIN_SAFE_INTEGER = or(Number.MIN_SAFE_INTEGER, -(2 ** 53) - 1); export default MIN_SAFE_INTEGER;
1
5,218
Would use parenthesis to explicitly state the associations of operands ```js const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || (-(2 ** 53) - 1)
char0n-ramda-adjunct
js
@@ -175,8 +175,7 @@ class Serial(IoBase): self._origTimeout = self._ser.timeout # We don't want a timeout while we're waiting for data. self._setTimeout(None) - self.inWaiting = self._ser.inWaiting - super(Serial, self).__init__(self._ser.hComPort, onReceive) + super(Serial, self).__init__(self._ser._port_h...
1
#hwIo.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) 2015-2018 NV Access Limited, Babbage B.V. """Raw input/output for braille displays via serial and HID. See the L{Serial} and L{Hid} classes. Braill...
1
23,415
This handle is now private to pyserial, but if there is no public function to retrieve it I guess this is the best we can do.
nvaccess-nvda
py
@@ -581,7 +581,7 @@ uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface, assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); surface->toplevel->server_pending.maximized = maximized; - return schedule_xdg_surface_configure(surface); + return wlr_xdg_surface_schedule_configure(surface); } ...
1
#define _POSIX_C_SOURCE 200809L #include <assert.h> #include <stdlib.h> #include <string.h> #include <wlr/util/log.h> #include <wlr/util/edges.h> #include "types/wlr_xdg_shell.h" #include "util/signal.h" void handle_xdg_toplevel_ack_configure( struct wlr_xdg_surface *surface, struct wlr_xdg_surface_configure *conf...
1
15,901
This function is what **the compositor** calls when it wants to fullscreen a client, not what the client calls.
swaywm-wlroots
c
@@ -98,12 +98,13 @@ func TestTraceflow(t *testing.T) { t.Fatal(err) } - // Creates 4 traceflows: + // Creates 6 traceflows: // 1. node1Pods[0] -> node1Pods[1], intra node1. // 2. node1Pods[0] -> node2Pods[0], inter node1 and node2. // 3. node1Pods[0] -> node1IPs[1], intra node1. // 4. node1Pods[0] -> nod...
1
// Copyright 2020 Antrea 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
24,044
s/not existed Pod/non-existing Pod
antrea-io-antrea
go
@@ -62,10 +62,10 @@ type ECSStatusDescriber struct { env string svc string - svcDescriber serviceDescriber - ecsSvcGetter ecsServiceGetter - cwSvcGetter alarmStatusGetter - aasSvcGetter autoscalingAlarmNamesGetter + ecsSvcDescriber serviceDescriber + ecsSvcGetter ecsServiceGetter + cwSvcGetter alarmStatus...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package describe import ( "bytes" "encoding/json" "fmt" "math" "strings" "text/tabwriter" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/aas" "github.com/aws/cop...
1
17,548
Why did we not leave this as just `svcDescriber`?
aws-copilot-cli
go
@@ -11,12 +11,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - """Provides the data access object (DAO) for Groups.""" +from Queue import Queue + from google.cloud.security.com...
1
# Copyright 2017 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 writing, s...
1
25,803
nit: I think we've been (in)consistent in leaving a blank line here.
forseti-security-forseti-security
py
@@ -47,13 +47,15 @@ def define_violation(dbengine): __tablename__ = violations_tablename id = Column(Integer, primary_key=True) - model_handle = Column(String(256)) + inventory_index_id = Column(String(256)) resource_id = Column(String(256), nullable=False) resource_t...
1
# Copyright 2017 The Forseti Security Authors. 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 ap...
1
28,553
Maybe we can change it to a more generic name like source_id.
forseti-security-forseti-security
py
@@ -2019,7 +2019,7 @@ func testKeyManagerRekeyAddDeviceWithPromptViaFolderAccess(t *testing.T, ver Met defer ops.mdWriterLock.Unlock(lState) // Now cause a paper prompt unlock via a folder access - errCh := make(chan error) + errCh := make(chan error, 1) go func() { _, err := GetRootNodeForTest(ctx, co...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "testing" "time" "github.com/golang/mock/gomock" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol/keybase1" "...
1
14,918
What's the theory on why this could fix the hang? It seems like the call to `GetRootNodeForTest` will always need to call into the crypto object before returning an error, and so it should block on that `c` receive, after which the test immediately drains `errCh`. So I don't quite see how buffering would help...
keybase-kbfs
go
@@ -2003,8 +2003,16 @@ decode_operand(decode_info_t *di, byte optype, opnd_size_t opsize, opnd_t *opnd) return true; } case TYPE_H: { - /* part of AVX: vex.vvvv selects xmm/ymm register */ + /* As part of AVX and AVX-512, vex.vvvv selects xmm/ymm/zmm register. Note that + * vex....
1
/* ********************************************************** * Copyright (c) 2011-2019 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
16,831
Maybe add an assert in arch_init or somewhere?
DynamoRIO-dynamorio
c
@@ -100,6 +100,7 @@ func TestcaseNetworkDelay( err := cli.Create(ctx, networkDelay.DeepCopy()) framework.ExpectNoError(err, "create network chaos error") + // nolint wait.Poll(time.Second, 15*time.Second, func() (done bool, err error) { result = probeNetworkCondition(c, networkPeers, ports, false) if len(...
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
21,522
I wonder what does this `// nolint` ignore? And what are the standards that you choose which error to fix and which to ignore?
chaos-mesh-chaos-mesh
go
@@ -441,7 +441,10 @@ public class HttpSolrCall { } else { if (!retry) { // we couldn't find a core to work with, try reloading aliases & this collection - cores.getZkController().getZkStateReader().aliasesManager.update(); + if(!cores.getZkController().getZkStateReader().aliasesManage...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
40,990
what about the line below, forceUpdateCollection?
apache-lucene-solr
java