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

Dev Analyzer Rule to ensure there are no public types in the Lucene.Net.Support namespace #1100

Open
1 task done
NightOwl888 opened this issue Jan 12, 2025 · 0 comments
Open
1 task done
Labels
analyzers is:task A chore to be done pri:normal Project Infrastructure up-for-grabs This issue is open to be worked on by anyone

Comments

@NightOwl888
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Task description

While we probably will have a Support folder in the repository for some time going forward, it is important to enforce the fact that we won't have a public Lucene.Net.Support namespace. This is easier to enforce using a Roslyn code analyzer than trying to keep track of during reviews because we can easily miss it.

The developer should get a build failure if they add a public type to the Lucene.Net.Support namespace or any namespace below that namespace. They should be instructed:

  • If the type is not intended for users, make it internal
  • If the type is intended for users:
    • If it is an adaption of something available in the JDK, consider submitting it to J2N
    • If it is more specialized, move it to an appropriate namespace below Lucene.Net, such as Lucene.Net.Util

The latter two options can be discussed either on the dev mailing list or on Slack to help make the right choice.

Side Note: I noticed that the Lucene.Net.Support.IO.WindowsFsyncSupport type is public and made it into the 4.8.0-beta00017 release. This would make a good test case for the analyzer.

@NightOwl888 NightOwl888 added Project Infrastructure up-for-grabs This issue is open to be worked on by anyone pri:normal is:task A chore to be done analyzers labels Jan 12, 2025
@NightOwl888 NightOwl888 added this to the 4.8.0-beta00018 milestone Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzers is:task A chore to be done pri:normal Project Infrastructure up-for-grabs This issue is open to be worked on by anyone
Projects
None yet
Development

No branches or pull requests

1 participant