Skip to content

Commit d7db8e1

Browse files
Update project for initial Apache release (#1)
* Upgrade NuGet packages, add Sample project and enable debugging, remove VSIX, fix unit tests and analyser warnings * Add remaining samples * Add github action file * Fix comment generation in Resources.Designer.cs, remove from source control * Rename unit test project * Add more detail to analyzer titles * Rename GitHub workflow file * Change GitHub Actions triggers * Add strong name key signing * Add README and Diagnostic IDs reservations file * Fix NuGet pack output path and settings * Added Dirctory.Build.props, Directory.Build.targets. and Directory.Packages.props files to share common settings and enable Central Package Management. * Added version.json file for Nerdbank.GitVersioning * Added Lucene.Net.CodeAnalysis.Dev.Package project to provide centralized packaging for analyzers, code fixes, and the sample project * Added Lucene.Net.CodeAnalysis.Dev.Vsix project for Visual Studio live debugging * Renamed Helpers namespace to Utility * Migrated DiagnosticDescriptor declarations to their own Descriptors class * SWEEP: Converted all tests to use Microsoft.CodeAnalysis.Analyzer.Testing * Lucene.Net.CodeAnalysis.Dev.sln: Added Solution Items folder * Lucene.Net.CodeAnalysis.Dev.sln: Added .github, docs, and eng folders as .folderproj (NoTargets) projects that allow the IDE to edit the underlying file structure * Moved Lucene.Net.snk file to the eng directory * Lucene.Net.CodeAnalysis.Dev.sln: Added Directory.Build.targets and Directory.Build.props files to src and tests folders * Added GitHub workflows for build/release automation * docs: Added building-and-testing, make-release, and visual-studio-debugging documentation * Added Powershell script to run the Release Audit Tool * rat.ps1: Changed RAT version to 0.13, since that is what we know works * SWEEP: Ran the Apache Release Audit Tool to add missing license headers * docs/make-release.md: Added section for Release Audit Tool * Added .editorconfig and .gitattributes for most often hand-edited files * Added Lucene.Net.CodeAnalysis.Dev.CodeFixes project and Lucene.Net.CodeAnalysis.Dev.CodeFixes.Tests * Lucene.Net.CodeAnalysis.Dev.CodeFixes: Fixed CodeFixResources.resx code generation so it is not a committed file * LuceneDev1001_FloatingPointFormattingCSCodeFixProvider: Dynamically build title based off of localized resource and actual code element. * LuceneDev1001_FloatingPointFormattingCSCodeFixProvider: Refactored to make use of shared TryGetJ2NTypeAndMember() method to reduce duplicated code. * Lucene.Net.CodeAnalysis.Dev.CodeFixes.csproj: Removed unnecessary PackageReference on Microsoft.CodeAnalysis.CSharp * tests/Directory.Build.targets: Set IsPublishable=true if IsTestProject is true * Lucene.Net.CodeAnalysis.Dev.Tests.csproj: Enabled nullable reference type support * Lucene.Net.CodeAnalysis.Dev.Utilty.Descriptors: Use static fields instead of properties for DiagnosticDescriptors or the AnalyzerReleases release management analyzers do not recognize the diagnositic ids as being implemented. * Lucene.Net.CodeAnalysis.Dev: Cleaned up usings * Lucene.Net.CodeAnalysis.Dev: Removed AnalyzerReleases from AdditionalFiles, as it is only necessary if these are needed within one of our analyzers * SWEEP: Moved all analyzers, code fixes, and analyzer/code fix tests into organizational LuceneDev1xxx folders. * SWEEP: Added Apache 2.0 license headers to all .props, .targets, and .*proj files * SWEEP: Added Apache 2.0 license headers to all .yml and .ps1 files * SWEEP: Added Apache 2.0 license headers to all .md files (except AnalyzerReleases which require a specific format to be parsed) * eng/nuget.props: Added LICENSE.txt and NOTICE.txt to the NuGet package. * eng/nuget.props: Resolved conflict - cannot specify PackageLicenseExpression and PackageLicenseFile at the same time. Removed the PackageLicenseFile property, but kept the automation to pack the file into the NuGet package. * Lucene.Net.CodeAnalysis.Dev.sln: Added .editorconfig and .gitattributes files to Solution Items * Added Git commit hook to insert the current NuGetPackageVersion into a placeholder token {{vnext}} in the AnalyzerReleases.Shipped.md file, only if preceeded by "## Release ". * docs/make-release.md: Simplified release procedure and included step to update AnalyzerReleases documents. * version.json: Updated version.json to enforce 3-component release branch numbers. * docs/make-release: Added workflow for release build outcomes. Also corrected release branching info to show branches with 3 version components. * docs/make-release.md: Added info about deciding between major, minor, patch, and prerelease when choosing a version number. * release-build-outcomes.md: Updated Mermaid markup to reflect the same state as the release-build-outcomes.svg file. * Markdown-Formatting.Tests.ps1: Removed stray assert * .github/workflows/ci.yml: Removed x86 tests and SDK setup * docs/make-release.md: Corrected slash in release branch notes * docs/make-release.md: Added info about how to check the version of the current commit * nuget.props: Converted to nuget.targets and added target to set <PackageReleaseNotes> after Nerdbank.GitVersioning injects the PackageVersion into the pipeline. * renovate.json: Disabled dependency dashboard issue and enabled fork processing for Forking Renovate * .github/workflows/renovate-dependencies.yml: deleted, since we will be using Forking Renovate and we probably won't be able to run this workflow, anyway. * Lucene.Net.CodeAnalysis.Dev.Package.csproj: Removed conditions for CodeFixes project and fixed paths to include (future) code fix resource files in the package if we ever localize it. * Lucene.Net.CodeAnalysis.Dev.Vsix/source.extension.vsixmanifest: Changed Publisher attribute to Apache Software Foundation --------- Co-authored-by: Shad Storhaug <shad@shadstorhaug.com>
1 parent 1eddb1d commit d7db8e1

File tree

106 files changed

+6151
-2716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+6151
-2716
lines changed

β€Ž.editorconfigβ€Ž

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# EditorConfig helps developers maintain consistent coding styles across editors and IDEs
2+
# Docs: https://editorconfig.org/
3+
4+
root = true
5+
6+
# ========================================
7+
# XML, MSBuild files
8+
# ========================================
9+
[*.xml]
10+
indent_style = space
11+
indent_size = 2
12+
insert_final_newline = true
13+
resharper_enforce_empty_line_at_end_of_file = true
14+
trim_trailing_whitespace = true
15+
16+
[*.resx]
17+
indent_style = space
18+
indent_size = 2
19+
insert_final_newline = true
20+
resharper_enforce_empty_line_at_end_of_file = true
21+
trim_trailing_whitespace = true
22+
23+
[*.config]
24+
indent_style = space
25+
indent_size = 2
26+
insert_final_newline = true
27+
resharper_enforce_empty_line_at_end_of_file = true
28+
trim_trailing_whitespace = true
29+
30+
[*.csproj]
31+
indent_style = space
32+
indent_size = 2
33+
insert_final_newline = true
34+
resharper_enforce_empty_line_at_end_of_file = true
35+
trim_trailing_whitespace = true
36+
37+
[*.*proj]
38+
indent_style = space
39+
indent_size = 2
40+
insert_final_newline = true
41+
resharper_enforce_empty_line_at_end_of_file = true
42+
trim_trailing_whitespace = true
43+
44+
[*.props]
45+
indent_style = space
46+
indent_size = 2
47+
insert_final_newline = true
48+
resharper_enforce_empty_line_at_end_of_file = true
49+
trim_trailing_whitespace = true
50+
51+
[*.targets]
52+
indent_style = space
53+
indent_size = 2
54+
insert_final_newline = true
55+
resharper_enforce_empty_line_at_end_of_file = true
56+
trim_trailing_whitespace = true
57+
58+
# ========================================
59+
# JSON files
60+
# ========================================
61+
[*.json]
62+
indent_style = space
63+
indent_size = 2
64+
insert_final_newline = true
65+
resharper_enforce_empty_line_at_end_of_file = true
66+
trim_trailing_whitespace = true
67+
68+
# ========================================
69+
# Markdown
70+
# ========================================
71+
[*.md]
72+
indent_style = space
73+
indent_size = 2
74+
trim_trailing_whitespace = false
75+
insert_final_newline = true
76+
resharper_enforce_empty_line_at_end_of_file = true
77+
78+
# ========================================
79+
# YAML
80+
# ========================================
81+
[*.yml]
82+
indent_style = space
83+
indent_size = 2
84+
trim_trailing_whitespace = false
85+
insert_final_newline = true
86+
resharper_enforce_empty_line_at_end_of_file = true
87+
88+
[*.yaml]
89+
indent_style = space
90+
indent_size = 2
91+
trim_trailing_whitespace = false
92+
insert_final_newline = true
93+
resharper_enforce_empty_line_at_end_of_file = true
94+
95+
# ========================================
96+
# C# files
97+
# ========================================
98+
[*.cs]
99+
indent_style = space
100+
indent_size = 4
101+
insert_final_newline = true
102+
resharper_enforce_empty_line_at_end_of_file = true
103+
trim_trailing_whitespace = true
104+
105+
# ========================================
106+
# Solution files
107+
# ========================================
108+
[*.sln]
109+
indent_style = tab
110+
tab_width = 4
111+
insert_final_newline = true
112+
resharper_enforce_empty_line_at_end_of_file = true
113+
trim_trailing_whitespace = true
114+
115+
# ========================================
116+
# Windows Batch and Command files
117+
# ========================================
118+
[*.bat]
119+
indent_style = space
120+
indent_size = 4
121+
insert_final_newline = true
122+
resharper_enforce_empty_line_at_end_of_file = true
123+
trim_trailing_whitespace = false
124+
end_of_line = crlf
125+
126+
[*.cmd]
127+
indent_style = space
128+
indent_size = 4
129+
insert_final_newline = true
130+
resharper_enforce_empty_line_at_end_of_file = true
131+
trim_trailing_whitespace = false
132+
end_of_line = crlf
133+
134+
# ========================================
135+
# Powershell
136+
# ========================================
137+
[*.ps1]
138+
indent_style = space
139+
indent_size = 4
140+
trim_trailing_whitespace = false
141+
insert_final_newline = true
142+
resharper_enforce_empty_line_at_end_of_file = true
143+
144+
[*.psd1]
145+
indent_style = space
146+
indent_size = 4
147+
trim_trailing_whitespace = false
148+
insert_final_newline = true
149+
resharper_enforce_empty_line_at_end_of_file = true
150+
151+
# ========================================
152+
# Bash
153+
# ========================================
154+
[*.sh]
155+
indent_style = space
156+
indent_size = 4
157+
trim_trailing_whitespace = false
158+
insert_final_newline = true
159+
resharper_enforce_empty_line_at_end_of_file = true
160+
end_of_line = lf
161+
162+
[eng/git-hooks/*]
163+
indent_style = space
164+
indent_size = 4
165+
trim_trailing_whitespace = false
166+
insert_final_newline = true
167+
resharper_enforce_empty_line_at_end_of_file = true
168+
end_of_line = lf

β€Ž.gitattributesβ€Ž

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Let Git handle line endings automatically:
2+
# - Checkout as CRLF on Windows, LF elsewhere
3+
* text=auto
4+
5+
# Explicit overrides for certain file types
6+
7+
# C# code and projects
8+
*.cs text eol=crlf diff=csharp
9+
*.sln text merge=union eol=crlf
10+
*.csproj text merge=union eol=lf
11+
*.vbproj text merge=union eol=lf
12+
*.fsproj text merge=union eol=lf
13+
14+
# XML-based config/resources (store as LF in repo)
15+
*.xml text eol=lf
16+
*.resx text eol=lf
17+
*.config text eol=lf
18+
*.props text eol=lf
19+
*.targets text eol=lf
20+
21+
# JSON, YAML, Markdown
22+
*.json text eol=lf
23+
*.yml text eol=lf
24+
*.yaml text eol=lf
25+
*.md text eol=lf
26+
27+
# Git metadata
28+
.gitattributes text eol=lf
29+
.gitignore text eol=lf
30+
31+
# Ensure shell scripts always use LF
32+
*.sh text eol=lf
33+
eng/git-hooks/* text eol=lf
34+
35+
# Ensure batch scripts always use CRLF
36+
*.bat eol=crlf
37+
*.cmd eol=crlf

β€Ž.github/.github.folderprojβ€Ž

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ο»Ώ<!--
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.Build.NoTargets">
22+
<ItemGroup>
23+
<None Include="**/*" Exclude="**/*.folderproj;**/obj/*;**/bin/*" />
24+
</ItemGroup>
25+
</Project>

β€Ž.github/release.ymlβ€Ž

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
changelog:
19+
exclude:
20+
labels:
21+
- notes:ignore
22+
authors:
23+
- dependabot
24+
categories:
25+
- title: πŸ’₯ Breaking Changes
26+
labels:
27+
- notes:breaking-change
28+
- title: πŸŽ‰ New Features
29+
labels:
30+
- notes:new-feature
31+
- title: 🐞 Bug Fixes
32+
labels:
33+
- notes:bug-fix
34+
- title: πŸš€ Performance Improvements
35+
labels:
36+
- notes:performance-improvement
37+
- title: πŸ† Improvements
38+
labels:
39+
- notes:improvement
40+
- title: πŸ“„ Website and API Documentation
41+
labels:
42+
- notes:website-or-documentation
43+
- title: πŸ’ͺ Other Changes
44+
labels:
45+
- "*"

0 commit comments

Comments
Β (0)