Skip to content

Commit db82a0a

Browse files
committed
Added Lucene.Net.CodeAnalysis.Dev.CodeFixes project and Lucene.Net.CodeAnalysis.Dev.CodeFixes.Tests
1 parent 18eb22b commit db82a0a

22 files changed

Lines changed: 787 additions & 62 deletions

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<PackageVersion Include="NUnit3TestAdapter" Version="5.1.0" />
1515
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
1616
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzer.Testing" Version="1.1.2" />
17+
<PackageVersion Include="Microsoft.CodeAnalysis.CodeFix.Testing" Version="1.1.2" />
1718
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(RoslynAnalyzerPackageVersion)" />
1819
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynAnalyzerPackageVersion)" />
1920
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Features" Version="$(RoslynAnalyzerPackageVersion)" />

Lucene.Net.CodeAnalysis.Dev.sln

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
32
# Visual Studio Version 17
43
# Licensed to the Apache Software Foundation (ASF) under one
@@ -63,6 +62,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
6362
version.json = version.json
6463
EndProjectSection
6564
EndProject
65+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.CodeAnalysis.Dev.CodeFixes", "src\Lucene.Net.CodeAnalysis.Dev.CodeFixes\Lucene.Net.CodeAnalysis.Dev.CodeFixes.csproj", "{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5}"
66+
EndProject
67+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.CodeAnalysis.Dev.CodeFixes.Tests", "tests\Lucene.Net.CodeAnalysis.Dev.CodeFixes.Tests\Lucene.Net.CodeAnalysis.Dev.CodeFixes.Tests.csproj", "{2ADD8F4F-8360-4994-9451-B6741842AC58}"
68+
EndProject
69+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.CodeAnalysis.Dev.TestUtilities", "tests\Lucene.Net.CodeAnalysis.Dev.TestUtilities\Lucene.Net.CodeAnalysis.Dev.TestUtilities.csproj", "{D7D95A33-0FB1-4F2A-A5CD-27719995026C}"
70+
EndProject
6671
Global
6772
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6873
Debug|Any CPU = Debug|Any CPU
@@ -101,6 +106,18 @@ Global
101106
{A476A043-926E-488B-A825-02EB0B410CFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
102107
{A476A043-926E-488B-A825-02EB0B410CFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
103108
{A476A043-926E-488B-A825-02EB0B410CFD}.Release|Any CPU.Build.0 = Release|Any CPU
109+
{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
110+
{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
111+
{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
112+
{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5}.Release|Any CPU.Build.0 = Release|Any CPU
113+
{2ADD8F4F-8360-4994-9451-B6741842AC58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
114+
{2ADD8F4F-8360-4994-9451-B6741842AC58}.Debug|Any CPU.Build.0 = Debug|Any CPU
115+
{2ADD8F4F-8360-4994-9451-B6741842AC58}.Release|Any CPU.ActiveCfg = Release|Any CPU
116+
{2ADD8F4F-8360-4994-9451-B6741842AC58}.Release|Any CPU.Build.0 = Release|Any CPU
117+
{D7D95A33-0FB1-4F2A-A5CD-27719995026C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
118+
{D7D95A33-0FB1-4F2A-A5CD-27719995026C}.Debug|Any CPU.Build.0 = Debug|Any CPU
119+
{D7D95A33-0FB1-4F2A-A5CD-27719995026C}.Release|Any CPU.ActiveCfg = Release|Any CPU
120+
{D7D95A33-0FB1-4F2A-A5CD-27719995026C}.Release|Any CPU.Build.0 = Release|Any CPU
104121
EndGlobalSection
105122
GlobalSection(SolutionProperties) = preSolution
106123
HideSolutionNode = FALSE
@@ -111,6 +128,9 @@ Global
111128
{007DD065-3DF1-4AC1-9403-FE11E4654AF4} = {8170F744-3AE0-41EE-8986-611BA2C20425}
112129
{62BE25C9-72F2-4348-96C4-7329252E9DE8} = {1A48DD8E-1D71-43AE-B15D-977A87972623}
113130
{A476A043-926E-488B-A825-02EB0B410CFD} = {1A48DD8E-1D71-43AE-B15D-977A87972623}
131+
{94EE9776-30FC-4976-8C1D-AFE6A71BF8F5} = {1A48DD8E-1D71-43AE-B15D-977A87972623}
132+
{2ADD8F4F-8360-4994-9451-B6741842AC58} = {8170F744-3AE0-41EE-8986-611BA2C20425}
133+
{D7D95A33-0FB1-4F2A-A5CD-27719995026C} = {8170F744-3AE0-41EE-8986-611BA2C20425}
114134
EndGlobalSection
115135
GlobalSection(ExtensibilityGlobals) = postSolution
116136
SolutionGuid = {B261893F-67D2-4098-B66F-9191951DB5BB}

src/Lucene.Net.CodeAnalysis.Dev.CodeFixes/CodeFixResources.Designer.cs

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<root>
23+
<!--
24+
Microsoft ResX Schema
25+
26+
Version 2.0
27+
28+
The primary goals of this format is to allow a simple XML format
29+
that is mostly human readable. The generation and parsing of the
30+
various data types are done through the TypeConverter classes
31+
associated with the data types.
32+
33+
Example:
34+
35+
... ado.net/XML headers & schema ...
36+
<resheader name="resmimetype">text/microsoft-resx</resheader>
37+
<resheader name="version">2.0</resheader>
38+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
39+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
40+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
41+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
42+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
43+
<value>[base64 mime encoded serialized .NET Framework object]</value>
44+
</data>
45+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
46+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
47+
<comment>This is a comment</comment>
48+
</data>
49+
50+
There are any number of "resheader" rows that contain simple
51+
name/value pairs.
52+
53+
Each data row contains a name, and value. The row also contains a
54+
type or mimetype. Type corresponds to a .NET class that support
55+
text/value conversion through the TypeConverter architecture.
56+
Classes that don't support this are serialized and stored with the
57+
mimetype set.
58+
59+
The mimetype is used for serialized objects, and tells the
60+
ResXResourceReader how to depersist the object. This is currently not
61+
extensible. For a given mimetype the value must be set accordingly:
62+
63+
Note - application/x-microsoft.net.object.binary.base64 is the format
64+
that the ResXResourceWriter will generate, however the reader can
65+
read any of the formats listed below.
66+
67+
mimetype: application/x-microsoft.net.object.binary.base64
68+
value : The object must be serialized with
69+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
70+
: and then encoded with base64 encoding.
71+
72+
mimetype: application/x-microsoft.net.object.soap.base64
73+
value : The object must be serialized with
74+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
75+
: and then encoded with base64 encoding.
76+
77+
mimetype: application/x-microsoft.net.object.bytearray.base64
78+
value : The object must be serialized into a byte array
79+
: using a System.ComponentModel.TypeConverter
80+
: and then encoded with base64 encoding.
81+
-->
82+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
83+
<xsd:element name="root" msdata:IsDataSet="true">
84+
<xsd:complexType>
85+
<xsd:choice maxOccurs="unbounded">
86+
<xsd:element name="data">
87+
<xsd:complexType>
88+
<xsd:sequence>
89+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
90+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
91+
</xsd:sequence>
92+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1"/>
93+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
94+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
95+
</xsd:complexType>
96+
</xsd:element>
97+
<xsd:element name="resheader">
98+
<xsd:complexType>
99+
<xsd:sequence>
100+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
101+
</xsd:sequence>
102+
<xsd:attribute name="name" type="xsd:string" use="required"/>
103+
</xsd:complexType>
104+
</xsd:element>
105+
</xsd:choice>
106+
</xsd:complexType>
107+
</xsd:element>
108+
</xsd:schema>
109+
<resheader name="resmimetype">
110+
<value>text/microsoft-resx</value>
111+
</resheader>
112+
<resheader name="version">
113+
<value>1.3</value>
114+
</resheader>
115+
<resheader name="reader">
116+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
117+
</resheader>
118+
<resheader name="writer">
119+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
120+
</resheader>
121+
</root>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version='1.0'?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
21+
<Project Sdk="Microsoft.NET.Sdk">
22+
23+
<PropertyGroup>
24+
<TargetFramework>netstandard2.0</TargetFramework>
25+
<Nullable>enable</Nullable>
26+
27+
<!-- Newer versions of VS and the SDK allow loading as 64 bit, so we need this for compatibility when loading in VS -->
28+
<Prefer32Bit>false</Prefer32Bit>
29+
30+
<!-- This is needed so that the cross-platform C# language server can find the generated Resources.Designer.cs file -->
31+
<!-- see: https://github.com/dotnet/msbuild/issues/8086 -->
32+
<CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn>
33+
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
34+
<PreferredUILang>en-US</PreferredUILang>
35+
</PropertyGroup>
36+
37+
<ItemGroup>
38+
<!--
39+
This approach allows the Resources.designer.cs file to be generated into obj,
40+
instead of checked into source control. It also fixes an issue with JetBrains Rider
41+
where it doesn't generate comments on the generated properties.
42+
See: https://github.com/dotnet/msbuild/issues/8086
43+
and https://youtrack.jetbrains.com/issue/RIDER-74074/PublicResXFileCodeGenerator-does-not-generate-comments-and-the-order-of-properties-changes
44+
-->
45+
<EmbeddedResource Update="CodeFixResources.resx">
46+
<Generator>MSBuild:Compile</Generator>
47+
<StronglyTypedFileName>$(IntermediateOutputPath)CodeFixResources.designer.cs</StronglyTypedFileName>
48+
<StronglyTypedLanguage>CSharp</StronglyTypedLanguage>
49+
<StronglyTypedNamespace>Lucene.Net.CodeAnalysis.Dev</StronglyTypedNamespace>
50+
<StronglyTypedClassName>CodeFixResources</StronglyTypedClassName>
51+
<LogicalName>Lucene.Net.CodeAnalysis.Dev.CodeFixResources.resources</LogicalName>
52+
<LastGenOutput>CodeFixResources.Designer.cs</LastGenOutput>
53+
<PublicClass>true</PublicClass>
54+
</EmbeddedResource>
55+
</ItemGroup>
56+
57+
<ItemGroup>
58+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
59+
<PrivateAssets>all</PrivateAssets>
60+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
61+
</PackageReference>
62+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
63+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
64+
</ItemGroup>
65+
66+
<ItemGroup>
67+
<ProjectReference Include="..\Lucene.Net.CodeAnalysis.Dev\Lucene.Net.CodeAnalysis.Dev.csproj" />
68+
</ItemGroup>
69+
70+
</Project>

0 commit comments

Comments
 (0)