Closed vladak closed 8 months ago
For the webapp, it might make sense to consult the type of the file stored in the index first, something like it is done in FileController#getContentPlain()
, and if not found fall back to the AnalyzerGuru
approach.
The change done in PR #4476 added basically a genre check to HistoryGuru#hasAnnotation()
. The main problem is that this kind of genre check merely checks the file prefix/suffix via AnalyzerGuru#find(String)
(unlike AnalyzerGuru#find(InputStream in, String file)
which uses file content as well - that would be undesired however because it would introduce additional I/O when listing directory contents) so files that do fail this match, like README.md
will have the annotate capability disabled in the UI and actually also when creating annotation cache, because no analyzer has a filename match.
After the changes in PR #4476 annotation links for some files are no longer displayed. This is happening e.g. for makefiles with
.targ
suffix but also for files with.txt
suffix orREADME.md
files. In the webapp logs this looks like this: