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
Make sure bot categories are consistent in bots.yml #5727
Comments
Just for reference this script can be used for generating the list of categories: <?php
require_once "vendor/autoload.php";
$string = file_get_contents("regexes/bots.yml");
$parser = new \DeviceDetector\Yaml\Symfony();
$yaml = $parser->parseFile("regexes/bots.yml");
$categories = [];
foreach ($yaml as $bot) {
if (!empty($bot["category"])) {
$categories[] = $bot["category"];
}
}
var_dump(array_unique($categories)); |
@etienne-martin Sure. Feel free to create a PR for that as soon as you have some time. We could also add some simple tests to prove new records uses a predefined set of categories or similar |
Adding tests for the categories would be a good thing. Even if we don't implement a list of predefined categories, we could at least make sure that they are capitalized correctly. |
issue #5727 Co-authored-by: Stefan Giehl <stefan@matomo.org>
reason: we forgot to close this issue with the addition of this PR #6707 |
I've extracted a list of all the different bot categories from https://github.com/matomo-org/device-detector/blob/master/regexes/bots.yml:
I think we should standardize this up.
For instance, we have a category called
Feed Fetcher
and another one calledFeed Parser
. To me there's no difference between the two. Maybe I'm missing something.There is also a category called
Security Checker
and another one calledSecurity search bot
. We could rename these toSecurity
instead of having both categories.I've noticed that the category on line
615
is missing capitalization. This can cause problems with some software expecting the value to be capitalized:https://github.com/matomo-org/device-detector/blob/master/regexes/bots.yml#L615
I don't have time to create a PR right now but that's something I can definitely work on in the future.
Let me know what you think.
The text was updated successfully, but these errors were encountered: