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

Fixes several code quality issues (Code Analysis) #387

Merged
merged 72 commits into from Nov 10, 2020

Conversation

NightOwl888
Copy link
Contributor

This PR:

  1. Adds an .editorconfig file to take control over the code analysis rules.
  2. Fixes most of the code analysis suggestions that were given.
  3. Disables some code analysis rules (such as nesting classes, catching common exceptions, and those that only apply to .NET Standard 2.1+).
  4. Disables additional code analysis rules in the tests to keep them more in line with Java.
  5. Fixes some bugs that were located in the process (such as parameters that weren't being cascaded, and properties that weren't returning their backing field's value).
  6. Addresses some performance issues (such as removing fields and parameters that were not in use and adding several aggressive inlining attributes).
  7. Removes some dead code and commented code.

…Object property to reference private field instead of itself
…uteFactory argument that is provided as per the documentation comment. Note this bug exists in Lucene 4.8.0, also.
…2N.Collections.Generic.List<T> so the call to ToString() will automatically list the exception messages
…em.Runtime.CompilerServices to skip our nullable attribute replacements for platforms that don't support them
…rPerField, IndexWriter, LogMergePolicy, SegmentCoreReaders, and SegmentReader to take advantage of the fact that TryGetValue returns a boolean
…actories so it will display the dictionary contents
…ests (object and collection initialization can be simplified)
…') warnings because this functionality requires .NET Standard 2.1
…stead of framework type names for type references) warnings in tests
@NightOwl888 NightOwl888 added the is:enhancement New feature or request label Nov 10, 2020
@NightOwl888 NightOwl888 added this to the 4.8.0-beta00013 milestone Nov 10, 2020
@NightOwl888 NightOwl888 merged commit 5eb0949 into apache:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant