Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: add line feed at file end #52

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- lint: add line feed at file end

## v0.1.3
- Add static auth
## v0.1.1
Expand Down
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/Anonymous.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public class AnonymousProvider : ICredentialsProvider
{
return null;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public InvalidCredentialsException(string message)
: base(message)
{
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/ICredentialsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
public interface ICredentialsProvider
{
string? GetAuthInfo();
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/IUseDriverConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ namespace Ydb.Sdk.Auth;
public interface IUseDriverConfig
{
public Task ProvideConfig(DriverConfig driverConfig);
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/StaticCredentialsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ public bool IsRefreshNeeded()
return DateTime.UtcNow >= RefreshAt;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Auth/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ public string GetAuthInfo()
{
return _token;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/ChannelsCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ public EndpointsData(ChannelsData active, ChannelsData passive)
Passive = passive;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Client/ClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ protected internal static OperationParams MakeOperationParams(OperationRequestSe

return opParams;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Client/ClientOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ public OperationNotReadyException(string operationId)
}

public string OperationId { get; }
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Client/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ protected OperationResponse(Status status)

protected abstract TResult UnpackResult(ClientOperation operation);
protected abstract TMetadata UnpackMetadata(ClientOperation operation);
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ internal TransportException(RpcException e)

public Status Status { get; }
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/DriverConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ private static string FormatEndpoint(string endpoint)

return $"https://{endpoint}";
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ internal static class Metadata
public const string RpcRequestTypeHeader = "x-ydb-request-type";
public const string RpcTraceIdHeader = "x-ydb-trace-id";
public const string RpcSdkInfoHeader = "x-ydb-sdk-build-info";
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/RequestSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public class RequestSettings
public class OperationRequestSettings : RequestSettings
{
public TimeSpan? OperationTimeout { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Auth/AuthClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public partial class AuthClient : ClientBase
public AuthClient(Driver driver) : base(driver)
{
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Auth/Login.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ public async Task<LoginResponse> Login(string user, string? password, LoginSetti
return new LoginResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Operations/GetOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public async Task<ClientOperation> GetOperation(string id, RequestSettings? sett
return new ClientOperation(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Operations/OperationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public OperationsClient(Driver driver)
{
_driver = driver;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Operations/Poll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public async Task<ClientOperation> PollReady(
await Task.Delay(delay.Value, cancellationToken);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Scheme/SchemeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ public async Task<ListDirectoryResponse> ListDirectory(string path, ListDirector
return new ListDirectoryResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/AlterTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ public async Task<AlterTableOperation> AddIndex(string tablePath, AddIndexSettin
return new AlterTableOperation(new OperationsClient(Driver), e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/CreateSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ public async Task<CreateSessionResponse> CreateSession(CreateSessionSettings? se
return new CreateSessionResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/DeleteSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ public async Task<DeleteSessionResponse> DeleteSession(string sessionId, DeleteS
return new DeleteSessionResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/ExecuteDataQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ public async Task<ExecuteDataQueryResponse> ExecuteDataQuery(
{
return await ExecuteDataQuery(query, txControl, new Dictionary<string, YdbValue>(), settings);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/ExecuteScanQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ public ExecuteScanQueryStream ExecuteScanQuery(
{
return ExecuteScanQuery(query, new Dictionary<string, YdbValue>(), settings);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/ExecuteSchemeQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public async Task<ExecuteSchemeQueryResponse> ExecuteSchemeQuery(
return new ExecuteSchemeQueryResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/KeepAlive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ internal async Task<KeepAliveResponse> KeepAlive(string sessionId, KeepAliveSett
return new KeepAliveResponse(e.Status);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/ReadTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ public ReadTableStream ReadTable(string tablePath, ReadTableSettings? settings =

return new ReadTableStream(streamIterator);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/Retry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ public async Task<IResponse> SessionExec(

return response;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ protected virtual void Dispose(bool disposing)
preferredEndpoint: Endpoint
);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/SessionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ public SessionState(Session session)
public Session Session { get; }
public DateTime LastAccessTime { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/TableClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ private void Dispose(bool disposing)

_disposed = true;
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Services/Table/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ internal TransactionControl ToProto()
{
return _proto.Clone();
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Status.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ public StatusUnsuccessfulException(Status status)
}

public Status Status { get; }
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Value/ResultSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ internal Row(Ydb.Value row, IReadOnlyList<Column> columns, IReadOnlyDictionary<s

public YdbValue this[string columnName] => this[_columnsMap[columnName]];
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Value/YdbValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ private static YdbTypeId GetYdbTypeId(Type protoType)
return YdbTypeId.Unknown;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Value/YdbValueBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,4 +548,4 @@ public static YdbValue MakeOptionalDecimal(decimal? value)
{
return MakeOptionalOf(value, YdbTypeId.DecimalType, MakeDecimal);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Value/YdbValueCast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,4 @@ public static explicit operator YdbValue(decimal? value)
{
return MakeOptionalDecimal(value);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/src/Value/YdbValueParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,4 @@ internal InvalidTypeException(string expectedType, string actualType)
{
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/tests/Auth/TestStaticAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ public async Task NotExistAuth()
await Assert.ThrowsAsync<InvalidCredentialsException>(
async () => await Driver.CreateInitialized(driverConfig, _loggerFactory));
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/tests/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ internal static ServiceProvider GetServiceProvider()
var serviceProvider = GetServiceProvider();
return serviceProvider.GetService<ILoggerFactory>();
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/tests/Value/TestBasicUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ public void StructType()
Assert.Equal(10, (long)s["Member1"]);
Assert.Equal("ten", (string)s["Member2"]!);
}
}
}
2 changes: 1 addition & 1 deletion src/Ydb.Sdk/tests/Value/TestBasicsIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,4 @@ public async Task StructType()
Assert.Equal(10, foo2["bar1"].GetInt64());
Assert.Equal("ten", foo2["bar2"].GetUtf8());
}
}
}
8 changes: 6 additions & 2 deletions src/YdbSdk.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Custom_0020Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Custom Cleanup"&gt;&lt;CppCodeStyleCleanupDescriptor ArrangeBraces="True" ArrangeAuto="True" ArrangeFunctionDeclarations="True" ArrangeNestedNamespaces="True" ArrangeTypeAliases="True" ArrangeCVQualifiers="True" ArrangeSlashesInIncludeDirectives="True" ArrangeOverridingFunctions="True" SortIncludeDirectives="True" SortMemberInitializers="True" /&gt;&lt;CppReformatCode&gt;True&lt;/CppReformatCode&gt;&lt;CSCodeStyleAttributes ArrangeVarStyle="True" ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" AddMissingParentheses="True" ArrangeAttributes="True" ArrangeCodeBodyStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" RemoveRedundantParentheses="True" ArrangeNamespaces="True" /&gt;&lt;FSReformatCode&gt;True&lt;/FSReformatCode&gt;&lt;ShaderLabReformatCode&gt;True&lt;/ShaderLabReformatCode&gt;&lt;Xaml.RedundantFreezeAttribute&gt;True&lt;/Xaml.RedundantFreezeAttribute&gt;&lt;Xaml.RemoveRedundantModifiersAttribute&gt;True&lt;/Xaml.RemoveRedundantModifiersAttribute&gt;&lt;Xaml.RemoveRedundantNameAttribute&gt;True&lt;/Xaml.RemoveRedundantNameAttribute&gt;&lt;Xaml.RemoveRedundantResource&gt;True&lt;/Xaml.RemoveRedundantResource&gt;&lt;Xaml.RemoveRedundantCollectionProperty&gt;True&lt;/Xaml.RemoveRedundantCollectionProperty&gt;&lt;Xaml.RemoveRedundantAttachedPropertySetter&gt;True&lt;/Xaml.RemoveRedundantAttachedPropertySetter&gt;&lt;Xaml.RemoveRedundantStyledValue&gt;True&lt;/Xaml.RemoveRedundantStyledValue&gt;&lt;Xaml.RemoveRedundantNamespaceAlias&gt;True&lt;/Xaml.RemoveRedundantNamespaceAlias&gt;&lt;Xaml.RemoveForbiddenResourceName&gt;True&lt;/Xaml.RemoveForbiddenResourceName&gt;&lt;Xaml.RemoveRedundantGridDefinitionsAttribute&gt;True&lt;/Xaml.RemoveRedundantGridDefinitionsAttribute&gt;&lt;Xaml.RemoveRedundantUpdateSourceTriggerAttribute&gt;True&lt;/Xaml.RemoveRedundantUpdateSourceTriggerAttribute&gt;&lt;Xaml.RemoveRedundantBindingModeAttribute&gt;True&lt;/Xaml.RemoveRedundantBindingModeAttribute&gt;&lt;Xaml.RemoveRedundantGridSpanAttribut&gt;True&lt;/Xaml.RemoveRedundantGridSpanAttribut&gt;&lt;XMLReformatCode&gt;True&lt;/XMLReformatCode&gt;&lt;CSArrangeQualifiers&gt;True&lt;/CSArrangeQualifiers&gt;&lt;CSFixBuiltinTypeReferences&gt;True&lt;/CSFixBuiltinTypeReferences&gt;&lt;HtmlReformatCode&gt;True&lt;/HtmlReformatCode&gt;&lt;VBReformatCode&gt;True&lt;/VBReformatCode&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;FormatAttributeQuoteDescriptor&gt;True&lt;/FormatAttributeQuoteDescriptor&gt;&lt;IDEA_SETTINGS&gt;&amp;lt;profile version="1.0"&amp;gt;
&amp;lt;option name="myName" value="Custom Cleanup" /&amp;gt;
&amp;lt;inspection_tool class="ES6ShorthandObjectProperty" enabled="false" level="INFORMATION" enabled_by_default="false" /&amp;gt;
Expand Down Expand Up @@ -66,4 +69,5 @@
&amp;lt;Language id="yaml"&amp;gt;
&amp;lt;Reformat&amp;gt;true&amp;lt;/Reformat&amp;gt;
&amp;lt;/Language&amp;gt;
&amp;lt;/profile&amp;gt;&lt;/RIDER_SETTINGS&gt;&lt;CSUseAutoProperty&gt;True&lt;/CSUseAutoProperty&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSMakeAutoPropertyGetOnly&gt;True&lt;/CSMakeAutoPropertyGetOnly&gt;&lt;RemoveCodeRedundancies&gt;True&lt;/RemoveCodeRedundancies&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;/CSOptimizeUsings&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;/Profile&gt;</s:String></wpf:ResourceDictionary>
&amp;lt;/profile&amp;gt;&lt;/RIDER_SETTINGS&gt;&lt;CSUseAutoProperty&gt;True&lt;/CSUseAutoProperty&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSMakeAutoPropertyGetOnly&gt;True&lt;/CSMakeAutoPropertyGetOnly&gt;&lt;RemoveCodeRedundancies&gt;True&lt;/RemoveCodeRedundancies&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;/CSOptimizeUsings&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;/Profile&gt;</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/LINE_FEED_AT_FILE_END/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>