Open bryanculver opened 1 month ago
To be clear, the above link shows incorrect urlpatterns - see https://github.com/nautobot/nautobot-app-circuit-maintenance/pull/320 for the appropriate corrections.
Most likely a linter here would need to check something like model._meta.verbose_name_plural.lower().replace(" ", "-")
as a first pass.
Environment
Proposed Functionality
Use Case
Walk the
urlpatterns
inurls.py
of an app and ensure that URLs with associated models (should be able to introspect the view) have names that are proper slugs of the model name.If exclusively using
NautobotUIViewset
this should be a quick win as those create the preferred routes and names automatically. But if an app hasn't usedNautobotUIViewSet
or provides additional URLs/actions, they should follow the same convention (see: https://github.com/nautobot/nautobot-app-circuit-maintenance/blob/af6553cfddf8fe90c8abdd302f5018120d287e87/nautobot_circuit_maintenance/urls.py#L13-L32)