- Avoid creating a NoopAnalysisCache by default to prevent a phony
warning about not using the cache being printed.
- This way, we only produce a new instance lazily if not configured,
preserving the same behaviour bu without the warning.
- File encoding is converted to Charset only once. Errors in it's setup
wil fail the run immeditable instead of producing one error per file.
- We make sure to close the source stream from the same place we create
it, by using try-with-resources
- When wrapping the stream to a reader, we use try-with-resources
again, just in case
- The bechmark code now takes into account charset setup, and more
closely resembles the normal execution path
- This fixes#618
Under multi-thread runs, each thread parsed it's own copy of the
ruleset, and removed dysfunctional rules. This meant 1 `ConfigError` per
thread was being generated.
Since #519, we now log `ConfigErrors`, meaning multiple identical
logs in reports and noise for the user.
Therefore, we change our approach. RuleSets are parsed only once.
Dysfunctional rules are filtered and reported early on, before
dispathing actual file analysis. Each analysis thread can then produce
their own copy of the ruleset by taking advantage of the `deepCopy`
support for rules, ruleset and rulesets introduced in #464.
The result is not only more concise reports, but the analysis thread
actually perform less work. Rulesets XMLs are parsed exactly once,
instead of 1 + 1 per thread as before, and rule configuration is
validated only once.
During this process an issue with how property descriptors where
copied has arised and was fixed. A new unit test to validate this
scenario has been introduced.
- Resolves#608
- Log succesful cache loading
- Log hits / misses on debug, reason for miss too
- Invite users to enable incremental analysis
- Provide a new section on the web for the feature. May be promoted to
a top level page at some point.