Skip to content

Commit 6bc2f4b

Browse files
authored
Merge branch 'main' into github_action
2 parents 6060850 + 3646e86 commit 6bc2f4b

File tree

7 files changed

+80
-53
lines changed

7 files changed

+80
-53
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<Version>0.0.1</Version>
5-
<TargetFramework>netstandard2.0</TargetFramework>
6-
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7-
<RootNamespace>Flow.Launcher.Localization.Analyzers</RootNamespace>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<Version>1.0.0</Version>
5+
<TargetFramework>netstandard2.0</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
<RootNamespace>Flow.Launcher.Localization.Analyzers</RootNamespace>
8+
</PropertyGroup>
99

10-
<ItemGroup>
11-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
12-
<PrivateAssets>all</PrivateAssets>
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
</PackageReference>
15-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2"/>
16-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2"/>
17-
</ItemGroup>
10+
<ItemGroup>
11+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
12+
<PrivateAssets>all</PrivateAssets>
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
</PackageReference>
15+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2"/>
16+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2"/>
17+
</ItemGroup>
1818

1919
</Project>
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<Version>0.0.1</Version>
5-
<TargetFramework>netstandard2.0</TargetFramework>
6-
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7-
<RootNamespace>Flow.Launcher.Localization.SourceGenerators</RootNamespace>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<Version>1.0.0</Version>
5+
<TargetFramework>netstandard2.0</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
<RootNamespace>Flow.Launcher.Localization.SourceGenerators</RootNamespace>
8+
</PropertyGroup>
99

10-
<ItemGroup>
11-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
12-
<PrivateAssets>all</PrivateAssets>
13-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14-
</PackageReference>
15-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
16-
</ItemGroup>
10+
<ItemGroup>
11+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
12+
<PrivateAssets>all</PrivateAssets>
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
</PackageReference>
15+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
16+
</ItemGroup>
17+
1718
</Project>

Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,11 @@ private void GenerateClass(
304304
Dictionary<string, LocalizableString> localizedStrings,
305305
string[] unusedLocalizationKeys,
306306
string propertyName = null
307-
)
308-
{
307+
) {
308+
const string name = nameof(LocalizeSourceGenerator);
309+
var version = typeof(LocalizeSourceGenerator).Assembly.GetName().Version;
309310
sb.AppendLine();
311+
sb.AppendLine($"[System.CodeDom.Compiler.GeneratedCode(\"{name}\", \"{version}\")]");
310312
sb.AppendLine($"public static class {ClassName}");
311313
sb.AppendLine("{");
312314
foreach (var localizedString in localizedStrings)

Flow.Launcher.Localization.sln

Lines changed: 0 additions & 22 deletions
This file was deleted.

Flow.Launcher.Localization.slnx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Solution>
2+
<Project Path="Flow.Launcher.Localization.Analyzers/Flow.Launcher.Localization.Analyzers.csproj" />
3+
<Project Path="Flow.Launcher.Localization.SourceGenerators/Flow.Launcher.Localization.SourceGenerators.csproj" />
4+
<Project Path="Flow.Launcher.Localization/Flow.Launcher.Localization.csproj" />
5+
</Solution>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Version>1.0.0</Version>
5+
<TargetFramework>netstandard2.0</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
<RootNamespace>Flow.Launcher.Localization</RootNamespace>
8+
9+
<IncludeBuildOutput>false</IncludeBuildOutput>
10+
<DevelopmentDependency>true</DevelopmentDependency>
11+
<NoPackageAnalysis>true</NoPackageAnalysis>
12+
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<ProjectReference
17+
Include="..\Flow.Launcher.Localization.Analyzers\Flow.Launcher.Localization.Analyzers.csproj"
18+
PrivateAssets="All"
19+
/>
20+
<ProjectReference
21+
Include="..\Flow.Launcher.Localization.SourceGenerators\Flow.Launcher.Localization.SourceGenerators.csproj"
22+
PrivateAssets="All"
23+
/>
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<None
28+
Include="$(OutputPath)\Flow.Launcher.Localization.Analyzers.dll"
29+
Pack="true"
30+
PackagePath="analyzers/dotnet/cs"
31+
Visible="false"
32+
/>
33+
<None
34+
Include="$(OutputPath)\Flow.Launcher.Localization.SourceGenerators.dll"
35+
Pack="true"
36+
PackagePath="analyzers/dotnet/cs"
37+
Visible="false"
38+
/>
39+
</ItemGroup>
40+
41+
</Project>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
33
"version": "7.0.0",
4-
"rollForward": "latestMinor",
4+
"rollForward": "latestMajor",
55
"allowPrerelease": false
66
}
77
}

0 commit comments

Comments
 (0)